Repository navigation
fix(progress-report): sort script phases by (number, name), never by dict (#513) - #545
Merged
Merged
Conversation
…dict (#513) script_phases() sorted (leading number, phase dict) tuples with no key, so two scripts sharing a leading number (10-data.mdl, 10b-data-flows.mdl), each matched to a phase, compared the dicts and raised TypeError; every exec.sh run then warned that progress-report.html was not updated. Sort on (number, script name). Fixture: test-progress-report.sh T17 (3 FAIL on master, 104/104 with the fix); test-progress-harness-verify.sh 30/30. Fixes #513 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jQvaonym9V1wKKfAEPmRr
… portability) check-portability flagged the heredoc opened inside $(...) at line 345. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jQvaonym9V1wKKfAEPmRr
…eep both sides) 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 #513
Direct lane
What changed and why (one paragraph): Root cause
project-bin/progress-report.py:784(script_phases):known = sorted((num[k], direct[k]) ...)had no key, so two exec'd scripts with the same leading number (10-data.mdl,10b-data-flows.mdl, or one script logged under two paths), each matched to a different plan phase, tied on the number and Python compared the two phase dicts ->TypeError: '<' not supported between instances of 'dict' and 'dict', and everyexec.shrun warnedprogress-report.html not updated. Fix: sort(num, script name, phase)withkey=(num, name)and keep(num, phase)pairs for the existing lower-number lookup. Behaviour is otherwise unchanged; ties between same-numbered scripts are now broken by script name (deterministic) instead of crashing.project-bin/progress-report.pyonly (also imported bybuild-plan-status.sh). No new reads.render-routing.sh --check: Baseline 73828 words before and after (budget 80000).Fixture evidence
tests/wave2/test-progress-report.shnew case T17 (the existing T9 name was taken, so the case is T17): a plan whose phases namemdlsource/10-data.mdlandmdlsource/10b-data-flows.mdl, BUILD-LOG rows reused from the captured exec.sh row intests/wave2/fixtures/verify-446/BUILD-LOG.captured.md(time and script replaced), plus an unmatched11-misc.mdl. Asserts the generator does not fail, the page is written, and11-misc.mdltakes the phase of the name-later10bscript.PASS=101 FAIL=3(T17's three asserts fail; traceback reproduced)PASS=104 FAIL=0tests/wave2/test-progress-harness-verify.sh:PASS=30 FAIL=0Field evidence: reported from a field project by jopterhorst (#513, mxcli v0.26.0); not re-run on that project here.
Regression notes: after
sync-project.sh, projects that were crashing now get the page again; projects that were not crashing see no change (the sort order of distinct numbers is unchanged). No exit codes, gate verdicts or parsed outputs change. Both layouts unaffected (no path logic touched).CHANGELOG.mdline appended, crediting jopterhorstReview: pending independent review
Generated by Claude Code