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:
parent
1e7345a401
commit
9d1f4b14ed
174 changed files with 1889 additions and 6512 deletions
|
|
@ -57,10 +57,8 @@ class Mutant:
|
|||
file: str
|
||||
old: str
|
||||
new: str
|
||||
#: How many times `old` must occur. A role map written twice on purpose
|
||||
#: (`_sts_role_xml`, `_sts_role_json`) has two, and the mutant edits the
|
||||
#: first -- the XML witness -- so the JSON one stays honest and row 5 has
|
||||
#: a chance to see the disagreement.
|
||||
#: How many times `old` must occur; `first_only` edits the first of them
|
||||
#: when a line is written more than once on purpose.
|
||||
occurrences: int = 1
|
||||
first_only: bool = False
|
||||
#: The test file this mutant is judged by. Defaults to the gate's own
|
||||
|
|
@ -251,8 +249,6 @@ MUTANTS: tuple[Mutant, ...] = (
|
|||
WITNESS,
|
||||
' if tag == "fn":\n return "footnote"',
|
||||
' if tag == "fn":\n return None',
|
||||
occurrences=2,
|
||||
first_only=True,
|
||||
),
|
||||
Mutant(
|
||||
"W04 xlsx: images never counted",
|
||||
|
|
@ -277,8 +273,6 @@ MUTANTS: tuple[Mutant, ...] = (
|
|||
WITNESS,
|
||||
' if tag in ("td", "th"):\n return "cell"',
|
||||
' if tag in ("td", "th"):\n return None',
|
||||
occurrences=2,
|
||||
first_only=True,
|
||||
),
|
||||
Mutant(
|
||||
"W08 docx: a header or footer is never counted",
|
||||
|
|
@ -286,12 +280,6 @@ MUTANTS: tuple[Mutant, ...] = (
|
|||
' count.add("header_footer", *lines)',
|
||||
" pass",
|
||||
),
|
||||
Mutant(
|
||||
"W09 sts json: the twin reuses the XML map",
|
||||
WITNESS,
|
||||
" role = _sts_role_json(tag, parent, grandparent)",
|
||||
" role = _sts_role_xml(tag, parent, grandparent)",
|
||||
),
|
||||
# PM's own mutant, written outside this file 2026-09-18 and SURVIVING 155
|
||||
# green tests (H2). B-1 gave the judge six refusals; this was the one
|
||||
# nothing held from either side.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue