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

@ -8,8 +8,8 @@ score, that signal's contribution to the fusion is the concepts' own ids in
lexicographic order: a UUID, which is noise, weighted exactly as heavily as
the two signals that did the measuring.
MEASURED 2026-09-08 on the N500 bundle (270 concepts, `feae0c8`), for the
question about `vann- og frostsikring` in a subsea tunnel: the document prior
MEASURED 2026-09-08 on a 270-concept third-party bundle (`feae0c8`), for a
question about `vann- og fuktsikring` in a buried cellar: the document prior
has **two** distinct values over the bundle, and 269 concepts share one of
them. The best covering concept answered **7 of 7** question tokens and led
the body signal at rank 6, and it fused to rank **14** -- outside the cut --
@ -35,7 +35,7 @@ sys.path.insert(0, str(PROJECT_ROOT / "tools"))
import okf_consume # noqa: E402
QUESTION = "Hvilke krav gjelder vann- og frostsikring i undersjoeisk tunnel?"
QUESTION = "Hvilke krav gjelder vann- og fuktsikring i nedgravd kjeller?"
_FRONTMATTER = (
"---\ntype: reference\ntitle: {title}\nsource_file: {slug}.md\n"
@ -51,7 +51,7 @@ def _tie_bundle(root: Path, *, fillers: int = 30) -> Path:
The gold concept's id sorts LAST and the fillers' ids sort first, which is
what makes the degenerate signal's tie-break work against the concept that
answers the question. The fillers answer `krav`, `gjelder`, `vann` and
`tunnel`; only the gold answers `frostsikring` and `undersjoeisk` too.
`kjeller`; only the gold answers `fuktsikring` and `nedgravd` too.
"""
(root / "krav").mkdir(parents=True)
(root / "index.md").write_text(
@ -69,14 +69,14 @@ def _tie_bundle(root: Path, *, fillers: int = 30) -> Path:
add(
"zz-gull",
"Krav om vann- og frostsikring i undersjoeisk tunnel",
"Kravet gjelder vannsikring og frostsikring i undersjoeisk tunnel.\n" * 4,
"Krav om vann- og fuktsikring i nedgravd kjeller",
"Kravet gjelder vannsikring og fuktsikring i nedgravd kjeller.\n" * 4,
)
for number in range(1, fillers + 1):
add(
f"aa-{number:02d}",
f"Krav om tunnel og vann {number:02d}",
"Kravet gjelder tunnel og vann i anlegget.\n" * 4,
f"Krav om kjeller og vann {number:02d}",
"Kravet gjelder kjeller og vann i anlegget.\n" * 4,
)
(root / "krav" / "index.md").write_text("".join(entries), encoding="utf-8")
return root
@ -108,8 +108,8 @@ def test_the_hyphen_and_og_coordination_is_already_resolved_by_the_tokeniser() -
# CHARACTERISATION, green on HEAD. This is the measurement that ruled the
# tokeniser out as the site of the fix: there is no coordination left to
# resolve, so a rule widening it could not have moved the miss.
assert okf_consume.normalise("vann- og frostsikring") == ("vann", "frostsikring")
assert okf_consume.tokens_match("frostsikring", "frostsikringen")
assert okf_consume.normalise("vann- og fuktsikring") == ("vann", "fuktsikring")
assert okf_consume.tokens_match("fuktsikring", "fuktsikringen")
assert okf_consume.tokens_match("vann", "vannsikring")