docs(major2): steg 9 fullfoert - M38..M40 roede, K2-omkjoeringen maalt, last_ruling-paastanden rettet

M38 (attempts_remaining fra max_attempts alene) 2 roede - T3a og T5, som BEGGE
navngir M38 i sin docstring; M39 (drop --checkpoint-dir-nekten) 1; M40
(honoured=True ved revise-tid) 2. Sum: 41 kjoeringer, 40 roede, 1 groenn (M29).

K2-omkjoeringen (kriterium 8), instrumentet validert mot en kjent positiv foerst
(3 954 tegn / 1 495 tok, S7a-3s tall reprodusert eksakt): utforskningen 12
prompter / 18 355 tokens UENDRET til tokenet, debatt-promptene uendret i antall
OG stoerrelse, genererings-promptene 2 -> 4. Totalt 17 -> 19 prompter,
19 274 -> 19 776 tokens (+2,6 %). Utfallet flytter seg 200 000 -> 150 000 NOK og
dom-noekkelen be8535e2 -> f23ecff8; ekspertens ord staar ordrett i 2 av 6
proposer-prompter (0 av 4 i kontrollen).

generate.py: kommentaren paasto at `assert last is not None` ville fyrt uten
baereren. M29 maalte at den ikke KAN - D1(a) returnerer inne i loekka naar
remaining == 0, og paa siste forsoek er max_attempts - i - 1 alltid 0, saa halen
er naabar kun etter en validator-avvisning, som setter `last` ogsaa. Baereren er
uvitnet (budget_stop-presedensen), og det staar naa i kilden.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-09-05 20:39:52 +02:00
commit 74ea1dcf02
2 changed files with 132 additions and 27 deletions

View file

@ -535,10 +535,16 @@ async def generate_via_llm(
# rejection is about to inform a further attempt; it is never read back into a prompt.
fed_back: list[Rejection] = []
# The most recent ruling of EITHER kind. Before MAJOR-2 the exit rested on ``last``, which only
# a validator REJECTION sets -- so "validated -> revise" on every attempt reached the end of the
# loop with ``last is None`` and died on ``assert last is not None`` (and, under -O, on
# ``None.proposal``). The carrier is explicit, and D6 reads straight off it: whatever the
# validator ruled LAST is what the run carries, never a proposal the reviewer picked.
# a validator REJECTION sets. The plan predicted that "validated -> revise" on every attempt
# would therefore reach the end of the loop with ``last is None`` and die on
# ``assert last is not None``; MEASUREMENT FALSIFIED THAT (MAJOR-2 mutation M29 stayed GREEN
# against the whole suite). D1(a) RETURNS inside the loop when ``remaining == 0``, and on the
# final attempt ``max_attempts - i - 1`` is always 0 -- so the tail is reachable only after a
# validator REJECTION, which sets ``last`` too. This carrier is therefore UNWITNESSED (the
# ``budget_stop`` precedent): it stands because it makes D6 explicit and removes an assert that
# rested on a non-local invariant, not because a test holds it. D6 reads straight off it:
# whatever the validator ruled LAST is what the run carries, never a proposal the reviewer
# picked.
last_ruling: ValidatedProposal | Rejection | None = None
# The expert's STANDING instruction. Unlike ``last`` it is not cleared per attempt: it holds
# until the reviewer next answers, because a human's request survives one machine round trip.