llm-ingestion-okf/tools
Kjell Tore Guttormsen 90cc463cd9
fix(retrieval-gate): row 5 reads ~/ paths, refuses absolute ones and checks the bundle's tree ref
The committed hold-out registration carried two absolute paths of the machine
it was written on, in a public repository, and its `bundle_ref` was read by no
line: other bytes at the registered bundle path would have been measured as
the registered bundle.

- A registered path must be `~/...` and is expanded when read; an absolute or
  otherwise relative path is a NO with its reason and is never followed.
- A twelfth check, "the bundle is the registered tree", measures the bundle
  with `consume.bundle_ref` against the pinned ref; a mismatch, an absent
  bundle or no pinned ref is a NO, and the hold-out is then NOT run.
- An absent set is reported with its registered `~/` path.

Chose `~/` over an environment variable because the file then explains
itself and the gate needs no extra setup. The change is in
`tools/okf_retrieval_gate.py` only; `src/` is untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 10:24:21 +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): row 5 reads ~/ paths, refuses absolute ones and checks the bundle's tree ref 2026-09-23 10:24:21 +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