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

@ -138,7 +138,7 @@ def test_a_type_with_no_reader_is_refused_rather_than_scored_zero(tmp_path: Path
SLIDE_XML = """<?xml version="1.0"?>
<p:sld xmlns:a="a" xmlns:p="p"><p:cSld><p:spTree>
<p:sp><p:txBody><a:p><a:r><a:t>Kravspesifikasjon for tunnel</a:t></a:r></a:p></p:txBody></p:sp>
<p:sp><p:txBody><a:p><a:r><a:t>Kravspesifikasjon for kjeller</a:t></a:r></a:p></p:txBody></p:sp>
<p:graphicFrame><a:tbl><a:tr>
<a:tc><a:txBody><a:p><a:r><a:t>Navn tilbyder:</a:t></a:r></a:p></a:txBody></a:tc>
<a:tc><a:txBody><a:p><a:r><a:t>Entreprenoer AS</a:t></a:r></a:p></a:txBody></a:tc>
@ -149,7 +149,7 @@ SLIDE_XML = """<?xml version="1.0"?>
CONTENT_XML = """<?xml version="1.0"?>
<office:document-content xmlns:office="o" xmlns:text="t" xmlns:table="tb">
<office:body><office:text>
<text:h text:outline-level="1">Kravspesifikasjon for tunnel</text:h>
<text:h text:outline-level="1">Kravspesifikasjon for kjeller</text:h>
<table:table><table:table-row>
<table:table-cell><text:p>Navn <text:span>tilbyder</text:span>:</text:p></table:table-cell>
<table:table-cell><text:p>Entreprenoer AS</text:p></table:table-cell>
@ -159,7 +159,7 @@ CONTENT_XML = """<?xml version="1.0"?>
RTF_STREAM = (
"{\\rtf1\\ansi\\deff0{\\fonttbl{\\f0\\froman Times New Roman;}}\n"
"\\pard Kravspesifikasjon for tunnel\\par\n"
"\\pard Kravspesifikasjon for kjeller\\par\n"
"\\trowd\\cellx3000\\cellx6000\n"
"\\pard\\intbl Navn tilbyder:\\cell \\pard\\intbl Entrepren\\u248 ?r AS\\cell \\row\n"
"}"
@ -189,7 +189,7 @@ def rtf(tmp_path: Path) -> Path:
def test_a_presentations_slide_text_is_read(tmp_path: Path) -> None:
"""One string per `a:p`, table cells included -- a cell is a paragraph."""
assert set(okf_fidelity.source_strings(pptx(tmp_path))) == {
"kravspesifikasjon for tunnel",
"kravspesifikasjon for kjeller",
"navn tilbyder:",
"entreprenoer as",
}
@ -198,7 +198,7 @@ def test_a_presentations_slide_text_is_read(tmp_path: Path) -> None:
def test_an_odf_bodys_paragraphs_are_read(tmp_path: Path) -> None:
"""Headings count, and a run split across a `text:span` is still one string."""
assert set(okf_fidelity.source_strings(odt(tmp_path))) == {
"kravspesifikasjon for tunnel",
"kravspesifikasjon for kjeller",
"navn tilbyder:",
"entreprenoer as",
}
@ -207,7 +207,7 @@ def test_an_odf_bodys_paragraphs_are_read(tmp_path: Path) -> None:
def test_an_rtf_streams_paragraphs_and_cells_are_read(tmp_path: Path) -> None:
"""The control words are markup; the text between them is the document."""
assert set(okf_fidelity.source_strings(rtf(tmp_path))) == {
"kravspesifikasjon for tunnel",
"kravspesifikasjon for kjeller",
"navn tilbyder:",
"entreprenør as",
}