You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c2b9bec
Browse filesBrowse the repository at this point in the historyBrowse files
verify-module and look hook fixes; HARNESS rows from verify evidence (#501)
Fixes#446.
- Look hook: cwd-safe (`cd "${CLAUDE_PROJECT_DIR:-$PWD}"`), failures logged once to .claude/loop/look/hook.log instead of hidden by `|| true`; installer rewrites the old form and removes duplicates; doctor flags it.
- verify-module.sh: page-less module reports journeys SKIPPED (N/A); FAULT names *.test.sh; one e2e-harness dependency probe (playwright + axe-core) with dependents SKIPPED; coverage budget 1200 s; watchdogs no longer hold stdout open; summary.tsv ends with a verdict row.
- coverage-preflight.sh: phantom pass scoped per BRD (16.1 s -> 4.2 s on a 12-BRD bench); false PHANTOMs for cross-folder and .id-named BRDs are gone.
- Progress report / build-plan-status: a HARNESS verify-module row is promoted to built only on a clean, fresh summary plus a ui-review stating N of N with proof screenshots; otherwise it is flagged, done-drift style.
Review: independently reviewed at b03506c and again at 9bc45b7 / 07c2ef4. The merge of master (#497) resolved only CHANGELOG.md. All eight scoped fixtures pass on the head (progress-harness-verify 7/7, verify-module-446 7/7, coverage-phantom-scope 2/2, look-hook-cwd 7/7, install-claude-permissions 77/77, doctor-stale-hooks 7/7, report-normalize-two-tree 9/9, progress-report 101/101); the new cases fail on the previous head and on master. A HARNESS close row is promoted only when its summary reached a CLEAN verdict row with no FAULT, FINDING or flag-SKIPPED rows, is newer than the BUILD-LOG rows and done- files of its dependsOn scripts (walked with cycle protection), and its newest ui-review states N of N with N PROOF-OF-LOOK screenshots of at least 10 KB, the look obligation's artifact judged slightly more strictly; otherwise the row is flagged. No summary.tsv reader collides with the verdict row in a way that changes an outcome. The phantom-pass aggregation hides no real phantom. No mxcli or mxbuild calls added; build-plan-status --html costs about 60 ms more (import of progress-report.py). check-pr-discipline, check-scripts and check-portability clean; client grep 0. Follow-ups filed separately.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,8 @@ Sections dated before 2026-09-19 predate the cycle and stay as they are. Named m
19
19
20
20
## Unreleased
21
21
22
+
- fix(look hook, verify-module, coverage): **the look hook records from any cwd, and `verify-module.sh` loses four instrument faults** (#446). (a) The PostToolUse(Read) hook was `bash bin/look-ledger.sh seen || true`: from any cwd but the project root (a subagent in a private copy, a shell in `app/javasource`) it exited 127 and `|| true` hid it (field: 30 pages owed, 1 seen). `install-claude-permissions.sh` now writes it to `cd "$CLAUDE_PROJECT_DIR"` first; a missing script or failed run goes to stderr, and is logged once to `.claude/loop/look/hook.log` when that can be written. The installer (and `sync-project.sh`'s hook repair) rewrites the old form in place and removes duplicate look hooks, so one remains; `doctor.sh` flags any look hook not in the root-resolving form. (b) A module with 0 pages in the page scope reports journeys N/A instead of a FAULT (`page-scope.sh` now runs before the runtime rungs; same mxcli calls) — jopterhorst (comment on #446); a missing journey JSON names any `tests/<module>*.test.sh` that exist in another shape; missing e2e dependencies (playwright, axe-core, probed from `JOURNEY_RUNNER`/`MONKEY_JS`/`DESIGN_AUDIT_JS`'s folders) are one FAULT row with the one fix (`npm install playwright axe-core && npx playwright install chromium`), journeys and monkey SKIPPED as dependents of playwright, the design audit static-only; the coverage rung's budget is 1200 s (was 300); `summary.tsv` ends with a `verdict` row (CLEAN / FINDINGS / INCOMPLETE), absent when a run was cut short (`report-normalize.js` skips it); and `coverage-preflight.sh`'s PHANTOM CLAIM pass gives each BRD only the claims it can resolve (12-BRD bench: 16.1 s to 4.2 s), with identical verdicts except that false PHANTOMs for BRDs in another source folder or named only by `.id` are gone (exit can drop 1→0). Found while proving it: every rung's watchdog `sleep` kept the script's stdout open, so `verify-module.sh | tee` waited up to 30 minutes after the verdict; the watchdogs now drop fds 3/4 and take their sleep with them. **Behaviour change to check in your project:** a page-less module's `summary.tsv` has `journeys SKIPPED (N/A: ...)` and the run can exit 0; missing e2e dependencies add an `e2e harness dependency` FAULT row and SKIPPED journeys/monkey rows; `summary.tsv` gains a last `verdict` row; `coverage-preflight.sh` can exit 0 where it exited 1 (the false PHANTOMs above); `.claude/settings.json`'s look hook command changes. Fixtures: `test-look-hook-cwd.sh`, `test-verify-module-446.sh`, `test-coverage-phantom-scope.sh`. — MendixMau (field 2026-10-17), jopterhorst (page-less modules)
23
+
- fix(progress-report): **a HARNESS row that runs `verify-module.sh <Module>` is read from evidence as well as from State.** The agent ran the module-close pass and never edited State, so the row stayed "not built". The row's Pass is a clean summary AND LOOK + CONFIRM, so the report promotes it only on both: the summary reached its `verdict` row with no FAULT, no FINDING and nothing SKIPPED but the look and N/A rows (a `--quick`/`--skip-*` run does not count), it is newer than every BUILD-LOG row and `done-` file of the scripts the row depends on, and the module's newest `design/ui-reviews/ui-review-*.html` (the `look` obligation's artifact) says N of N with N PROOF-OF-LOOK screenshots on disk. Then the row shows `built (verified <date>, LOOK n/n)`, counted built and flagged against State. Short of that it keeps the State count and is flagged, as done-drift is: `verify clean <date> — LOOK + CONFIRM owed`, `verify stale (summary <date>, N execs since)`, or, for State built, `built? no verify summary` / not clean. Other rows keep the State rule; `progress-report.py` holds the one rule and `build-plan-status.sh` imports it; no extra script runs and no git calls (the LOOK report's VALID AT staleness stays gate-check's). **Behaviour change to check in your project:** the progress report can show a HARNESS row as built while its State cell says not built, and flags HARNESS rows whose State says built without the evidence. Fixture: `test-progress-harness-verify.sh`. — MendixMau (review 2026-10-21)
22
24
- fix(lint): **`lint-gate.sh` says when to take the first baseline, a rise opens with a one-line-per-rule summary, and `Lint gate: hard` is an opt-in exit 1** (#496, split from #443). With no baseline, the gate said only "run --update-baseline", and nothing said when the first one should be taken; it now says to take it right after the scaffold, with the user, and shows the command (the `iterative-build-loop.md` refusal table gains the same row). In the field run behind #443 about 90% of runs rose, and each rule's header was buried between its findings; a FAIL now opens with `rule sev base -> now (+N) K new`, one line per rule, then the per-rule detail (still at most 3 findings, all of them in `.claude/loop/lint-last.json`). `Lint gate: hard` in `PROJECT.md` makes `exec.sh` exit 1 on a LINT ROSE instead of 4 (write still kept; env `MXTK_LINT_GATE=soft|hard` wins, and `doctor.sh --fix-property-sets` passes soft so a kept repair is not read as failed). **Behaviour change to check in your project:** the FAIL block's layout changed: the `rule sev N -> M (+K)` lines are now the summary at the top, each followed by `K new`, and the detail headers read ` RULE:`. `exec.sh`'s own parse reads each rule once either way; a project script that grepped the old interleaved block should be checked. — MendixMau (field 2026-10-17, via #443)
23
25
- fix(exec): **a pre-exec `mxcli check` refusal now records its reason in the BUILD-LOG row, and the preflight STOP table gains rows 29-32** (#445). The 🚫 row said only "mxcli check failed pre-exec", so the reason for 3 field refusals was lost (the issue suspects MDL-PAGEARG01, in mxcli since about v0.19); exec.sh now keeps the output of the one check run it already makes, still printed live, and appends `; check: <first error line>` (rule id first, ANSI and CR stripped, pipes escaped, cut at 160 bytes on a UTF-8 boundary). New STOP rows: a constant in a nanoflow (CE0117), `dynamicimage` on the React client (CE0582), a data-view attribute binding across 2+ associations (CE1613), a widget `show page` argument with no context object or besides it (MDL-PAGEARG01). Golden input: two real mxcli v0.26.0 check captures (mxcli's own PAGEARG01 test and a parse error), not the field output. BUG-70 notes that v0.26.0 `check` now refuses its shape. Test: `tests/wave2/test-exec-check-refusal.sh` — MendixMau (field 2026-10-17)
24
26
- fix(exec): **`exec.sh` exit codes now mean what they say (#443, #448).** A clean build with a lint rise exited 1 like a failed gate, and an UNVERIFIED gate exited 0 like a pass: in one field build 57 of 58 clean builds exited 1, agents learned to ignore 1, and 10 UNVERIFIED runs read as success. Now `0` applied and gate passed · `1` not applied or rolled back (and PARTIAL, whatever mxcli exited) · `2` usage, nothing touched · `4` applied, gate passed, lint only (LINT ROSE/BLIND; last line `gate passed, lint only`) · `5` applied, UNVERIFIED (also `ALLOW_UNVERIFIED=1`). An mxbuild exit 1/3 whose errors file holds only a generic deploy-stage message (`Compilation of the app bundle failed.`, `An error occurred while ...`) and no model problem is retried once, like an empty one, but not again by the gate when the baseline's retry already failed with the same text; a version mismatch still is not. No extra mxbuild on the happy path (2); worst case 3. Defined in the `exec.sh` header, mirrored in `iterative-build-loop.md`; `doctor.sh --fix-property-sets` reads 4 as kept, `sync-project.sh` names the fix for a hand-edited copy; `test-exec-gate-retry.sh` F–L pin it. **Behaviour change to check in your project:** a wrapper that tests exec.sh's exit code now sees 4 for a lint-only rise (was 1) and 5 for UNVERIFIED (was 0); a PARTIAL run never exits 4 or 5. — MendixMau (field 2026-10-17)
grep -qF 'bin/look-ledger.sh seen'"$PSET"2>/dev/null || HOOK_GAP="${HOOK_GAP:+$HOOK_GAP and }look-ledger seen (PostToolUse Read)"
1264
+
# #446: the pre-2026-10-21 relative form records nothing from any cwd but the project root.
1265
+
# Any look hook not in the root-resolving form (one JSON string per line, so per-line is exact).
1266
+
grep -F 'look-ledger.sh seen'"$PSET"2>/dev/null | grep -vqF 'CLAUDE_PROJECT_DIR'&& HOOK_GAP="${HOOK_GAP:+$HOOK_GAP and }look-ledger seen run from the project root (a look hook that does not cd to \$CLAUDE_PROJECT_DIR first records nothing from any other cwd)"
1264
1267
if [ -n"$HOOK_GAP" ] && [ -f"$PROJECT_DIR/.mxtk/no-hook-repair" ];then
1265
1268
ok "hook gap ($HOOK_GAP) accepted: .mxtk/no-hook-repair is set"
0 commit comments