docs(major2): invariantraden - eksperten svarer paa forslaget paa bordet, og svaret brukes

CLAUDE.md: en invariantrad etter verdict-gate-raden, i husets skjelett - nevneren
(grep "prior_" finner EN soem, maskinens egen), D6 og hvorfor alternativet ble
forkastet, den ledger-bevisste attempts_remaining, honoured = "hentet faktisk",
kanalvalget begrunnet av tre maalinger, den kaller-eide sinken, skriv-iff-reviewer,
de fem nektene ved navn og den hostede pre-whitelist-sjekken. Load-bearing-blokka
lister M1-M40 med roedtall, M29 staar som et FUNN (uvitnet baerer), og de to
armene som var groenne av feil grunn i steg 1-8 er skrevet ned som repoets
vakuoes-gate-klasse, sekstende og syttende gang. Aerlighets-grensene til slutt.

README.md: --proposal-review i enkeltprosjekt-flagglista og en prosablokk etter
--plan-review/--checkpoint-dir-paret, i samme form - hva operatoeren ser og
skriver, at en revise KJOEPER ett forsoek til under de eksisterende takene, at
approve ikke er en ekspertdom, og alle fem nektene navngitt (--checkpoint-dir-en
peker paa --resume, doera som VIRKER). Kundevendt vokabular.

Ny arm: test_the_readme_block_names_every_flag_the_cli_refuses_the_door_with,
Fase-3-formen (raa tekst, uttrukket blokk, kontroll paa at uttrekkeren finner noe
som finnes). Intet M-nummer - lista lukket ved M40 - saa den ble drevet ROED TO
ganger: mot README-en foer blokka fantes, og med blokka paa plass men
--checkpoint-dir omskrevet til aa beskrive nekten uten aa navngi flagget.

1364 passed / 5 skipped. Golden demo-transcript.stdout BYTE-UENDRET
(shasum -a 1 av INNHOLDET = ea8c534773acdbe41ae68f2c55724d69aaf8be4f). Node-ID-ene
er et strengt supersett: 1319 -> 1369, 0 fjernet. mypy og ruff rene.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-09-05 20:40:16 +02:00
commit 4a3655fc07
3 changed files with 211 additions and 1 deletions

View file

@ -1501,3 +1501,55 @@ def test_run_portfolio_takes_no_reviewer() -> None:
is the ``--portfolio`` partition's own reason — so a later "symmetry" edit must be a RED test,
not a silent widening."""
assert "proposal_reviewer" not in inspect.signature(run.run_portfolio).parameters
def test_the_readme_block_names_every_flag_the_cli_refuses_the_door_with() -> None:
"""The README-claim arm, in the Fase-3 form (``test_public_surface_claims_loadbearing``):
a claim the PUBLISHED surface makes about itself, read as RAW TEXT, because prose is the one
thing no behavioural test can see.
The door has five partner refusals. A README block that documents the door but omits one of
them sends a stranger into a refusal the page said nothing about the same drift the wheel
filename gate exists for, and the reason the handover gate matches names rather than prose.
The block is EXTRACTED (the ``--proposal-review`` prose block, from its bold heading to the
next bold heading) rather than substring-matched over the whole file, because ``--portfolio``,
``--report`` and ``--checkpoint-dir`` all appear elsewhere in the README for their own reasons
a whole-file check would be green on exactly the prose it is supposed to protect.
This arm carries no M-number: the M-list closed at M40. It was driven RED TWICE, because
"the block is missing" and "the block is incomplete" are different failures and only the
second is what this gate is for. (i) Written and measured against the README as it stood
BEFORE the block was added extraction found nothing, and ``assert block`` failed. (ii) With
the block in place, the ``--checkpoint-dir`` sentence was rewritten to describe the refusal
without NAMING the flag; the partner loop went red on its own. The control that the extractor
is not silently finding nothing is the ``--plan-review`` block at the end, which has existed
since F4.
"""
readme = (_REPO / "README.md").read_text(encoding="utf-8")
block = _readme_block(readme, "Answering the proposal review (`--proposal-review`)")
assert block, "the README must carry a --proposal-review prose block"
for partner in (
"--portfolio",
"--report",
"--live-dry-run",
"--proposals-from-mandate",
"--checkpoint-dir",
):
assert partner in block, f"the README block never names the refusal with {partner}"
assert "--resume" in block, "the --checkpoint-dir refusal must name the door that DOES work"
assert "OKF bundle" not in block, "customer-facing prose says knowledge base, never OKF bundle"
# CONTROL: the extractor finds a block that has existed since F4, so an empty result above is
# a missing block and not a broken extractor.
plan_block = _readme_block(readme, "Answering the plan review (`--plan-review`)")
assert plan_block and "enable_plan_review" in plan_block
def _readme_block(readme: str, heading: str) -> str:
marker = f"**{heading}.**"
start = readme.find(marker)
if start == -1:
return ""
nxt = readme.find("\n **", start + len(marker))
return readme[start : nxt if nxt != -1 else len(readme)]