Skip to content

LOOK obligations: per-section PROOF-OF-LOOK freshness (#155), final-look proof/stamp/due-stage, no LOOK row kind (#68) - #321

Closed
MendixMau wants to merge 3 commits into
masterfrom
fix/proof-of-look-sections
Closed

MendixMau wants to merge 3 commits into
masterfrom
fix/proof-of-look-sections

Conversation

@MendixMau

@MendixMau MendixMau commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

#155 (remainder): each PROOF-OF-LOOK line is checked against its own section's VALID AT

Problem. Master already reads the newest VALID AT anywhere in the file. That newest stamp meant the last one in the file (tail -1). _ob_look_proof_broken then compared every PROOF-OF-LOOK: screenshot with that one stamp. A review file kept as a headline plus dated addenda therefore FAULTed: the first section's honest shots read "older than VALID AT". An addendum written above the original stamp also went STALE.

Choice: section-aware, not "one report per pass". The field report in #155 shows people keep one file with addenda. The warn-on-multiple-stamps option would also need a module-review.md sentence, and that file is owned by another PR. Section-aware fits how reports are actually written and needs no skill text. A stale shot inside any section still FAULTs.

Fix (bin/lib/obligation-check.sh).

  • Stamps and citations are read in file order, as one token stream, so one-line HTML works too.
  • Each citation belongs to the nearest stamp above it. A citation above every stamp belongs to the first (headline) stamp.
  • _ob_stale uses the stamp with the newest commit time. If any stamp does not resolve (squash, rebase, shallow clone), it falls back to master's last-in-file stamp, which is then unmeasured, so the result is never a false STALE.

Fixture. test-obligation-valid-at.sh:

  • T3b: an unresolvable stamp falls back to the last stamp in the file. It fails on the PR's first head.
  • T4: sectioned report → PASS.
  • T5: stale shot in section 1 → FAULT (control).
  • T6: addendum shot older than the addendum's stamp → FAULT.
  • T7: one-line HTML → PASS.
  • T8: addendum written above the original stamp → not STALE.

On master T4, T7 and T8 fail. With the fix, 9/9 pass.

Not done. Per-page staleness (a page is stale only when its own latest proof predates its own last model change). The checker has no page→file mapping, and the Stage 5 look-ledger already tracks pages one by one.

Review of merged #303: final-look

  1. NOT YET DUE applies to final-look only, and only when ## Current stage is gate-check's own derived readout (the line contains "(derived by gate-check"). A hand-written or scaffold line counts as unreadable, so the row stays owed. Every other obligation keeps master's verdict exactly. (From the review of this PR: hand-written lines disagree with the gates in 8 of 12 field projects, the scaffold line often never advances, and an early stale FAIL holds the derived readout back.)
  2. _ob_look_proof_broken now runs for look|final-look, as module-review.md § "The final LOOK" requires.
  3. A final-look report without VALID AT is FAULT ("NO VALID AT"). Without a stamp it could never go stale.

Fixture. test-obligation-final-look.sh:

  • T4/T5 now carry a real proof line.
  • T6: no proof → FAULT.
  • T7: no stamp → FAULT.
  • T8: derived Stage 5 readout → NOT YET DUE.
  • T9: derived Stage 6, all gates passed, or an unreadable line → owed.
  • T10: hand-written lines → owed.
  • T11: scaffold line with a module open → owed. Every other obligation line is identical with and without the register, and skeleton is still owed under a derived Stage 3 readout.

On master 3 fail. On the PR's first head 5 fail. Now 17/17 pass.

#68 (+ #188 item 6): no LOOK row kind

Decision: not needed. Whether a look happened is already recorded, and gate-check counts it:

  • the look obligation (report, denominator, VALID AT, PROOF-OF-LOOK per page);
  • the fidelity obligation;
  • the Stage 5 look-ledger.

A LOOK kind with a hand-settable State cell would be a second record of the same fact, which is the risk #68 itself names. The rationale paragraph sits next to the Kind list in skills/brd-to-build-plan.md, which is on-demand (0 baseline words added). I propose closing #68. Note: that skill is stage-mapped, so projects get a stale-protocol-ack notice.

Checks run

  • Fixtures: valid-at 9/9, final-look 17/17, obligation-fidelity 6/6, look-ledger 11/11, bug03-gates 31/31, design-reaches-app 43/43, retest-obligation-newest-report PASS.
  • check-scripts, check-pr-discipline, check-portability, check-no-private-citations, leak guard, render-routing --check (79,997 baseline words, unchanged): all clean.
  • Denylist grep over added lines: 0 hits.

Field run

Still owed. The checker is proven by fixtures only. #155's field report (a requirements-driven build, 2026-09-26) is the motivation, but that report is private, so no captured real report was available. The fixtures rebuild the shapes it describes by hand.

Closes #155
Refs #68 #188

🤖 Generated with Claude Code

https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw

…by commit time (#155); no LOOK row kind (#68)

obligation-check.sh: a review file with dated addenda FAULTed because every
proof line was compared with the single newest stamp. A citation now belongs
to the nearest stamp above it (headline's if above all). _ob_stale picks the
stamp with the newest commit time, not the last one in the file.

brd-to-build-plan.md: rationale for not adding a LOOK kind next to the Kind list.

Fixture: tests/wave2/test-obligation-valid-at.sh T4-T8 (3 fail on master).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
…OT YET DUE before their stage

From an independent review of #303. obligation-check.sh compared from-stage
only with --adopt, so final-look (stage 6) read PENDING from Stage P. A
project/cluster row above the register's Current stage now reads NOT YET DUE
(module rows unchanged; an unreadable stage line keeps the old owed verdict).
The PROOF-OF-LOOK check now covers final-look as module-review.md requires,
and an unstamped final-look report is FAULT (it could never go stale).

Fixture: tests/wave2/test-obligation-final-look.sh T4-T10 (4 fail on master).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
…ed readout; unresolvable stamp falls back to last-in-file

- NOT YET DUE now applies to final-look alone, and only when the Current
  stage line is gate-check's own derived readout. Hand-written and scaffold
  lines read as unreadable, so the row stays owed. Every other obligation
  keeps master's verdict.
- _ob_newest_stamp: if any VALID AT stamp does not resolve (squash, rebase,
  shallow clone), use the last stamp in the file as master did. Before, the
  older resolvable stamp won and the report read STALE.
- CHANGELOG: cite #155's field report as the motivation and say the checker
  is proven by fixtures only.

Fixtures: valid-at T3b; final-look T9-T11 (each fails on the previous head).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
MendixMau pushed a commit that referenced this pull request Oct 13, 2026
…ved Stage 6 (closes #155, refs #68 #188)

Review: MERGE (after fix round + confirmation) — NOT YET DUE limited to final-look under gate-check's derived stage readout; master vs head on 9 register states: every other obligation line byte-identical; unresolvable stamp falls back to master behaviour.
MendixMau pushed a commit that referenced this pull request Oct 13, 2026
…, PROOF-OF-LOOK addenda

- testing-shape.md: the #274 box keeps its failure examples (other
  modules' journeys, reviewer re-runs, full mxcli test at batch close; a
  caption change owes one journey and one look) and names the unset Unit
  default, so §2's pointer lands on it; module close again names "the
  module's whole journey set".
- intake Q13 (bin/lib/intake-template.sh): the anecdote is one clause
  pointing at #274. --repair-intake matches the question by its heading,
  unchanged; test-bug12-sync.sh passes.
- skills/ui-loop.md: the restart pointer names dispatching.md.
- module-review.md: PROOF-OF-LOOK addenda rule (nearest stamp above, stale
  only past the newest stamp by commit time) and the final LOOK's
  VALID AT / per-page proof / derived-stage-6 requirements, matching
  PR #321's obligation-check.sh.

Refs #274 #288

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
MendixMau pushed a commit that referenced this pull request Oct 13, 2026
…heading)

- NEXT drops final-look only, and only when the stage line is gate-check's
  derived readout below its from-stage, reading the FIRST "Stage N" (mirrors
  #321's NOT YET DUE). Module passes owed under a lagging or hand-written
  line stay in NEXT.
- existing-app-change drops only the "agent slots unfilled" WATCH item;
  done- signals and the agent-stub NEXT rule stay (Stages 5-6 run the build
  loop unchanged in that mode).
- "## Rounds" heading anchored, so "## Rounds of review" is not read.

Fixture: 27/27; 11 fail on master, T9d fails on a last-Stage mutant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
MendixMau pushed a commit that referenced this pull request Oct 13, 2026
…tradictions, Dispatching split into its own skill (refs #274 #288)

Review: MERGE (review + fix round + confirmation) — lead load at stages 1/2/3/6 down ~2,059 words; failure examples restored; PROOF-OF-LOOK text matches #321. Conflict in gate-check.sh's generated stage map resolved by re-rendering.
MendixMau pushed a commit that referenced this pull request Oct 13, 2026
When gate-check already reports final-look NOT YET DUE (#321), final-look
is no longer pending: assert it is absent from the obligations-pending line
and mark the baseline control not applicable. Pre-#321 assertions unchanged.
27/27 on this branch and on a scratch merge onto integration/2026-10-14.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
MendixMau added a commit that referenced this pull request Oct 14, 2026
)

Every constituent PR was reviewed by a fresh agent that did not write it (CLAUDE.md "Merging a PR"); only MERGE verdicts joined. CI green on each constituent head and on this head (40814fc); full suites run on the branch.

Review lines (per merged PR):
- #315 context trim — MERGE; 360/385 removed lines found verbatim in their new homes, rest read by hand; baseline 79,997 -> 76,259.
- #316 independent-review + word-budget rules — MERGE-AFTER-FIX (3 rounds), fixes applied as specified.
- #318 page-fidelity displayed text — MERGE after fix round + confirmation.
- #317 interaction-model skill (#291 part 1) — MERGE after fix round + confirmation; no client names leaked.
- #321 PROOF-OF-LOOK per section; final-look not due before derived Stage 6 — MERGE after fix round + confirmation.
- #307 graph-sweep guard; per-BRD conformance ledgers — MERGE after two fix rounds + confirmation.
- #325 extraction-quality section; token-burn fixes — MERGE after fix round + confirmation.
- #310 e2e OQL by alias, negative-span liveness, APP-DOWN, #302 credential regression fix — MERGE after fix round + 3 confirmations.
- #323 inbox promotions — MERGE after fix round + confirmation.
- #308 lint gate BLIND on reverted stock rules — MERGE (FIRST-SEEN reverted) after two fix rounds + confirmation.
- #328 pipefail + grep -q flake — MERGE; 0/30 flakes vs 15/100 on master. Follow-up: run-all resolves bin/lib/ subjects (reviewed, MERGE).
- #319 test-stack-up command-line ownership proof — MERGE after fix round + 2 confirmations.
- #327 change-intake core + on-demand detail; CRLF-safe change log — MERGE after fix round + confirmation.
- #320 follow-ups to #290/#292; Dispatching split out — MERGE after fix round + confirmation.
- #326 status delivery rounds (existing-app mode) — MERGE after fix round + confirmation.
- #312 lint batch 4: SEC014, toolkit CONV009 — MERGE after review + 2 fix rounds + confirmation; field run on mxcli 0.26.
- #324 exec.sh change classes, shared stale-lock takeover, SEC014 note echo — MERGE (joint review); follow-up owed for a takeover race after a mid-takeover crash.
- #322 MxTest after-startup guard, mxcli-run pid check — MERGE (joint review).
- #314 doctor property-set exit code; sync announces its bound — MERGE (joint review).
- #330 review follow-ups (exit 4/5 docs, pipefail, NUL strip) — MERGE-AFTER-FIX, fixes applied; takeover re-check dropped.

Field runs are still owed for most instruments in this batch (stated in each PR).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
@MendixMau

Copy link
Copy Markdown
Owner Author

Landed on master as part of the integration squash #329 (commit 31e90ae), after independent review — its Review: line is in that commit message. Closing as superseded.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

obligation-check.sh: LOOK staleness reads the FIRST VALID AT in a report, so a review file with dated addenda goes STALE

2 participants