Problem
Parser drift against live 90minut HTML can go unnoticed between fixture corpus refreshes.
Current tests are deterministic/offline (good), but we do not have a quick developer command to detect upstream structure changes early.
Goal
Add a dev-only drift audit command that checks live pages and reports parser contract drift directly in CLI output.
Scope
- Add a command (e.g.
go run ./cmd/driftaudit) that fetches a small fixed sample set:
- archive page
- selected league pages
- selected match pages
- Reuse existing parser/service logic; no new persistence layer.
- Validate key invariants already reflected in tests:
- seasons extraction + selected season behavior
- competition extraction order/availability
- rounds + fixtures extraction
- timeline side assignment sanity
- Print report to stdout only (no files created).
- Exit codes:
0: no drift detected
1: drift/contract failures detected
2: fetch/runtime error
- Optional
--json mode that prints JSON to stdout.
Non-goals
- No automatic updates to fixtures/tests.
- No CI requirement for live network checks.
- No disk caching/persistence.
Acceptance criteria
- Running drift audit gives a concise CLI summary with pass/fail counts and failing checks.
- Drift conditions return non-zero exit code (
1) without mutating repository files.
- Runtime/network failures return exit code
2.
- Existing offline parser tests remain unchanged and deterministic.
Problem
Parser drift against live 90minut HTML can go unnoticed between fixture corpus refreshes.
Current tests are deterministic/offline (good), but we do not have a quick developer command to detect upstream structure changes early.
Goal
Add a dev-only drift audit command that checks live pages and reports parser contract drift directly in CLI output.
Scope
go run ./cmd/driftaudit) that fetches a small fixed sample set:0: no drift detected1: drift/contract failures detected2: fetch/runtime error--jsonmode that prints JSON to stdout.Non-goals
Acceptance criteria
1) without mutating repository files.2.