Skip to content

fix: retain stopped synthetic turns until the room resumes - #832

Closed
AlexanderZ-Band wants to merge 2 commits into
mainfrom
feat/fixpython-stopped-room-with-queued-contact-hub-mes-INT-1781
Closed

AlexanderZ-Band wants to merge 2 commits into
mainfrom
feat/fixpython-stopped-room-with-queued-contact-hub-mes-INT-1781

Conversation

@AlexanderZ-Band

@AlexanderZ-Band AlexanderZ-Band commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

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.

@linear-code

linear-code Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

INT-1781

INT-1133

@AlexanderZ-Band AlexanderZ-Band left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants