test(fixtures): replace sector-specific example material with generic, fictitious examples — green

Every fixture, test document, tool example and document now uses an invented
kitchen-and-baking handbook series, written in this repository. The package's
behaviour is unchanged; src/ changes are comments and help text only.

- Generated fixtures are regenerated from their generators. Their structural
  counts are identical before and after: elements, images, rows, cells,
  headings, bookmarks and the witness inventory's per-document totals. The
  image-inbox and accounting documents are renamed kapittel-84-*.
- tools/okf_accounting_gate.py: the two options that named one real corpus
  each are replaced by a generic, repeatable --corpus PATH with no default.
  Row 5 compares the PDF pair alone. Gate verdict unchanged: RED rows 2, 3, 6.
- tools/okf_witness.py: the STS JSON reader for one publisher's delivery is
  removed, along with its three twins and five tests. The mutation harness
  loses W09.
- docs/: 13 dated reports that documented runs on a retired reference corpus
  are removed, and 40 are neutralized. Dead links are removed, and no new
  dangling path is introduced.
- The synthetic MCP-gate corpus and the residual probe words are neutral.

Valgt: keep the `okf quality --fasit` bar value (the measured fraction, one corpus) and
rewrite only its provenance, because the verdict stays unchanged and the
number names nothing.

Term check with the local list: 0 of 411 tracked files, 0 file names, 0 of
27 binary fixtures. Suite after git add: 2457 passed, 1 skipped. The base
tree had 2460 passed and 2 skipped; five tests went with the JSON reader and
four were added by the term check. ruff, ruff format and mypy --strict src/
are clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-09-23 13:54:57 +02:00
commit 9d1f4b14ed
174 changed files with 1889 additions and 6512 deletions

View file

@ -1,8 +1,9 @@
"""`okf quality` -- the per-file-type verdict, and what it refuses to say.
`okf check` is a CONTRACT check: it asks whether a payload carries what a claim
must rest on. Measured 2026-09-10 by `vegnormal-okf`, it returned 0 findings and
exit 0 on three arms over one corpus whose hit@k ranged from 6 of 6 to 0 of 6.
must rest on. Measured 2026-09-10 by a downstream consumer repository, it
returned 0 findings and exit 0 on three arms over one corpus whose hit@k ranged
from 6 of 6 to 0 of 6.
This module is the other question -- did the cut find anything worth reading --
and its whole discipline is that it answers it PER FILE TYPE, with the
denominator printed, and never answers PASS for a type it has no measurement
@ -108,7 +109,7 @@ def test_a_healthy_type_without_a_threshold_is_unmeasured_and_never_pass(
def test_concepts_without_a_source_file_are_unmeasured(tmp_path: Path) -> None:
"""The shape three of the four evidence corpora arrive in.
`n100-2023`, `n200-2024` and `n500-2024` carry `source_file` on 0 of 446,
Three bundles built by another producer carry `source_file` on 0 of 446,
0 of 1 133 and 0 of 270 concepts, so a per-file-type gate has no type to
speak about. Measured 2026-09-12; the gate says so instead of passing them.
"""
@ -190,7 +191,7 @@ def test_every_threshold_names_the_corpus_and_the_denominator_it_was_read_off()
def test_a_rate_over_too_few_documents_is_not_a_rate(tmp_path: Path) -> None:
"""FOUND BY RUNNING THE GATE, not by reading it.
`~/repos/vegnormal-okf/build/sk2-bundle-default` is one PDF cut into 2 182
A downstream consumer's default build of one reference PDF is cut into 2 182
concepts. Against the 32-document reference its one-concept share is 0 of 1,
which the first version of this rule read as PASS -- a verdict resting on a
denominator of one, which is the exact failure `MIN_DOCUMENTS_FOR_A_THRESHOLD`
@ -271,9 +272,9 @@ def test_the_normalisation_reproduces_the_fasit_key() -> None:
Measured over the shipped fasit before anything was written: 2 761 of 2 761
rows reproduce, and the real file pins it below where it exists.
"""
assert quality.normalise_title(" 2.1 Hoved Prosesser\n") == "2.1hovedprosesser"
assert quality.normalise_title("1Bruksområder for Prosesskoden") == (
"1bruksområderforprosesskoden"
assert quality.normalise_title(" 2.1 Hoved Kapitler\n") == "2.1hovedkapitler"
assert quality.normalise_title("1Bruksområder for Oppskriftsboka") == (
"1bruksområderforoppskriftsboka"
)