Skip to content

fix(progress-report): sort script phases by (number, name), never by dict (#513) - #545

Merged
MendixMau merged 3 commits into
masterfrom
claude/loving-gates-hauc1n-513
Oct 23, 2026
Merged

MendixMau merged 3 commits into
masterfrom
claude/loving-gates-hauc1n-513

Conversation

@MendixMau

Copy link
Copy Markdown
Owner

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 every exec.sh run warned progress-report.html not updated. Fix: sort (num, script name, phase) with key=(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.

Row Answer
Process none
Dependencies project-bin/progress-report.py only (also imported by build-plan-status.sh). No new reads.
Context cost none: no routed or always-loaded file touched. render-routing.sh --check: Baseline 73828 words before and after (budget 80000).
Behaviour n/a: scripts only
Runtime n/a

Fixture evidence

  • tests/wave2/test-progress-report.sh new case T17 (the existing T9 name was taken, so the case is T17): a plan whose phases name mdlsource/10-data.mdl and mdlsource/10b-data-flows.mdl, BUILD-LOG rows reused from the captured exec.sh row in tests/wave2/fixtures/verify-446/BUILD-LOG.captured.md (time and script replaced), plus an unmatched 11-misc.mdl. Asserts the generator does not fail, the page is written, and 11-misc.mdl takes the phase of the name-later 10b script.
    • master: PASS=101 FAIL=3 (T17's three asserts fail; traceback reproduced)
    • this branch: PASS=104 FAIL=0
  • tests/wave2/test-progress-harness-verify.sh: PASS=30 FAIL=0

Field 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).

  • No client data anywhere in the diff
  • Size cap
  • Test tier: fixture (T1) as above
  • CHANGELOG.md line appended, crediting jopterhorst

Review: pending independent review


Generated by Claude Code

…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
@MendixMau
MendixMau merged commit 888b4b2 into master Oct 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

exec.sh progress-report.py crashes: TypeError '<' not supported between dict and dict

2 participants