llm-ingestion-okf/tools
Kjell Tore Guttormsen cb0c10b421 fix(retrieval-gate): the judge reads a passage as its exact reconstruction — M15 felled, row 7 15 of 15
Row 8's judge required every delivered text to be the whole concept's bytes
(the row-6 identity), which is older than v1.1 C1: an excerpt `as_passage` cut
to its answering passage was class e even when its span carried the citation.
PM's re-measurement of e503f6a found that the dominant miss class of row 8 on
the real set.

`passage_span` accepts a passage only when the delivered text IS what the
bundle's bytes rebuild: the span is body[start:end] byte for byte in the
DELIVERED body (the offsets land a frontmatter's length off in the file), `of`
is that body's length, `[...]` stands exactly where text is left out, and the
one other line allowed is a heading line of the body above the span, or a
prefix of one. The citation is read in the span alone. A passage that is not
its reconstruction is class e with its own detail. A quote only in the heading
or the markers is class d.

Chose to check that the heading is one of the body's own heading lines above
the span, and not to re-derive WHICH heading `as_passage` picks, because the
guarantee is "the bundle's bytes"; the nearest-heading rule is the product's
presentation and a judge that copies it agrees by construction.

M15 (a passage carrying one sentence the file does not) is row 7's fifteenth
mutant. No synthetic concept was long enough to be cut, so a new fixture
delivers one (DELIVERY, ~6 600 characters, set set-passage.json); the corpus
pin moved with it. MUTANT_BAR unchanged, src/ untouched.

Gate, synthetic: rows 1 and 6 13/13 -> 14/14, row 7 14/14 -> 15 of 15 GREEN
(M15 -> row 1, 6), rows 2/3/4 unchanged, GATE RED: rows 5, 8. Row 8 rerun on
the real set: no class e miss remains (its numbers are kept out of this public
history, per the wiki directive). Suite after git add,
FORCE_COLOR unset: 2450 passed, 1 skipped (+6). ruff, format, mypy --strict
clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-22 23:53:09 +02:00
..
okf_accounting_gate.py test(gates): retire the K2 track; re-measure the retrieval gate's premises for BM25 2026-09-21 10:05:43 +02:00
okf_asset_census.py feat(assets): every carried image is one a model can be shown 2026-09-19 08:07:04 +02:00
okf_cid_measure.py chore(ruff): the acceptance was whatever the default happened to be [skip-docs] 2026-09-09 23:15:17 +02:00
okf_consume.py chore(ruff): the acceptance was whatever the default happened to be [skip-docs] 2026-09-09 23:15:17 +02:00
okf_consume_measure.py feat(consume): the withheld set is counts plus names, not one entry per concept 2026-09-20 23:32:22 +02:00
okf_contract_check.py chore(ruff): the acceptance was whatever the default happened to be [skip-docs] 2026-09-09 23:15:17 +02:00
okf_corpus_run.py chore(ruff): the acceptance was whatever the default happened to be [skip-docs] 2026-09-09 23:15:17 +02:00
okf_fidelity.py chore(ruff): the acceptance was whatever the default happened to be [skip-docs] 2026-09-09 23:15:17 +02:00
okf_gate_mutants.py test(mutants): the cursor rule's row clause and the end-of-line clause get a mutant each 2026-09-19 22:57:50 +02:00
okf_mcp_gate.py feat(mcp): serve OKF bundles over MCP in two shapes, plus the generic skill 2026-09-20 10:25:55 +02:00
okf_outline_measure.py chore(ruff): the acceptance was whatever the default happened to be [skip-docs] 2026-09-09 23:15:17 +02:00
okf_propose_segments.py chore(ruff): the acceptance was whatever the default happened to be [skip-docs] 2026-09-09 23:15:17 +02:00
okf_retrieval_gate.py fix(retrieval-gate): the judge reads a passage as its exact reconstruction — M15 felled, row 7 15 of 15 2026-09-22 23:53:09 +02:00
okf_skill.py chore(ruff): the acceptance was whatever the default happened to be [skip-docs] 2026-09-09 23:15:17 +02:00
okf_soek_gate.py test(soek): a red search gate measuring what the asker RECEIVES, one exit code 2026-09-21 04:03:11 +02:00
okf_table_measure.py chore(ruff): the acceptance was whatever the default happened to be [skip-docs] 2026-09-09 23:15:17 +02:00
okf_watch.py feat(watch): weekly OKF upstream watch that can prove it found nothing 2026-08-23 20:38:37 +02:00
okf_witness.py fix(docs): N101 ships 568 tbx: tags, not 574 2026-09-19 08:35:50 +02:00