M007 S04: Branch exhaust sets invalidated=true — no way to return to main sequence after branch ends #12
Labels
No labels
blocked:lint-failed
blocked:needs-decision
blocked:no-changes
bug
feature-request
in-progress
milestone
ops-task
quickfix
security/high
test-coverage
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/chainbound#12
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?
Severity: LOW
File: src/engine/openings.ts:36-37
Problem
When a contingency branch runs out of turns,
advanceOpeningTurn()setsinvalidated: true(line 37). This ends the entire opening, even if the main sequence still has remaining turns. Contingency branches are treated as terminal forks, not temporary diversions.This may be an intentional design choice (branches exhaust the opening), but if branches are meant to be temporary, they should return to the main turn sequence instead.
Current behavior:
Alternative:
Fix
If branches should return to the main sequence, change line 36-37 from:
to something that returns to the main sequence without incrementing the turn counter.