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

@ -32,28 +32,28 @@ OUT = HERE / "k2-office"
#: containers would enter that run and the denominator would stop being three.
RTF_OUT = HERE / "k2-rtf-variants"
TITLE = "Kravspesifikasjon for tunnelbelysning"
INTRO = "Dokumentet samler kravene til belysning i vegtunneler over 500 meter."
TITLE = "Kravspesifikasjon for kjøkkenbelysning"
INTRO = "Dokumentet samler kravene til belysning i storkjøkken over 500 kvadratmeter."
# The pairing table. Every label ends in a colon, which is the rule
# `okf_fidelity.label_value_rows` selects on -- so these twenty rows ARE the
# pairable denominator, and a converter that drops a value or breaks a row over
# two output lines shows up as a fall from 20.
PAIRS: tuple[tuple[str, str], ...] = (
("Dokumentnummer:", "SVV-2026-0417"),
("Tittel:", "Tunnelbelysning i hovedløpet"),
("Ansvarlig avdeling:", "Utbyggingsdivisjonen"),
("Dokumentnummer:", "EKS-2026-0417"),
("Tittel:", "Kjøkkenbelysning i hovedsalen"),
("Ansvarlig avdeling:", "Kjøkkendivisjonen"),
("Fagområde:", "Elektro og belysning"),
("Versjon:", "2.3 godkjent"),
("Gyldig fra:", "01.03.2026"),
("Erstatter:", "SVV-2024-0188"),
("Tunnellengde:", "1240 meter"),
("Dimensjonerende fart:", "80 km/t"),
("Årsdøgntrafikk:", "12400 kjøretøy"),
("Erstatter:", "EKS-2024-0188"),
("Salens lengde:", "42 meter"),
("Dimensjonerende gjester:", "80 kuverter"),
("Årsproduksjon:", "12400 porsjoner"),
("Terskelluminans:", "145 candela"),
("Overgangssone:", "Tre trinn nedtrapping"),
("Innerstrekning:", "3,0 candela"),
("Utkjøringssone:", "Ingen forsterkning"),
("Innerste sone:", "3,0 candela"),
("Utgangssone:", "Ingen forsterkning"),
("Fargetemperatur:", "4000 kelvin"),
("Fargegjengivelse:", "Ra større enn 70"),
("Nødbelysning:", "60 minutter drift"),
@ -70,7 +70,7 @@ PAIRS: tuple[tuple[str, str], ...] = (
# empty `\\pard\\par` left the converter joining the 2-column rows and the
# 4-column rows into a single four-column table, so the grid stopped being a
# second table at all.
GRID_CAPTION = "Luminansmatrise per trafikklasse"
GRID_CAPTION = "Luminansmatrise per romklasse"
GRID: tuple[tuple[str, ...], ...] = (
("Sone", "Klasse A", "Klasse B", "Klasse C"),
@ -342,9 +342,11 @@ def _rtf_row(row: tuple[str, ...]) -> str:
# is, not how much text survives -- variant A already carries the coverage and
# fidelity counts for the container.
RTF_VARIANT_TITLE = "Kravspesifikasjon for tunnelbelysning"
RTF_VARIANT_SECTION = "Luminanskrav per trafikklasse"
RTF_VARIANT_BODY_ONE = "Dokumentet samler kravene til belysning i vegtunneler over 500 meter."
RTF_VARIANT_TITLE = "Kravspesifikasjon for kjøkkenbelysning"
RTF_VARIANT_SECTION = "Luminanskrav per romklasse"
RTF_VARIANT_BODY_ONE = (
"Dokumentet samler kravene til belysning i storkjøkken over 500 kvadratmeter."
)
RTF_VARIANT_BODY_TWO = "Terskelluminansen er 145 candela og gjelder i hele overgangssonen."
#: The bold RUN in `-fet-i-avsnitt`, set inside a sentence that continues past
#: it. Authored as emphasis, never as a title.
@ -376,7 +378,7 @@ def rtf_bold_inside_paragraph_bytes() -> bytes:
+ "\\b "
+ _rtf_escape(RTF_VARIANT_EMPHASIS)
+ "\\b0 "
+ " fra byggherren for arbeidet starter."
+ " fra kjokkensjefen for arbeidet starter."
)
return _rtf_document(
[