Skip to content

ci: run the full viewer test suite in CI and pin the validator declarations - #63

Merged
ohdearquant merged 5 commits into
mainfrom
ci/viewer-test-ci
Aug 17, 2026
Merged

ci: run the full viewer test suite in CI and pin the validator declarations#63
ohdearquant merged 5 commits into
mainfrom
ci/viewer-test-ci

Conversation

@ohdearquant

@ohdearquant ohdearquant commented Aug 17, 2026

Copy link
Copy Markdown
Owner

What

  • The viewer CI step now runs npm --prefix viewer run test:ci:portable (validator drift check, typecheck, vitest, build) instead of run build alone. The committed dist-static drift gate stays.
  • generate-validators.mjs now owns report-validators.d.mts alongside the generated .mjs: --write regenerates both, --check fails on drift in either, so the declaration file can no longer diverge from the validators it types.
  • The fixture drift check now names the drifted JSON paths in its failure message instead of only saying "drifted".
  • The showcase fixture is regenerated with the current generator on a clean tree (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:check is 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:check included, runs locally via test:ci on the platform that produced the committed fixture — same class of local-only gate as pixel-rag:check, whose inputs live under the gitignored .cache/ (relates #59).

Verified

test:ci:portable and the full test:ci both green locally, git diff --exit-code -- viewer/dist-static clean, uv run pytest tests/test_showcase_fixture_provenance.py passes.

khive 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.
@ohdearquant
ohdearquant merged commit dee78b0 into main Aug 17, 2026
3 checks passed
@ohdearquant
ohdearquant deleted the ci/viewer-test-ci branch August 17, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant