ci: run the full viewer test suite in CI and pin the validator declarations - #63
Merged
Conversation
added 5 commits
August 17, 2026 14:59
…ations The viewer CI step now runs test:ci (fixture drift check, validator drift check, typecheck, vitest, build) instead of build alone, keeping the committed dist-static drift gate. generate-validators.mjs now owns report-validators.d.mts alongside the generated .mjs: --write regenerates both and --check fails on drift in either, so the declaration file can no longer diverge from the validators it types. The showcase fixture is regenerated at a clean checkout of main so its provenance records the real merge commit with source_dirty=false.
A drift gate that reports only 'drifted' cannot be diagnosed from a CI log. On mismatch the check now walks both normalized reports and lists the differing JSON paths with both values, bounded to twenty entries.
The manifest pins the generator script digest, so the drift-path change to the generator requires a regenerated fixture. Score-bearing engine sources are unchanged; the content-addressed engine identity is identical to main.
The showcase fixture's PNG bytes and score cascade are specific to the platform that generated it: image encoders and floating-point libraries differ across operating systems, small axis drifts cascade through thresholds into different scores, and the encoded thumbnail bytes hash differently. Regenerating the fixture on a CI runner therefore drifts by construction, which the named-path diagnostics now show directly. CI runs test:ci:portable (validator drift check, typecheck, vitest, build); test:ci with fixture:check remains the local gate on the platform that produced the committed fixture.
3 tasks
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
npm --prefix viewer run test:ci:portable(validator drift check, typecheck, vitest, build) instead ofrun buildalone. The committeddist-staticdrift gate stays.generate-validators.mjsnow ownsreport-validators.d.mtsalongside the generated.mjs:--writeregenerates both,--checkfails on drift in either, so the declaration file can no longer diverge from the validators it types.source_dirty: false); the manifest pins the generator script digest, so a generator change requires the regeneration.Why
CI previously exercised only the viewer build, so the vitest suite, the typecheck, and the validator drift gate ran nowhere.
fixture:checkis deliberately excluded from the CI gate: the fixture's PNG bytes and score cascade are specific to the platform that generated it. Running it on the CI runner showed image encoders producing different bytes (content_sha256, thumbnails) and small floating-point axis drifts cascading through thresholds into materially different scores. The full gate,fixture:checkincluded, runs locally viatest:cion the platform that produced the committed fixture — same class of local-only gate aspixel-rag:check, whose inputs live under the gitignored.cache/(relates #59).Verified
test:ci:portableand the fulltest:ciboth green locally,git diff --exit-code -- viewer/dist-staticclean,uv run pytest tests/test_showcase_fixture_provenance.pypasses.