[Minor Feature] Regression tests that trigger each bug from #258–#278 #287
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#287
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?
Context
The debug build system (ASan, UBSan, Valgrind, pydebug) is working correctly — when given targeted trigger code, ASan immediately catches the gridstate overflow (#258). However, the existing test suite of 243 tests exercises only normal operation paths and produces zero sanitizer findings.
The 22 bugs from the 7DRL 2026 post-mortem each require specific input sequences to trigger. Without dedicated regression tests, the sanitizer builds provide a false sense of security.
Proposal
Create
tests/regression/issue_NNN_*.pyfor each open bug that:Bug families and their triggers:
Gridstate overflow (#258–#263, #276, #278):
update_visibility()Dangling pointers (#264–#265, #270–#272, #277):
GridPointState/GridPointPython reference, mutate underlying vector, access the referenceRefcount leaks (#267, #275):
scene.childrenin a loop, checksys.gettotalrefcount()growth under pydebugIterator invalidation (#273):
entity.die()duringfor e in grid.entitiesiterationMissing cleanup (#274):
Value
Each test is both a regression guard and a sanitizer calibration check — if ASan doesn't flag the gridstate test, the build is misconfigured.
Related
Regression test coverage update (2026-04-10)
All 5 bug families from the memory safety audit now have regression tests:
issue_258_gridstate_resize_test.pyissue_264_gridpoint_dangle_test.pyissue_265_gridpointstate_dangle_test.pyissue_270_277_parent_grid_dangle_test.pyissue_267_275_refcount_test.pyissue_273_die_during_iteration_test.pyissue_274_set_grid_spatial_hash_test.pyissue_266_entity_lifecycle_test.py,issue_266_subclass_identity_test.pyRemaining gap: the refcount leak tests (#267, #275) use a weak proxy (gc.collect + loop completion) in release builds. Full
sys.gettotalrefcount()validation requires a pydebug build, which depends on #285 (CI pipeline) being set up.