Repository navigation
Batch-pass order derived from declarations and checked (practice c) - #367
Merged
Merged
Conversation
…hecked [migration reliability practices] practice (c) (Jess Haley, 2026-10-26, did-schema docs/plans/did_v2_go_forward_class_audit.md): whole-dataset passes declare what they read and write, and their order is derived and checked, not kept in comments. - Each of the 10 batch post-passes now declares BATCH-PASS-READS / ADDS / CHANGES / REMOVES in its header, read from its code. - tools/batch_pass_order.py derives the order (topological, ties kept in the composed order) and checks every composition: the two report-writing call sites, and with --ndi NDI-matlab's second pass in ndi.migrate.local. A pass that reads what a later pass writes (R1), or reads what an earlier pass removed (R2), an undeclared member, or a cycle fails. Denominator first. - The order notes in the pass headers (openminds before dataset entities, epochMint and resolveSessionAnchors before resolveEpochProbemap, epochMint before resolveValidIntervals, the bath anchors handed to epochMint) are derived; tools/test_batch_pass_order.py asserts that, and that a wrong order, a missing declaration and a cycle each fail. - test-migrators-quick runs both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
NDI-matlab #1140 added ndi.migrate.internal.v1FileReader, which local.m passes to did2.convert.v1_to_v2; testCrossRepoDivergenceIsExactlyTheCheckedInTable has failed on V2 since (Test code run 41369447993, the one failure) because the table had no row saying why it is NDI-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
jesshaley
marked this pull request as ready for review
November 2, 2026 03:11
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.
Builds practice (c) of [migration reliability practices] (Decided by Jess Haley, 2026-10-26, did-schema
docs/plans/did_v2_go_forward_class_audit.md): "whole-dataset passes (DID-matlabresolve*post-passes, NDI-matlab's second pass) declare what they read and write, and their order is derived and checked, not kept in comments."What changes
BATCH-PASS-READS / ADDS / CHANGES / REMOVESin their header (beside the existing CONSUMES/EMITS, which keep crediting the completion ladder and parse unchanged:batch_pass_declarations.py --jsongives the same result for all 10 before and after). Comment-only changes to the.mfiles; no code path changes.tools/batch_pass_order.pyderives the order from the declarations and checks every composition: the two report-writing call sites (runCorpusDiscovery,testCorpusPRED), and with--ndi ROOTNDI-matlab's second pass (steps between pass 1 and the final v1 stamp inndi.migrate.local). It fails on R1 (a pass reads what a later pass adds or changes), R2 (a pass reads what an earlier pass removed), an undeclared member, or a cycle. Denominator first.tools/test_batch_pass_order.py: the order notes the pass headers state in prose come out of the declarations; a wrong order, a missing declaration, a half-written one and a cycle each fail; NDI is checked when$NDI_MATLABis set, else NOT CHECKED.test-migrators-quick.ymlruns both.Local evidence (
python3 tools/batch_pass_order.py):DENOMINATOR: 10 pass(es) read ..., 10 with a valid declaration; 2 composition(s) checked; 90 ordered pair(s) compared...OK. With--ndiagainst NDI-matlab V2 plus the companion NDI-matlab PR: 27 second-pass steps of 34 marked, derived order equals the composed order, OK.Part (d) (carries counted by register row, with the denominator) is already in
migrationReport(#347); part (b) is held.Generated by Claude Code