Commit Graph

5 Commits

Author SHA1 Message Date
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
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
d398625f5d feat: add cmd/classify and improve classifier coverage
- Add cmd/classify: reads raw cached releases and produces a CSV of all
  distributables with sortable version columns (ver_major/minor/patch/pre)
- Export rawcache.ActivePath() for use by cmd/classify
- Add OS detection: openbsd, netbsd, dragonflybsd, plan9, mac→darwin
- Add arch detection: armv5, armhf→armv7, arm7→armv7, 386→x86,
  32bit/64bit (no hyphen), universal→universal2, riscv64, loong64,
  mipsle, mips64le
- Infer Linux from .deb/.rpm format when OS not in filename
- Add .deb and .rpm as recognized formats
- Normalize all per-source values to buildmeta vocabulary (x86_64, aarch64)
- Filter source archives and buildable-artifact meta-assets
- Add CAT-RULES.md tracking classifier learnings
- Add CATEGORIZED.md and LINKS.md for reference

Batch 1 tested: go, node, hugo, caddy, pathman (35,919 rows)
2026-03-10 00:17:17 -06:00
AJ ONeal
1fc595f265 chore: set go version to 1.26.1 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