Make the "structure-true best effort" fidelity contract (ADR 0009) an
objective, pipeline-gated suite so "best effort" cannot erode silently.
- New CI job "Import/export fidelity gate" (.gitea/workflows/ci.yml) runs
the corpus suites against the pinned sidecar images the stages use
(pandoc/core:3.6, gotenberg/gotenberg:8), started via docker run and
reached over the host gateway. Small and separate so it stays well under
five minutes; the suites self-skip in the main checks job (no sidecars).
- Export fidelity: fixtures/export corpus + gen-export-fixtures.mjs +
export.fidelity.test.ts — exports Markdown to docx/odt through the real
pinned pandoc and reads it back, snapshotting the round trip so a writer
drift (ours or a version bump) fails the gate.
- PDF smoke: pdf.fidelity.test.ts renders a page through real Gotenberg and
asserts the extracted text and a sane page count (pdf-parse, dev-only).
- Fidelity contract doc: fixtures/README.md defines "corpus green = fidelity
acceptable" and the fixture-first bug process; per-corpus READMEs updated.
Because the snapshots are byte-exact and generated with the pinned tools,
bumping a sidecar without regenerating shifts the output and fails the suite
(AC3). The import corpus (#63) is folded into the same gate.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EwZ4jR4KFAPvpjWevfUGX1