fix(b-gate): a probe is bound to its step, a reason cannot be empty, and the row's limit is what was measured [skip-docs]

Row 1 goes 3 of 17 -> 0 of 17. Nothing was removed from the product and no row
changed colour; the three that counted stopped counting because the contract they
satisfied was satisfiable without capability.

BEARING 1 -- the probe is bound to the step, and the binding is MEASURED in the
probe's own source. Chosen: read the probe (ast) rather than demand it live in a
contract-named file, because a file name is a convention a stub meets as easily as a
real probe. Three traits, each measured: it drives the DOOR (the dotted module or the
registered command name appears as a string it uses -- anywhere but a docstring,
because the honest form assembles argv in a variable first), it names the STEP (the
symbol, id or subcommand as a whole WORD in what it passes INTO a call or calls), and
it asserts at all. A probe claimed by two steps proves at most one and the gate cannot
tell which -- so neither.

Two traps found while measuring, both closed:
  - substring: "gate" is not named by portfolio_optimiser.evals.v1_gate
  - local alias: the first cut accepted step `gate` because the probe file imports the
    module AS `gate`. Names are therefore read only where they are sent or called.

What that costs, measured against the contract that stands:
  rundebinding  drives the door, names no step         (was green)
  rapport       never goes through the door at all     (was green)
  gate          drives the door, names no step         (was green)

BEARING 2 -- the limit statement said exactly TWO ways remained; the checkpoint
planted 21 call forms and measured SIX. Four are closed with a guard each (the
official Python SDK in both spellings, the node and uv runners, a dynamic import);
three remain and are now named: a runtime-composed name, a name from an environment
variable, a base64-decoded name. Left open deliberately -- the encodings are not
enumerable and our own contract stores base64 by design. Row 3: 9 of 9 -> 12 of 12,
still GREEN, 0 hits over 512 files. One of the three caught a command written in this
round's own test docstring; it was rewritten, not exempted.

BEARING 3 -- held_out accepted an EMPTY reason and shrank the denominator, while the
summary said "held out with a reason" either way. A blank reason is no reason: the
symbol stays in the denominator as a call without a door, the summary counts reasons,
and the four steps declared OUTSIDE the run path are now named one by one as having no
derived source instead of being counted in silence.

Five small rests, closed: a pruned manifest (451 of 512 was still GREEN) is now NOT
MEASURED, one sentinel per area the old handlist missed; a non-UTF-8 file is read as
byte text instead of counted and skipped; a symlink out of the tree is named and
fails the row; a runbook whose whole content is "x" no longer passes, the contract
names its sections; and the row states that its ratio is not a coverage measure.

Two stated, not closed, each with its reason in the row's own attestation: a po call
moved one floor down into a helper leaves the denominator (following helpers would
pull private ones in and make the denominator the curated list this row exists to
avoid), and row 3's k/n can still be padded by a guard with no measured escape behind
it. The ledger's two precision errors are corrected: "no row became greener" is true
of colour, not of numbers, and ENTRY_KINDS has three arts, not four.

Suite: 2172 passed, 5 skipped, 5 xfailed in 645 s. ruff and mypy clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-09-19 21:48:44 +02:00
commit 9eec31b7da
Signed by: ktg
SSH key fingerprint: SHA256:JakMjO6FTBBzN0Bhfj9saOoEjaFxlSdYuZQQpM/lF9Q
4 changed files with 441 additions and 73 deletions

View file

@ -417,7 +417,13 @@
},
"no_claude_path": {
"manifest": {
"sentinel": "src/portfolio_optimiser/run.py",
"sentinels": [
"src/portfolio_optimiser/run.py",
"main.py",
"examples/ingest-golden-file/expected-bundle/index.md",
"spikes/__init__.py",
"contexts/dekke-og-kontrakt-lindaas-2027/bundle.txt"
],
"skip_dirs": [
".git",
"__pycache__",
@ -493,6 +499,27 @@
"pattern_b64": "PVxzKlsiJ10oPzpbXiInXHNdKi8pP2NsYXVkZVsiJ10=",
"known_positive_b64": "Q0xBVURFX0JJTiA9ICIvdXNyL2xvY2FsL2Jpbi9jbGF1ZGUi",
"known_negative_b64": "TU9ERUxMID0gImNsYXVkZS1vcHVzLTUi"
},
{
"id": "sdk-anthropic",
"label": "import av den offisielle Anthropic-SDK-en",
"pattern_b64": "XlxzKihmcm9tfGltcG9ydClccythbnRocm9waWNcYg==",
"known_positive_b64": "aW1wb3J0IGFudGhyb3BpYw==",
"known_negative_b64": "aW1wb3J0IGFudGhyb3BpY19ub3Rlcw=="
},
{
"id": "node-runner",
"label": "claude-code startet av en node- eller uv-kjoerer",
"pattern_b64": "KG5weHx1dnh8YnVueHxwbnBtXHMrZGx4KVxiWyInXHMsXSsoLXsxLDJ9XHdbXHctXSpbIidccyxdKykqWyInXT8oQGFudGhyb3BpYy1haS8pP2NsYXVkZS1jb2RlXGI=",
"known_positive_b64": "bnB4IEBhbnRocm9waWMtYWkvY2xhdWRlLWNvZGUgLXAgImFuYWx5c2VyIg==",
"known_negative_b64": "bnB4IHByZXR0aWVyIC0td3JpdGUgLg=="
},
{
"id": "dynamisk-import",
"label": "dynamisk import av en Claude-klient",
"pattern_b64": "X19pbXBvcnRfX1woXHMqWyInXShjbGF1ZGVfYWdlbnRfc2RrfGNsYXVkZV9jb2RlX3Nka3xhbnRocm9waWMpWyInXQ==",
"known_positive_b64": "X19pbXBvcnRfXygiY2xhdWRlX2FnZW50X3NkayIp",
"known_negative_b64": "X19pbXBvcnRfXygiYWdlbnRfZnJhbWV3b3JrIik="
}
]
},
@ -557,6 +584,13 @@
"attestering"
],
"path": "docs/kjoerebok-verktoeykassen.md",
"sections": [
"Forutsetninger",
"Kommandoene",
"En hel analyse, steg for steg",
"Naar noe feiler",
"Hva gaten ikke beviser"
],
"attestation": "v1-rounds/kjoerebok-attestering.txt",
"keys": [
"kjørebok",