Repository navigation
decompose: cut-ledger (split from #293, 2/6) - #345
Merged
Merged
Conversation
bin/cut-ledger.sh + bin/lib/cut-ledger.py copied from #293's head; header no longer cites files not on master and carries the field run's real counts. New fixture tests/wave2/test-cut-ledger.sh (38 checks) on a captured line subset of #293's NativeNote slice run (template app): reproduces that run's own 57 ledger rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
- An unreadable input (missing --rules, nonexistent --catalog, malformed --exporter-json) exits 2, not the UNRESOLVED code 1. - A --refs line with the wrong field count is refused (exit 2, counted, first line named) instead of silently dropped. - test-cut-ledger 38 -> 44. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
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.
Split from #293 (2/6). #293's branch is untouched. The files were copied from its head with
git checkout origin/claude/youthful-hypatia-qapq73 -- <paths>. This PR is based on master, not stacked on #341: cut-ledger has no code dependency on cut-score, only a prose mention of it.Direct lane
What changed and why (one paragraph):
bin/cut-ledger.shwith its enginebin/lib/cut-ledger.pywrites the cut ledger for one decompose slice. Each crossing edge gets one row with a resolution (resolved/stub/handoff/retire/platform) and its evidence, and the script exits 1 while any edge has no resolution. A slice is not "done because mx check is green", since a stub turns an edge green without carrying its behaviour. Inputs:refstable, or a--refsTSVmx checkCE1613 names the catalog never recorded, which become check-only rows--json--extrarowsExit 2 covers bad arguments, unreadable inputs and malformed
--refslines.Changes from #293's copy:
process/decompose-and-rehost-plan-…mdorpipelines/mendix-mpr/export-module-mpk.py, because neither is on master; both land in later splits.New fixture.
tests/wave2/test-cut-ledger.shhas 44 checks. Its input is a captured artifact and nothing in it is hand-written:slice.txt,cut-rules.tsv(43 rules),cut-extra.tsvand the exporter JSON are taken verbatim from Decompose and Rehost pipelines: field runs on FSM and GenAI Showcase, three new skills #293's NativeNote slice run.--dump-refsoutput: 43 of 346 crossing refs, one ledger key per distinct rule plus System. From itsmx checklog: 10 of 186 CE1613 lines. From itscut-ledger.tsv: the 57 expected rows.--dump-refswrites the input back byte for byte--cataloggives the same ledger as--refsField evidence: #293's run on a public Mendix field-service template app, version 9.24.2. The NativeNote slice moved into a fresh Mendix 11.13.0 app: 346 crossing refs → 308 ledger rows, 0 UNRESOLVED, 0.15 s. With the pre-fix exporter JSON, the run's reconciliation flagged a false positive (Technician x2). The fixture reproduces both.
test-cut-ledger.shpasses 44/44 on captured input..mprunderapp/): the script discovers nothing itself; every input is an explicit path. I probed it with synthetic trees: catalogs at<proj>/.mxcli/catalog.dband<proj>/app/.mxcli/catalog.dbgive the same ledger. No real two-tree project has been run. macOS and Git Bash/Windows: unverified. Everything ran on Linux only;check-portability.shis clean.CHANGELOG.mdline appended (crediting Decompose and Rehost pipelines: field runs on FSM and GenAI Showcase, three new skills #293's field run)Checks:
render-routing.sh --checkpasses; the baseline is 75,038 words before and after.check-scripts,check-portability, the leak guard,check-no-private-citationsandcheck-pr-disciplineare all clean.Review
The independent review returned MERGE-AFTER-FIX. Commit
4016553addresses each item:OSError,ValueErrorandsqlite3.Errorand routes them todie()(exit 2) with "cannot read an input: …". The header's Exit line now says that 1 means UNRESOLVED and nothing else.--rules, a nonexistent--catalog, and an invalid--exporter-json. Decompose and Rehost pipelines: field runs on FSM and GenAI Showcase, three new skills #293's copy returns 1 on all three.--refslines with the wrong field count were silently dropped. Fixed: they are now refused with exit 2, counted, and the first one is named. The fixture case is a captured refs file with one line cut short. Decompose and Rehost pipelines: field runs on FSM and GenAI Showcase, three new skills #293's copy accepts it silently.Against #293's copy the fixture now fails 6 of 44 checks.
Impact
bin/cut-ledger.shis an on-demand instrument (exits 1 while any crossing edge is UNRESOLVED); no gate wires it.git merge-tree). No conflicts with the other PRs in this batch; based on master, not stacked on #341; #346 cites it. Platform: Linux only (two-tree probed synthetically). Reads the catalogrefstable in.mxcli/catalog.db(producer: mxcli catalog refresh, left byapp-facts.sh) or a--refsTSV, a slice file + rules (human-authored), anmx checklog (producer: mx), and the exporter--json(producer:pipelines/mendix-mpr/export-module-mpk.py, which arrives in #342 and is not on master).git merge-treevs 868b3cb and pairwise; script headerbin/render-routing.sh --checkon master 868b3cb vs this head (4016553) merged onto 868b3cb viagit merge-treein a temporary worktree🤖 Generated with Claude Code
https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw