Commit Graph

7 Commits

Author SHA1 Message Date
AJ ONeal
43ab591061 ref(internal): rewrite buildmeta, uadetect, httpclient from scratch
buildmeta: remove premature Release/PackageMeta structs and
ChannelNames slice — keep only the shared vocabulary types.

uadetect: replace regex-based matching with token-based matching.
Split UA on whitespace/slash/semicolon, match lowercase tokens.
Strip xnu kernel info for Rosetta. Single Parse() entry point.

httpclient: return plain *http.Client from New(). Make Do() and Get()
free functions. Only retry idempotent methods (GET/HEAD).
2026-03-08 22:58:58 -06:00
AJ ONeal
1374bca46b feat(lexver): add Original field and ExtraSort tiebreaker
Original preserves the upstream tag as the releaser published it (e.g.
"REL_17_0"), while Raw holds Webi's normalized form ("17.0").

ExtraSort is an opaque string for package-specific ordering where Nums
alone can't capture sort order (e.g. flutter "2.3.0-16.0.pre"). Set by
release-fetcher code using zero-padded strings or whatever works for
that package.
2026-03-08 22:58:58 -06:00
AJ ONeal
c1a40cebf3 ref(lexver): support arbitrary version depth, use time.Time for dates
Versions aren't always semver — chromedriver uses 4 parts, gpg uses 4
parts, atomicparsley uses dates. Replaced fixed Major/Minor/Patch/Build
fields with a Nums slice. Date is now time.Time for minute-level
precision.

Also adds ODDITIES.md cataloging non-standard version formats across
Webi packages for future reference.
2026-03-08 22:58:58 -06:00
AJ ONeal
66f9f5f5fe ref(lexver): replace Build field with Date for tiebreaking
Build is often a hash with no ordering meaning. When release dates are
known, they're a better tiebreaker for versions with the same
major.minor.patch. Date is only used when both sides have one.
2026-03-08 22:58:58 -06:00
AJ ONeal
c2c54e54ea ref(lexver): rewrite as structured type with Compare function
Instead of encoding versions as padded strings (a JS-ism), parse into a
Version struct and compare fields directly. Pre-releases sort before
their corresponding stable release via channel comparison.
2026-03-08 22:58:58 -06:00
AJ ONeal
ed377c93c6 docs: rewrite package comments to focus on what/why, not how
Each package doc now explains what problem it solves and why it exists,
with the public interface as the only "how" detail. Implementation
notes removed from doc comments.
2026-03-08 22:58:58 -06:00
AJ ONeal
cf9dd4d2e2 feat: add Phase 0 foundation packages for Go rewrite
- internal/buildmeta: canonical constants for OS, arch, libc, format, channel
- internal/lexver: version string → lexicographically sortable string
- internal/uadetect: User-Agent → OS/arch/libc detection
- internal/httpclient: resilient net/http client with retry and backoff
- go.mod: initialize module (stdlib only, no dependencies)
2026-03-08 22:58:58 -06:00