Repository navigation
feat: configure stopped-room polling and separate runtime types - #804
Conversation
Source-Base: bcf337b Source-Head: a83b03f Applied-Over: 580577e Conflict-Notes: None; exact feature delta, auto-merged in docs/websocket-events.md and src/band/runtime/execution.py Upstream-PR: band-ai#804
AlexanderZ-Band
left a comment
There was a problem hiding this comment.
Three verified issues: required-interval validation regression, constructor coverage bypass, and missing Pydantic settings for the new knob. Applying focused fixes.
All three findings were fixed in 2ef3238 and their threads resolved. Final review found no remaining verified defects; lint, formatting, type checks, full unit suite, and focused post-change regressions passed.
A room paused by STOP probes /next at the base interval forever, because those probes are the only way to discover a missed PLAY. SessionConfig.stopped_resync_seconds lets operators trade PLAY-discovery latency for request volume on paused rooms. Unset keeps the base interval.
AlexanderZ-Band
left a comment
There was a problem hiding this comment.
issue: Current-main callers in tests/adapters/lifecycle/test_runtime_closing.py:10 and tests/integrations/acp/test_cursor_message_delivery.py:12 still import deleted band.runtime.types. The synthetic merge fails collection on Ubuntu and Windows. Migrate both imports to band.runtime.sessionconfig after updating the branch to current main.
AlexanderZ-Band
left a comment
There was a problem hiding this comment.
Fresh full review found no additional verified defects. One direct-owner import nit remains in callbacks.py.
7a75aac to
e0b7f5a
Compare
|
Fixed the collection finding in e0b7f5a. The branch now includes current main, and both tests added there import SessionConfig from band.runtime.sessionconfig. The original two collection errors reproduce before the fix; all 11 affected test cases pass afterward. The full suite on the rebased tree passed 8,723 tests, and Ruff, formatting, Pyrefly and markdown checks pass. The direct-owner import nit is also fixed and its thread resolved. The review converged after two passes with no remaining verified defect. |
The synthetic-merge collection defect is fixed in e0b7f5a after updating the branch to current main and migrating both callers. The original failure no longer reproduces; affected tests and full local gate passed. Final review found no remaining verified issue.
AlexanderZ-Band
left a comment
There was a problem hiding this comment.
Fresh my-code-review --fix completed against aeb2844. One review cycle converged with no verified findings across all six angle groups; no unresolved existing feedback. Reviewed stopped-room polling, Pydantic SessionConfig settings, and direct imports after deleting runtime/types.py, including the intentional API changes. Simplify only shortened two timing comments. Validation: 8,723 unit tests passed, Ruff check and format check passed, and Pyrefly passed. Live platform timing was not exercised. No linked Linear ticket was found.
AlexanderZ-Band
left a comment
There was a problem hiding this comment.
All verified findings are fixed. The fresh six-angle review found no remaining defects or unresolved feedback. Local validation passed 8,723 tests plus Ruff, formatting, and Pyrefly. CI is complete: 27 passed, 1 skipped.
Source-Base: 97f8330 Source-Head: 41e9389 Applied-Over: f807d62 Conflict-Notes: Over band-ai#789/band-ai#775: resync entry keeps upstream _drain_synthetic() and drops previous_id as the source does; _recover_actionable_backlog matches TurnOutcome.NOT_ACCEPTED/RETRY_LATER (renamed from BacklogProcessResult), and PAUSED settles behind the existing _stopped check like upstream's /next loop. Over band-ai#804: SessionConfig imported from band.runtime.sessionconfig; resync kit/conftest keep ReconciliationPeer beside BacklogApi. Excludes CHANGELOG.md and FORK-CHANGES.md Fork fix beyond the PR head: the in-snapshot synthetic handoff uses the entry check's rule (not during bootstrap, not while an older message is deferred), so neither bootstrap nor idle recovery stalls on a queued synthetic turn; see FORK-CHANGES.md. A deferral is released whenever its row is locally completed or permanently failed (stop/control fences, processed-ack retry), at every pass start and after every processed row. Upstream-PR: band-ai#730
Source-Base: 97f8330 Source-Head: 4184abb Applied-Over: 3643b7c Conflict-Notes: Resolved band-ai#709 modify/delete conflicts by replacing OMP ACP with native RPC; retained the workspace flag and current form-policy test class, removed obsolete ACP profile fixtures, migrated the new room-rejoin test and matrix row, and preserved band-ai#804 owner-module imports. No behavioral source hunks dropped; CHANGELOG.md and FORK-CHANGES.md excluded. Upstream-PR: band-ai#763
Source-Base: 4184abb Source-Head: a625466 Applied-Over: fda806c Conflict-Notes: None; exact feature delta over the ported native OMP lifecycle; retained upstream band-ai#709 and band-ai#804 adaptations from the prerequisite. CHANGELOG.md and FORK-CHANGES.md excluded. Upstream-PR: band-ai#798
Source-Base: 97f8330 Source-Head: 41e9389 Applied-Over: d7ab342 Conflict-Notes: Over band-ai#789/band-ai#775: resync entry keeps upstream _drain_synthetic() and drops previous_id as the source does; _recover_actionable_backlog matches TurnOutcome.NOT_ACCEPTED/RETRY_LATER (renamed from BacklogProcessResult), and PAUSED settles behind the existing _stopped check like upstream's /next loop. Over band-ai#804: SessionConfig imported from band.runtime.sessionconfig; resync kit/conftest keep ReconciliationPeer beside BacklogApi. Excludes CHANGELOG.md and FORK-CHANGES.md Fork fix beyond the PR head: the in-snapshot synthetic handoff uses the entry check's rule (not during bootstrap, not while an older message is deferred), so neither bootstrap nor idle recovery stalls on a queued synthetic turn; see FORK-CHANGES.md. A deferral is released whenever its row is locally completed or permanently failed (stop/control fences, processed-ack retry), at every pass start and after every processed row. Upstream-PR: band-ai#730
Source-Base: 97f8330 Source-Head: 4184abb Applied-Over: 1cd5845 Conflict-Notes: Resolved band-ai#709 modify/delete conflicts by replacing OMP ACP with native RPC; retained the workspace flag and current form-policy test class, removed obsolete ACP profile fixtures, migrated the new room-rejoin test and matrix row, and preserved band-ai#804 owner-module imports. No behavioral source hunks dropped; CHANGELOG.md and FORK-CHANGES.md excluded. Over band-ai#802: OMP image and turn-outcome probes move into its imageprobes.py/outcomeprobes.py registries; uv.lock regenerated over band-ai#796. Upstream-PR: band-ai#763
Source-Base: 4184abb Source-Head: a625466 Applied-Over: 00f3dfb Conflict-Notes: None; exact feature delta over the ported native OMP lifecycle; retained upstream band-ai#709 and band-ai#804 adaptations from the prerequisite. CHANGELOG.md and FORK-CHANGES.md excluded. Upstream-PR: band-ai#798
Source-Base: 97f8330 Source-Head: 41e9389 Applied-Over: d7ab342 Conflict-Notes: Over band-ai#789/band-ai#775: resync entry keeps upstream _drain_synthetic() and drops previous_id as the source does; _recover_actionable_backlog matches TurnOutcome.NOT_ACCEPTED/RETRY_LATER (renamed from BacklogProcessResult), and PAUSED settles behind the existing _stopped check like upstream's /next loop. Over band-ai#804: SessionConfig imported from band.runtime.sessionconfig; resync kit/conftest keep ReconciliationPeer beside BacklogApi. Excludes CHANGELOG.md and FORK-CHANGES.md Fork fix beyond the PR head: the in-snapshot synthetic handoff uses the entry check's rule (not during bootstrap, not while an older message is deferred), so neither bootstrap nor idle recovery stalls on a queued synthetic turn; see FORK-CHANGES.md. A deferral is released whenever its row is locally completed or permanently failed (stop/control fences, processed-ack retry), at every pass start and after every processed row. Upstream-PR: band-ai#730
Source-Base: 97f8330 Source-Head: 4184abb Applied-Over: 1cd5845 Conflict-Notes: Resolved band-ai#709 modify/delete conflicts by replacing OMP ACP with native RPC; retained the workspace flag and current form-policy test class, removed obsolete ACP profile fixtures, migrated the new room-rejoin test and matrix row, and preserved band-ai#804 owner-module imports. No behavioral source hunks dropped; CHANGELOG.md and FORK-CHANGES.md excluded. Over band-ai#802: OMP image and turn-outcome probes move into its imageprobes.py/outcomeprobes.py registries; uv.lock regenerated over band-ai#796. Upstream-PR: band-ai#763
Source-Base: 4184abb Source-Head: a625466 Applied-Over: 00f3dfb Conflict-Notes: None; exact feature delta over the ported native OMP lifecycle; retained upstream band-ai#709 and band-ai#804 adaptations from the prerequisite. CHANGELOG.md and FORK-CHANGES.md excluded. Upstream-PR: band-ai#798
Why
Stopped rooms probe
/nextat the base reconciliation interval indefinitely to discover missed PLAY controls. Hosts need to reduce that polling volume without slowing active-room recovery. Session tunables need consistent typed validation and environment configuration, and runtime types need clear ownership.What
SessionConfig.stopped_resync_secondsfor fixed stopped-room polling, falling back to the base interval when unset.SessionConfigto Pydantic settings. Explicit keyword arguments override case-insensitive environment values; empty values use defaults. Reconciliation intervals share positive, finite constraints and existing working-state timing rules remain enforced.runtime/types.pyand update SDK callers, the bridge, examples, tests, and README imports directly. Record the import-ownership rule inAGENTS.md.Scope
Quiet-room backoff, startup/reconnect reconciliation, and control fencing are unchanged. The configuration migration intentionally makes
SessionConfigconstruction keyword-only and serialization usemodel_dump(). The oldband.runtime.typesimport path is removed without compatibility aliases. Other runtime configuration behavior is unchanged.