[Bugfix] tests/demo/ is rotted and unrunnable — screens/base.py calls mcrfpy.sceneUI, removed long ago; demos are not in the test suite #372
Labels
No labels
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
priority:tier1-active
priority:tier2-foundation
priority:tier3-future
priority:tier4-deferred
Refactoring & Cleanup
system:animation
system:documentation
system:grid
system:input
system:performance
system:procgen
system:python-binding
system:rendering
system:ui-hierarchy
Tiny Feature
workflow:blocked
workflow:needs-benchmark
workflow:needs-documentation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
john/McRogueFace#372
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while validating the
feat/355-grid-input-revivalbranch against bundled scripts. Pre-existing on master; not caused by that branch.Defect
tests/demo/demo_main.pydies immediately:The caller is
tests/demo/screens/base.py.sceneUIis not exported to the module — verified on both master and the branch:The C++ function
McRFPy_API::_sceneUIstill exists (src/McRFPy_API.cpp:1350) and is reachable internally fromPySceneObject.cpp:153, but it has no module-level binding. The demo was written against the pre-Scene-object API and was never migrated.tests/demo/tutorial_showcase.pyseparately dies withPermissionError: [Errno 13] Permission denied: '/opt/goblincorps'— it writes to a hardcoded absolute path outside the repo.Why this went unnoticed
tests/run_tests.pydoes not run anything undertests/demo/. Grep for "demo" in the runner returns nothing. So the demo screens — which CLAUDE.md explicitly points at as the canonical API-usage examples ("Readtests/demo/screens/*.pyfor correct API usage") — have no CI coverage and have silently bitrotted.demo_main.pywas last touched 2026-04-09 (6d5e99a).That is the real cost here: the documented "look at the demos for correct usage" guidance currently points newcomers at code that does not run.
Suggested fix
screens/base.pyoffsceneUIonto theSceneobject API (scene.children)./opt/goblincorpspath intutorial_showcase.pywith a temp dir or a repo-relative path.run_tests.pythat executes each demo screen headless and asserts it doesn't raise. Without this, they will rot again — that is the whole reason they rotted the first time.Item 3 is the one that actually matters; 1 and 2 are one-time cleanups.