Skip to content

fix(scripts): measure_hero_drift exit codes and input errors - #315

Merged
TMHSDigital merged 1 commit into
mainfrom
fix/hero-drift-exit-codes
Oct 3, 2026
Merged

TMHSDigital merged 1 commit into
mainfrom
fix/hero-drift-exit-codes

Conversation

@TMHSDigital

Copy link
Copy Markdown
Owner

Summary

Closes #296. Size mismatch now fails (exit 3); unknown --only, nothing measured, and an unusable Blender binary exit 2 with a clear message; bare --output handled. Exit codes documented in the module docstring. Drift itself is still reported, not judged (unchanged).

Proven by live run

tests/test_measure_hero_drift.py (7 tests, wired into validate-harness) passes; against the previous script 4 of them fail (size mismatch exits 0, unknown --only exits 0, nothing measured exits 0, version failure raises). Tests mock Blender and rendering.

Established by inspection only

No real hero render was run; the changed paths are control flow around the render loop.

🤖 Generated with Claude Code

…nown --only, empty run

- a size mismatch between fresh render and committed hero is a failure (exit 3)
- an unknown --only name or a run that measured nothing exits 2 with a message
- a failing `blender --version` probe or unrunnable binary exits 2 instead of IndexError
- a bare trailing --output in a README command is handled, not an IndexError
- unit tests (no Blender) run in the validate-harness job

Closes #296

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the ci label Oct 3, 2026
@TMHSDigital
TMHSDigital merged commit 89cec34 into main Oct 3, 2026
13 checks passed
@TMHSDigital
TMHSDigital deleted the fix/hero-drift-exit-codes branch October 3, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

scripts: measure_hero_drift.py exits 0 on size mismatch or unknown --only, and crashes on bad input

1 participant