test(260617-v4e): golden e2e integration oracle for the ingest→stats pipeline#28
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…alizer, skip guards, test:golden - add test:golden script targeting src/test/golden (no verify-chained script globs it) - loader.ts: unpack committed archive + archivePresent()/dockerReachable() skip guards, production ParserArtifact type - normalize.ts: uuid->token map, timestamp + source_file redaction, row sort - README + skeleton pipeline test that skips cleanly without infra
- build-floor-archive.sh: parser-2 CLI over its golden OCAP corpus → real artifacts (success/partial only) - commit artifacts.tar.gz floor (9 real parser-2 artifacts) so the oracle is never empty - pipeline.golden.test.ts: promote → durable job → real broker publish → completed consumer → recalc → GET /stats/* snapshot, through the same factories server.ts wires - harness.ts: TRUNCATE_ALL, bounded pollUntil (hard timeout), queue purge, raw parse.completed publisher, full-surface normalizer - assert durable-job-before-publish invariant + published parse.requested contract - ignore machine-generated golden snapshots in prettier
…cases - three anchors over the aggregate-combat artifact: player-only (4.00), player+squad (9.00), excluded teamkill (0) - seed a previous rotation with player_stats/squad_stats supplying effectiveness; force replays.game_type='sg' so the bounty scope is non-empty - assert persisted bounty_points with toEqual hand-computed values (semantics, not snapshot)
…-delivery, role-gate - six pinned invariants: durable-job-before-publish, re-promote dedup (duplicate_replay_id), source-bytes conflict (source_identity_changed_bytes), re-delivery idempotency, parse.failed terminal-once, admin role-gate (401/403/2xx) - conflict + parse.failed via synthetic non-broker paths (never round-trip a throwing artifact) - role-gate exercises the shared requireRole pre-handler via buildApp + in-memory auth stores
… corpus - capture-artifacts.sh: env-driven (no host/key/cred/IP literals), mc/aws fallback, Happ VPN ip-rule bypass reminder, logs captured-vs-skipped, folds in the parser-2 floor, fails loudly on missing env / zero objects - README already documents the one-line human run command + floor/master-only-CI note - add max-lines to invariants disable header (post-format line count)
- add master-only golden-oracle job to cd.yml (push to master/main only, brings up compose services, runs test:golden, 30m timeout) — not a PR check, not in verify - exclude src/test/golden from test and test:coverage so the suite runs ONLY via test:golden (zero coverage obligation; verify stays green at 100%) - README CI-wiring section documents the wired job
…ation + shared skip-guard Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A master-only behavioral regression oracle for the
server-2ingest→stats pipeline, built BEFORE the Phase 2 Track C refactor (Oxfmt / Oxlint /tsc→tsdown — behavior-preserving). It pins computed values and pipeline behavior that thefrozen-contract/oasdiff gate (API shape only) and the unit suite (mocked boundaries) cannot catch.How
server.ts: promote staging → durableparse_jobs+ RabbitMQ publish → real-brokerparse.completed→ real S3 artifact load → recalc →GET /stats/*.truncate … cascadeisolation, unique S3 keys + ephemeral queue per run. No mocked boundary.ParserArtifactcorpus committed as a gzip archive, unpacked at test start; floor from the parser-2 golden corpus, scalable to hundreds via a gated SSH capture script (src/test/golden/scripts/) the human runs once against the VPS./stats/*) + hand-computed bounty anchors (4.00 / 9.00 / 0).source_identity_changed_bytesconflict, re-delivery idempotency, synthetic parse.failed, role-gate (401/403/2xx).Gate placement
test:goldenscript + a master-push-only CI job. Not inverify/test/test:coverage→ zero coverage obligation;verifystays green at 100% and the suite skips cleanly when Docker or the archive are absent.Validation
pnpm verifygreen end-to-end;test:coverage100%.pnpm test:goldenLIVE green: 4 files / 26 tests, 9 snapshots, real broker round-trips.Decision pack, research, review, and verification:
.planning/quick/260617-v4e-golden-e2e-integration-oracle-for-ingest/.🤖 Generated with Claude Code