Repository navigation
fix: retain stopped synthetic turns until the room resumes - #832
Closed
AlexanderZ-Band wants to merge 2 commits into
Closed
AlexanderZ-Band wants to merge 2 commits into
AlexanderZ-Band wants to merge 2 commits into
Conversation
This was referenced Oct 18, 2026
AlexanderZ-Band
commented
Oct 18, 2026
AlexanderZ-Band
left a comment
Collaborator
Author
There was a problem hiding this comment.
Full-PR review at 0676394d51de: no verified findings across Style & Hygiene, Design & Reuse, Runtime Safety & Observability, Test Quality, Edge-Case Flow Analysis, or Logical Bugs. Converged in cycle 1. Focused runtime regressions passed; complete unit suite is running.
…act-hub-mes-INT-1781
There was a problem hiding this comment.
🟢 Approved
Static review identified no blocking issues in the retention logic, scope lifecycle, or regression coverage; tests were not executed.
No open issues 🎉
What changed in this PR
Preserves synthetic contact-hub events across STOP and deferred admission so PLAY can resume queued work without blocking other rooms. This is the runtime-only portion of the broader cancellation work.
Changes:
- Retain synthetic events until their turns advance.
- Add block-scoped turn admission and settlement.
- Cover setup-window controls, stopped draining, and stopped posting with runtime regressions.
| File | Description |
|---|---|
| tests/runtime/test_tools.py | Use scoped turns in stopped-post checks. |
| tests/runtime/test_activity_stop.py | Update activity tests to scoped turns. |
| tests/runtime/runtimecontrol/test_stop_notification.py | Scope stop-notification test turns. |
| tests/runtime/runtimecontrol/test_platform_stop_hook.py | Scope platform-stop hook checks. |
| tests/runtime/resync/test_stopped_drain.py | Verify STOP preserves queued events and other-room responsiveness. |
| tests/runtime/helpers.py | Support message metadata in test fixtures. |
| tests/runtime/executioninterrupt/test_stopped_posts.py | Exercise stopped posting across scoped turns. |
| tests/runtime/executioninterrupt/test_setup_window_control.py | Cover controls during setup and processed-message skips. |
| tests/runtime/executioninterrupt/test_room_shutdown.py | Scope observer shutdown tests. |
| tests/runtime/executioninterrupt/kit.py | Allow configurable hydration and room IDs. |
| src/band/runtime/execution.py | Add scoped turns and retain unadvanced synthetic events. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A synthetic contact-hub turn can be lost when a control interrupts setup or defers admission. STOP must preserve queued work for PLAY while keeping other rooms responsive.
What
Retain synthetic events until their turn advances, and cover setup-window controls, stopped draining and settled-turn posting with runtime regressions.
Scope
Independent runtime portion of #791. Closes INT-1781; contributes to INT-1133. Does not migrate adapter backends or change bridge startup.
Backend cancellation is reviewed in #834 → #835 → #791; bridge startup is #833.