Repository navigation
fix(verify, review, coverage): one ledger resolver and toolkit-root lookup for every module rung (#672, #673) - #695
Merged
Conversation
…ookup for every module rung (#672, #673) #673: review-module.sh knew 2 of the 4 coverage-ledger forms and verify-module.sh 3, so a valid single-BRD architecture/coverage-ledger.md or flat <M>-coverage-ledger.md FAULTed both review rungs while conformance-check/coverage-preflight measured it. New mxtk_resolve_ledger in project-bin/_common.sh resolves per-BRD dir, <M>/coverage-ledger.md, flat, project file in that order, and is now the lookup in all four scripts (duplicated discovery drifts; header cites the discover-brds.sh lesson). #672: coverage-preflight.sh's find_engine, verify-module's COVERAGE_CHECK lookup and both scripts' _tool() now also try find_toolkit_root's bin/ and project-bin/, so an installed project wired only through the Toolkit root row (MXTK_ROOT unset) finds coverage-check.sh. Fixture tests/wave2/test-ledger-resolver.sh: 20/20 on this branch, 0 pass on origin/master, single-tree and two-tree layouts. test-verify-ledger-hint.sh loads the helper beside the function it extracts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jQvaonym9V1wKKfAEPmRr
This was referenced Nov 6, 2026
…empty toolkit root (#672, #673) - test-ledger-resolver.sh cases 2-3 now assert conformance PASS with the stub's Orders row in conformance.tsv, and coverage reaching the BRD lookup, not just the absence of "no ledger". - coverage-preflight.sh / verify-module.sh: a failed find_toolkit_root no longer becomes /bin/coverage-check.sh. - CHANGELOG: flat/single-BRD modules move FAULT -> measured in review-module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jQvaonym9V1wKKfAEPmRr
Keep both sides of CHANGELOG.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jQvaonym9V1wKKfAEPmRr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #672, fixes #673.
Time cost (#687): removes 2+ false FAULTs per module verify/review (review's conformance + coverage rungs on a single-BRD or flat ledger; the coverage engine "not found" when only the Toolkit root row wires the toolkit). No new steps.
Direct lane
What changed and why: Four scripts each had their own copy of the coverage-ledger lookup, and the copies drifted. review-module.sh knew 2 of the 4 sanctioned forms and verify-module.sh knew 3. So a valid
architecture/coverage-ledger.md(single-BRD) orarchitecture/modules/<M>-coverage-ledger.md(flat) FAULTed review's conformance and coverage rungs, while conformance-check/coverage-preflight run on their own measured it (#673). This PR addsmxtk_resolve_ledger <root> <module>inproject-bin/_common.sh. It checks, in this order: the per-BRD<M>/coverage-ledger/directory (only counts if it holds at least one*.md),<M>/coverage-ledger.md, the flat<M>-coverage-ledger.md, thenarchitecture/coverage-ledger.md. All four scripts now use it. Each script still handles its own explicit overrides (LEDGER_FILE, positional), and their behaviour is unchanged. The helper's header cites the "duplicated discovery logic drifts" lesson (bin/lib/discover-brds.sh, CLAUDE.md "generic first").For #672,
find_toolkit_root(the existing_common.shhelper that reads theToolkit rootrow of CLAUDE.local.md) is now also tried in four places: coverage-preflight.shfind_engine, theCOVERAGE_CHECKlookup in verify-module.sh, and_tool()in both verify-module.sh and review-module.sh. An installed project withMXTK_ROOTunset now findscoverage-check.sh.project-bin/_common.shgains one function. Projects get it throughsync-project.sh, together with the four callers. Expected overlap with parked #651: it also touches verify-module.sh's coverage rung,resolve_ledger_hintandtests/wave2/test-verify-ledger-hint.sh. The hunks here are kept minimal there:resolve_ledger_hint's body, one extra candidate in theCOVERAGE_CHECKloop, and a helper-load line in the fixture'shint(). Whichever PR lands second needs a small rebase.sedof CLAUDE.local.md per_toolcall)Regression risk: some modules used to get FAULT here. They are now measured, so real UNCLAIMED/PHANTOM/conformance findings can show up where a FAULT row used to be. Lookup order is unchanged for conformance-check and coverage-preflight; the existing fixtures confirm this. In review-module, multi-ledger mode now triggers on the resolved per-BRD directory (it still reads the index file beside it for BRD names), not on any
coverage-ledger/directory found next to the canonical path. In verify-module, the ledger hint (which is only used when coverage-preflight is absent) now also finds the flat form.Field evidence: both issues were reproduced from the field run that filed them (toolkit 97c1139c, installed layout, only the Toolkit root row, MXTK_ROOT unset gives FAULT). The new fixture reproduces both against origin/master.
Fixtures (only those whose subject is a changed file):
new
tests/wave2/test-ledger-resolver.sh project-bin/_common.sh: 20/20 here, 0 pass on origin/master (12 FAIL). Runs on both layouts, single-tree and two-tree (.mprunderapp/). Covers the helper order, review-module on the single-BRD and flat forms, verify's hint on the flat form, an installed coverage-preflight wired only by the Toolkit root row, and_toolviafind_toolkit_root.test-verify-ledger-hint 4/4, test-review-conformance-per-brd 6/6, test-coverage-preflight-ledger-dir 13/13, test-coverage-phantom-scope 2/2, test-conformance-per-brd-ledger 20/20, test-conformance-absent-marker 24/24, test-conformance-baseline-scope 9/9, test-common-root-multiapp ok, test-common-windows ok, test-verify-stack-blocked 6/6, test-mxbuild-version-match 18/18, test-find-java-version ok.
test-verify-module-446 15/16. The one failure (
V3: playwright rows=1) is identical on origin/master, so it is pre-existing and not caused by this PR.check-scripts clean, check-portability clean, leak guard clean (
LEAKGUARD_ALLOW_NO_DENYLIST=1 LEAKGUARD_BASE=origin/master), check-pr-discipline clean. No full suites were run.No client data anywhere in the diff
Size cap: 5 scripts + 2 fixtures + CHANGELOG
Test tier: fixture-level (T1), both layouts. Git Bash is unverified: the changes are plain POSIX-ish bash plus
lsglobbing, already used in these files.Golden input: n/a, because no tool output is parsed (file layout only). Both layouts are covered.
CHANGELOG.mdline, credited "— field run (coverage-preflight cannot find coverage-check.sh when the toolkit root comes from the Toolkit root row #672, review-module.sh: the single-BRD ledger (architecture/coverage-ledger.md) is not found, so conformance and coverage rungs FAULT while the dedicated checks pass #673)"Review: pending independent review
Generated by Claude Code