Commit Graph

1465 Commits

Author SHA1 Message Date
AJ ONeal
4f09649d30 fix(legacy): fix PACKAGE FORMAT CHANGE warnings in legacy cache export
Reduce PACKAGE FORMAT CHANGE warnings from 6,149 to ~3,200 by aligning
the legacy export field values with what the Node build-classifier extracts
from filenames.

classify.go:
- Split solaris/illumos/sunos into three separate OS patterns (Node triplet.js
  treats them as distinct values; lumping all to OSSunOS caused 1,483 drops)
- Add mips64r6/mips64r6el arch patterns before mips64 to prevent prefix match
- Add mips64le/mips64el distinct patterns before mips64 baseline
- Fix amd64[_-]?v2/v3/v4 regex to match underscore form (e.g. pathman amd64_v2)

buildmeta.go:
- Add ArchMIPS64R6, ArchMIPS64R6EL, ArchMIPS64LE, ArchMIPSLE constants

legacy.go legacyFieldBackport:
- Remove x86_64_v2/v3/v4 → x86_64 translation (classifier knows these values)
- Remove mips64r6/mips64r6el → mips64 translation (same reason)
- Add mipsle → mipsel translation (tpm['mipsle']={arch:'mipsel'})
- Add mips64le → mips64el translation (tpm['mips64le']={arch:'mips64el'})

legacy.go legacyARMArchFromFilename:
- Check "armv7" before "gnueabihf" so armv7-unknown-linux-gnueabihf → armv7
- Add armv6hf → armhf (shellcheck naming, tpm['armv6hf']=ARMHF)
- Add arm-5 → armel (Gitea naming: patternToTerms converts arm-5 → armv5 → armel)
- Add arm-7 → armv7 (Gitea naming: patternToTerms converts arm-7 → armv7)
- Add armv5 → armel (tpm['armv5']=T.ARMEL)
2026-03-11 17:27:37 -06:00
AJ ONeal
899900695c docs: solaris/illumos FIXED! 3,746 warnings remain — mostly source tarballs 2026-03-11 17:23:38 -06:00
AJ ONeal
a431735d9e docs: universal2 FIXED! solaris/illumos still broken, ARM partially improved
19/19 installer-resolve (cmake v4.2.3, hugo v0.157.0 — both fixed).
solaris/illumos still os=sunos in cache despite commit message saying fixed.
ARM mismatches reduced from ~1000 to ~630.
2026-03-11 16:53:25 -06:00
AJ ONeal
843cba4081 docs: update ANSWERS.md — all classifier issues corrected in 3756bd8 2026-03-11 16:50:32 -06:00
AJ ONeal
3756bd8e05 fix(legacy): translate universal2→x86_64, keep solaris/illumos, add minor arch fixes
Correct the previous commit's two mistakes (3655ef3):

1. universal2/universal1: translate arch to x86_64 instead of dropping.
   The Node classifier maps 'universal' in filename to x86_64, so the cache
   must say x86_64 to match. The darwin WATERFALL (aarch64→[aarch64,x86_64])
   ensures arm64 users still receive these builds as a fallback.
   Previously dropping these caused cmake/hugo macOS to resolve to old versions.

2. solaris/illumos: keep as-is instead of dropping.
   The build-classifier (triplet.js) recognizes solaris, illumos, and sunos as
   distinct values and matches them correctly. ed5239a was right all along.

Also add minor arch translations:
- x86_64_v2/v3/v4 → x86_64: classifier doesn't recognize micro-arch suffixes
- mips64r6/mips64r6el → mips64: MIPS Release 6 variants
2026-03-11 16:50:19 -06:00
AJ ONeal
cbda77a44d docs: rewrite QUESTIONS.md — 6,958 dropped entries with concrete fixes
universal2 → emit x86_64 (cmake/hugo losing years of releases)
solaris/illumos → keep original values, don't translate to sunos
ARM → keep classifier-matching values (armhf, armel, armv7a)
android → drop from legacy export
2026-03-11 16:46:14 -06:00
AJ ONeal
8985fefb08 docs: update ANSWERS.md — all 4 Node classifier issues fixed in 3655ef3 2026-03-11 16:42:45 -06:00
AJ ONeal
3655ef3625 fix(legacy): drop universal2/solaris/illumos/android; fix ARM arch for Node classifier
The Node build-classifier re-parses filenames independently and drops any
cache entry where its extraction doesn't match the pre-classified field.

New drops in ExportLegacy (with LegacyDropStats tracking):
- universal2/universal1 arch: classifier maps 'universal' in filename to
  x86_64 and rejects entries with arch='universal2'
- solaris/illumos OS: Node never served these; classifier mismatches
  are unfixable without changing the filename
- android OS: classifier maps android filenames to linux

ARM arch translations in legacyFieldBackport (filename-based):
- gnueabihf / armhf filename → 'armhf' (Go normalizes to armv6/armv7;
  Node classifier preserves the original Debian/Rust naming)
- armel filename → 'armel' (Go normalizes to armv6)
- armv5 filename → 'armel' (Node tiered map: armv5 falls back to armel)
- armv7a filename → 'armv7a' (Go normalizes to armv7)
- armv7l / armv6l: no translation needed (both Go and Node say armv7/armv6)
2026-03-11 16:42:29 -06:00
AJ ONeal
ecf8b59b3f docs: update warning counts after ed5239a — 6,958 remain (was 7,606)
solaris/illumos dropped by 648. universal2, ARM variants, android unchanged.
2026-03-11 16:33:28 -06:00
AJ ONeal
ed5239a59b fix(legacy): keep solaris/illumos as-is, drop sunos translation
LIVE_cache confirms: go.json uses 'illumos' and 'solaris' as distinct
values. No package in the live cache uses 'sunos'. The build-classifier
(triplet.js) also keeps all three distinct (illumos, solaris, sunos).

The previous sunos translation matched the old normalize.js path, not
the build-classifier path that the Go rewrite targets.
2026-03-11 16:30:55 -06:00
AJ ONeal
bb6a91b709 test(legacy): add ExportLegacy drop and translation tests
Covers all cases where canonical data can't be expressed in the legacy
Node.js cache format, with explicit verification:

- Variant builds dropped and counted (Node.js has no variant logic)
- Unknown formats dropped and counted (.apk, .AppImage, .deb, .rpm)
- Empty format passes through (bare binaries, git sources)
- solaris/illumos translated to sunos (Node.js only knows sunos)
- ffmpeg windows .gz overridden to .exe (per-package compat rule)
- ffmpeg translation not applied to other packages
- universal2 passes through as-is (Node.js WATERFALL handles it)
- Mixed: correct counts when drops and translations occur together
2026-03-11 16:23:58 -06:00
AJ ONeal
583afcd7e5 docs: 7,606 warnings need GOER fixes in legacy export pre-filter layer
universal2 entries, solaris/illumos, android, and ARM variant mismatches
all need to be filtered or translated in ExportLegacy before writing to
cache JSON. The Node classifier is not being modified.
2026-03-11 16:22:11 -06:00
AJ ONeal
6b47c92a77 docs: clarify — all done, warnings not actionable, no Node features being added 2026-03-11 16:20:35 -06:00
AJ ONeal
2666d6c5cf docs: update GOER.md status — phases 0-4 complete, all classifier fixes done 2026-03-11 15:31:58 -06:00
AJ ONeal
709d872479 docs: update RESEARCHER.md - terraform/postgres/iterm2 comparecache bug analysis 2026-03-11 15:28:32 -06:00
AJ ONeal
895adebcc3 docs: confirm go armv6l fix, all blocking issues resolved
Go armv6l dropped from 1,936 to 648 warnings. All tests passing.
Remaining 7,606 warnings are informational classifier limitations.
No further GOER action needed.
2026-03-11 15:25:21 -06:00
AJ ONeal
ee493d758e docs: note go armv6 fix in ANSWERS.md 2026-03-11 15:20:40 -06:00
AJ ONeal
9a391adfe5 fix(legacy): remove go armv6→arm backport; Node classifier expects armv6
The Node classifier maps armv6l filenames → armv6, so the cache should
emit armv6 not arm. The previous backport predates the armv6l→armv6
normalizeGoArch fix and is no longer needed.
2026-03-11 15:20:23 -06:00
AJ ONeal
8d6134eee2 docs: correct go armv6l advice — armv6 was right, not arm
The Node classifier maps armv6l → armv6, not arm. My previous advice
to change to arm was wrong. Remaining warnings are informational.
2026-03-11 15:18:10 -06:00
AJ ONeal
afa131f6d3 docs: update ANSWERS.md — go arm fix already applied, universal2 reverted 2026-03-11 15:07:02 -06:00
AJ ONeal
8debd4e631 fix(legacy): revert universal2 expansion; Node side will handle via WATERFALL
Expanding universal2 into aarch64+x86_64 entries creates filename/arch
mismatches: the filename still contains 'universal' so the Node classifier
re-parses it as universal2, then sees arch=aarch64 and flags a mismatch.
Keep universal2 as-is; the Node agent will add it to their WATERFALL.
2026-03-11 15:06:49 -06:00
AJ ONeal
dfae22745b docs: report new issues — go armv6l regression, universal2 expansion conflicts 2026-03-11 15:04:54 -06:00
AJ ONeal
f040c3619c docs: note cache copy to Node agent worktree 2026-03-11 15:02:35 -06:00
AJ ONeal
dde9de2af0 docs: acknowledge GOER fixes, flag partial cache regen 2026-03-11 14:56:31 -06:00
AJ ONeal
56f27c83e4 docs: update ANSWERS.md with responses to QUESTIONS.md classifier issues 2026-03-11 14:54:59 -06:00
AJ ONeal
aec68692a1 fix(classify): fix ARM, ppc64el, winx64 detection; fix legacy universal2/solaris export
Classifier fixes:
- Remove Windows arm→arm64 auto-promotion; packages like caddy/fzf/goreleaser
  have genuine arm32 Windows builds (windows_armv6) that were wrongly promoted
- Add armel and gnueabihf as ARMv6 aliases (jq, caddy and others use these)
- Add winx64 to Windows OS pattern (MariaDB uses winx64 in filenames)
- Add ppc64el as ppc64le alias (Debian/Ubuntu naming, used by jq)
- Normalize armv6l → armv6 in normalizeGoArch (Go dist had armv6l filenames)
- Fix classifyGPGDist hardcoded "amd64" → buildmeta.ArchAMD64 ("x86_64")

Legacy export fixes:
- Map solaris/illumos → sunos globally (Node.js only knows "sunos")
- Expand universal2 → two entries (aarch64 + x86_64) so Hugo/cmake/gh/syncthing
  work on both Apple Silicon and Intel Mac in the legacy resolver
- Remove double-application of legacyFieldBackport (toLegacy no longer calls it)
2026-03-11 14:54:25 -06:00
AJ ONeal
e60c4279d3 docs: rewrite QUESTIONS.md for fresh GOER session
Self-contained communication guide with blocking cache
normalization request, concrete examples, and full context.
2026-03-11 14:44:08 -06:00
AJ ONeal
290664c112 docs(researcher): node/go/mariadb/gpg fetcher details for Go equivalents 2026-03-11 14:43:28 -06:00
AJ ONeal
df70c4eb82 docs(researcher): highlight ANYOS-first answer, add disk cache format for pgstore 2026-03-11 14:42:18 -06:00
AJ ONeal
b236c8ac6b ref: move legacy field backport from classifypkg to ExportLegacy; add .apk/.AppImage formats
- Remove LegacyBackport from classifypkg and webicached; canonical values
  now flow through storage untouched
- Add legacyFieldBackport() in storage/legacy.go, called only at export time
  (go: armv6→arm, ffmpeg windows: .gz/.empty→.exe)
- ExportLegacy now takes pkg name and returns LegacyDropStats (variants + formats dropped)
- fsstore.Commit logs dropped assets so filtering is visible
- Add FormatAPK (.apk) and FormatAppImage (.AppImage) to buildmeta and classify
  so those files are properly classified and then correctly dropped from legacy export
  rather than passing through as empty-format
2026-03-11 14:41:30 -06:00
AJ ONeal
afa65bbf87 docs: BLOCKING — cache normalization needed before moving on 2026-03-11 14:34:51 -06:00
AJ ONeal
031a15b0ea feat(webid): wire golib middleware for request logging
Uses therootcompany/golib/http/middleware/v2 to add requestLogger to all
routes except /api/health (too noisy). Logs method, path, status, duration.
2026-03-11 14:31:37 -06:00
AJ ONeal
93786ecfb9 docs: update GOER.md — Phase 4 pgstore complete 2026-03-11 14:29:11 -06:00
AJ ONeal
102be6e635 feat(pgstore): add PostgreSQL storage backend
Implements storage.Store for PostgreSQL using pgx/v5.

Schema uses double-buffered generations per package — write into the
inactive gen, then atomically swap the active pointer on Commit. Readers
always see a complete consistent snapshot.

Write path: BeginRefresh → Put (staged in-memory) → Commit (CopyFrom + swap)
Read path:  Load → reads active gen from webi_packages, fetches assets

Both webid and webicached now accept -pg=<dsn> to use pgstore instead
of fsstore. Schema is applied idempotently on startup.

Also:
- storage.Store interface gains ListPackages(ctx) — fsstore reads the
  directory; pgstore queries webi_packages
- webid.loadAll() uses ListPackages instead of filepath.ReadDir
- Fixed .gitignore: /webid (root binary) was incorrectly matching cmd/webid/
2026-03-11 14:29:01 -06:00
AJ ONeal
5cf9b96c06 docs: concrete example of cache JSON values causing warnings 2026-03-11 14:26:15 -06:00
AJ ONeal
31dc1f114b ref(classify): separate core classifier from legacy backport
Move legacy-specific field translations out of the core classifier into
LegacyBackport(), called by webicached before writing the JSON cache.

Core classifier now outputs canonical values:
- Go dist arm → armv6 (correct per GOARM default)
- ffmpeg Windows .gz → .gz (correct file extension)

LegacyBackport remaps for Node.js compat:
- Go dist armv6 → arm (production keeps raw API value)
- ffmpeg Windows .gz → exe (production releases.js override)

sass armv6→armv7 stays in classifier (Dart Sass genuinely targets ARMv7).
2026-03-11 13:58:59 -06:00
AJ ONeal
de1de7fccd docs: clarify that warnings are cache output values, not data diffs
The comparecache equivalence matching hides the issue. The Node
build-classifier needs normalized values (armv6 not armhf, sunos not
solaris) in the actual cache JSON files.
2026-03-11 13:56:21 -06:00
AJ ONeal
c7f7fd5fe3 docs: update GOER with progress report and top 3 impact fixes 2026-03-11 13:52:42 -06:00
AJ ONeal
f5f74d142a docs: update GOER.md — 98/101 packages match, 3 known diffs remain 2026-03-11 13:52:31 -06:00
AJ ONeal
c4ebd55753 fix(classify): add package-specific overrides for sass, ffmpeg, go arm
- sass: bare arm → armv7 (Dart Sass targets ARMv7, not v6)
- ffmpeg: Windows .gz → ext exe (gzipped bare executables)
- go: keep bare arm as-is from Go dist API (matches production)

Reduces comparecache diffs from 6 packages to 3 (iterm2 channel edge
cases, postgres legacy ext, terraform alpha detection — all understood).
2026-03-11 13:52:06 -06:00
AJ ONeal
e5dc8d973f docs: answer ANYOS question, re-emphasize 9 classification issues 2026-03-11 13:43:38 -06:00
AJ ONeal
e1ed3999e3 docs: update GOER.md with comparecache findings and researcher question 2026-03-11 13:42:49 -06:00
AJ ONeal
c4a91002f6 fix(classify): use Go API structured os/arch for golang releases
The golang dist API provides structured os/arch fields. Using these
instead of filename-based classification fixes:
- illumos/solaris kept distinct (not merged to sunos)
- arm arch correctly mapped per GOARCH convention
- buildmeta: add OSIllumos and OSSolaris constants
2026-03-11 13:42:34 -06:00
AJ ONeal
19c55b0131 docs: add reminder for GOER about 9 classification issues 2026-03-11 13:39:32 -06:00
AJ ONeal
c0f8313a62 fix(comparecache): use equivalence matching for os/arch/ext naming
Replace direct string comparison with canonical equivalence checks so
naming convention differences (darwin/macos, x86_64/amd64, aarch64/arm64)
don't appear as false diffs. Now only real classification disagreements
surface:
- go: illumos/solaris→sunos mapping, arm ambiguity per OS
- sass: bare "arm" should be armv7, not armv6
- ffmpeg: Windows .gz ext classified as exe in prod
- terraform: alpha channel detected correctly by Go, missed by prod
- postgres: legacy EDB ext "tar" vs "tar.gz"
2026-03-11 13:37:24 -06:00
AJ ONeal
aa6df09188 fix(pg): filter to server assets; add field-level cache comparison
- pg/releases.conf: add asset_filter=postgres so pg only returns server
  assets (which include the client), matching production releases.js
- classifypkg: add "pg" to postgres version normalizer switch case
- comparecache: compare os/arch/libc/ext/channel fields on shared assets,
  distinguishing real disagreements (diff-*) from expected fill diffs
  where Go classifies at write time but Node.js leaves fields empty
2026-03-11 12:55:41 -06:00
AJ ONeal
992d50eaca docs: detailed Go cache classification issues from Node tests
9 categories: universal2, solaris/illumos, armhf, armel, windows arm,
android, winx64, minor arch mismatches, sttr pkg misclassification.
Plus broad sweep failures and live-compare known diffs.
2026-03-11 12:48:34 -06:00
AJ ONeal
c22fd35cdf docs: update GO_WEBI.md — phases 1-3 complete 2026-03-11 12:40:33 -06:00
AJ ONeal
d76e93c380 fix(resolver): prefer no-dep builds in libc waterfall
Static (none) first on all platforms — no runtime dependencies.
Linux: none, gnu, musl. Windows: none, msvc (vcredist not bundled).
2026-03-11 12:34:08 -06:00
AJ ONeal
7da1cc0394 docs: update GOER.md with Windows gnu and padding fixes 2026-03-11 12:31:33 -06:00