test(propose): pin the default artifact with a committed golden
This commit is contained in:
parent
798f64ad6b
commit
c97e250f69
3 changed files with 140 additions and 0 deletions
24
tests/fixtures/README.md
vendored
24
tests/fixtures/README.md
vendored
|
|
@ -47,6 +47,30 @@ structurally valid input, silently reduced output, exit code 0 and no warning:
|
|||
the xlsx extracts with the sheet name intact and **every cell value gone**.
|
||||
The fixture therefore uses a `dimension` element and a shared string table.
|
||||
|
||||
## The proposer's default-profile golden
|
||||
|
||||
`propose-golden-default.json` is the artifact `tools/okf_propose_segments.py`
|
||||
produces for `OUTLINE_DOCUMENT` (defined in `tests/test_propose_segments.py`)
|
||||
with **no flags at all**, generated at commit `798f64a` with
|
||||
`--proposed-at 2026-09-03T00:00:00Z`. The timestamp is an explicit argument
|
||||
because the artifact carries it verbatim; a wall-clock default would make the
|
||||
golden unreproducible by construction.
|
||||
|
||||
**Why the fixture is `OUTLINE_DOCUMENT` and not `DOCUMENT`.** The golden exists
|
||||
to go red if any later rule is accidentally defaulted ON. `DOCUMENT` was
|
||||
measured to contain **zero** bare-integer lines, so a golden over it would stay
|
||||
byte-identical through exactly the regression it was named to catch -- a trap
|
||||
written down but unable to fire. `OUTLINE_DOCUMENT` carries a bare-integer
|
||||
ascending run of three, which today's rules do not match (measured: bare `1` /
|
||||
`1.` / `1)` yield 0 candidates), so the golden pins that absence and breaks the
|
||||
moment it stops being true.
|
||||
|
||||
**It transitively pins `observed_extractor_version`**
|
||||
(`src/llm_ingestion_okf/segmentation.py`): the field is written into every
|
||||
artifact, so a converter or extractor bump turns this golden red. That red is
|
||||
legitimate -- read the diff and decide, exactly as for the frozen PDF literal
|
||||
below. Regenerate only after that decision, never to make a red go away.
|
||||
|
||||
## Why the expected office text is frozen as a literal
|
||||
|
||||
The same reason as the PDF text below, with one addition: the literals are
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue