Commit Graph

7 Commits

Author SHA1 Message Date
AJ ONeal
47419b7eee fix(classifypkg): tag Rust static musl builds as libc='none'
Rust *-unknown-linux-musl builds are statically linked with zero
runtime libc dependency. Detect this pattern in classifyGitHub and
override libc from 'musl' to 'none'. Hard-musl packages (pwsh, bun,
node) use different filename patterns and keep libc='musl'.
2026-03-11 12:19:21 -06:00
AJ ONeal
5eab504c3c test(webid): add jq resolve test, skip upstream gaps in resolve tests
- Added TestV1ResolveJQ to verify jq resolves to binary, not git
- Changed upstream gap detection in resolve_cache_test to t.Skipf
  (shellcheck/windows and xz/linux-arm64 don't have upstream builds)
- Updated ANSWERS.md with git assets investigation results
2026-03-11 02:38:08 -06:00
AJ ONeal
dae987376e test(resolve): restore platform expectations, document upstream gaps
shellcheck has no Windows builds, xz has no arm64 builds — these are
real upstream gaps that the test suite now surfaces as failures rather
than silently excluding. 891 pass, 2 known upstream gaps.
2026-03-10 16:07:11 -06:00
AJ ONeal
37ea9a4227 feat(resolve): 895 tests passing across 103 real packages
Resolver fixes:
- Accept "*" as ANYARCH (legacy cache uses "*" for universal builds)
- Accept bare binaries (empty format) as last-resort format match
- POSIX/ANYOS/ANYARCH matching (from previous commit)

Test suite covers:
- All 103 cache packages × 8 platforms (darwin/linux/windows × arches)
- 18 known packages with mandatory platform expectations
- Version constraint pinning (bat@0.25, node@20, etc.)
- Arch fallback (Rosetta 2, Windows ARM64, micro-arch)
- POSIX package resolution (aliasman, pathman, serviceman)
- Libc preference (musl/gnu/none)
- Format preference cascading
- Base-over-variant preference
2026-03-10 15:17:52 -06:00
AJ ONeal
f779e240fd feat(resolve): add POSIX/ANYOS/ANYARCH matching and test coverage
The resolver now handles:
- ANYOS assets match any query OS
- posix_2017/posix_2024 assets match any non-Windows OS
- ANYARCH assets match any query architecture (ranked below specific)

14 tests covering: exact match, version constraints, arch fallback
(Rosetta 2, Windows ARM64, micro-arch), format preference, libc
filtering, base-over-variant preference, POSIX/ANYOS/ANYARCH fallback,
Survey catalog, and no-match.
2026-03-10 15:06:19 -06:00
AJ ONeal
d1016eb589 add Variants []string to Asset and Dist, keep Extra for version info
Extra is for version-related sort metadata (build numbers, etc.).
Variants captures build qualifiers like "rocm", "jetpack5",
"fxdependent", "installer" — things the resolver should skip by
default unless explicitly requested.

Also update format classification docs: most formats (.pkg, .deb,
.dmg, .msi) are extractable — only .exe is ambiguous and needs
the "installer" variant tag when it's not the actual binary.
2026-03-10 12:51:11 -06:00
AJ ONeal
8aeda55e3b feat: add resolve package and end-to-end test
internal/resolve: picks the best release for a platform query.
Handles arch compatibility fallbacks (Rosetta 2, Windows ARM64
emulation, amd64 micro-arch levels), format preferences, variant
filtering (prefers base over rocm/jetpack GPU variants), and
universal (arch-less) binaries.

cmd/e2etest: fetches releases for goreleaser, ollama, and node,
classifies them, resolves for 9 test queries across linux/darwin/
windows x86_64/arm64, then compares against the live webi.sh API.

Results: 8/9 exact match, 1 warn where the Go resolver is more
correct than the live API (ollama arm64 base vs jetpack variant).

Edge cases fixed during development:
- .tgz is a valid archive format (not npm metadata)
- Empty arch in filename = universal binary (ranked below native)
- GPU variants (rocm, jetpack) ranked below base binaries
2026-03-10 10:09:32 -06:00