Repository navigation
fix: Buzz bots recover relay stalls and reject revoked senders - #130467
Conversation
Keep release notes in the PR body and leave the release-owned changelog unchanged.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 7:33 PM ET / 23:33 UTC. ClawSweeper reviewWhat this changesThis PR makes the Buzz channel recover stalled relay sessions, apply live signed room rosters, recheck sender membership before dispatch, and preserve room activation floors across reconnects. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep this active maintainer repair open for normal exact-head merge review. The revised head addresses the prior admission-boundary concern and has no actionable correctness finding. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherThe Buzz channel plugin turns relay events into authorized agent turns and sends replies back through the relay. Its gateway owns account status and reconnects when the bus reports a fatal transport or roster failure. flowchart LR
A[Buzz relay event] --> B[Signed membership tracker]
B --> C[Admission check]
C --> D[Agent dispatch]
D --> E[Room reply]
F[Presence heartbeat] --> G[Gateway recovery]
G --> B
Before merge
Agent review detailsSecurityNone. PR surfaceSource +404, Tests +549, Docs +12. Total +965 across 14 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the single bus-owned admission assertion and signed-roster owner, preserve the documented admission-time sender contract, and land only after exact-head CI and normal maintainer review pass. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main lacks the queued and post-policy membership assertion, and the PR supplies focused socket coverage for those ordering cases. Is this the best way to solve the issue? Yes. Membership remains transport-owned, is rechecked only before dispatch, and the documented policy correctly avoids retroactively cancelling already admitted room work. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 02a60e0d8714. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
I reviewed the final-delivery finding and all three Rank-up moves against the existing documented contract. We are preserving the existing admission-time contract: removing an ordinary sender blocks new and queued turns, but does not retroactively cancel a room turn that was already admitted. The documentation now states that boundary explicitly, and a focused real-client/socket test holds an admitted turn, applies a signed roster removing its sender, resumes it, and observes the actual reply addressed to the room. The Bot-role-loss control separately verifies that the retired bus rejects a later send. Accordingly, the proposed final sender checks and the two associated final-effect proof requests are intentionally skipped. This is not a claim that removed principals gain private-room access. Adding only a final sender assertion would not undo already executed agent tools. It would also throw inside the existing replay-guarded turn after work had occurred, potentially releasing the claim for replay. A broader retroactive cancellation policy needs an explicit run/side-effect lifecycle design; this PR does not introduce one. The remaining review points were checked as well. The exact Hosted CI also found a genuine test-helper export portability error. The helper now returns only its Relay override, while the mock factory owns the original-module merge. The exact package compiler failure was reproduced and repaired, including a forced-inclusion declaration check; no compiler flags or assertions were weakened. Exact-head hosted CI remains a separate merge gate. |
|
Merged via squash.
|
* origin/main: (26 commits) fix(plugins): preserve registry epoch on activation rollback (#129232) refactor(plugins): make discovery invocation-owned (#130486) feat(ui): save appearance preferences per user profile (#130340) fix: Buzz bots recover relay stalls and reject revoked senders (#130467) fix(code-mode): serialize catalog handles nested in final values (#130276) fix(webchat): CLI skill and harness-injected turns render as operator-sent messages (#130427) fix(agents): read the published model catalog owner from session_status (#130277) fix(channels): preserve long presentation text (#130368) fix(agents): route CLI bootstrap truncation notice into the system prompt (#130325) refactor(plugins): unify setup registration and artifact selection (#130474) fix(memory): prevent forgotten session content from returning (#130451) refactor(outbound): consolidate transport completion (#130460) fix(workers): protect in-flight workspace manifests from concurrent retention (#130449) fix(portals): keep worker previews reachable and owned by the active environment (#130434) fix(config): keep core channels keys in the generated config schema (#120736) chore(deps): refresh dependencies after seven-day cooldown (#130296) fix(agents): remind exec models to quote shell metacharacters (#125485) fix(auth): honor shared-store ownership in temp-state exec and agent deletion (#130437) fix(openshell): preserve file writes during concurrent mirror commands (#130447) fix(workers): report full nodes as at capacity, not offline (#130445) ...
…law#130467) * fix(buzz): recover stalled sessions and revalidate room admission * test: correct Buzz relay fixture types Keep release notes in the PR body and leave the release-owned changelog unchanged. * test: isolate Buzz relay mock exports * test: clarify Buzz admission and output lifetimes
Related: #129599
Release note: Buzz connection lifecycle: recheck queued sender membership after asynchronous admission, follow signed role updates without stale-query rollback, reconnect unacknowledged presence sessions, and preserve room activation floors across reconnects.
What Problem This Solves
Fixes cases where Buzz could admit a sender after room membership was revoked, remain marked ready on an open relay connection that stopped acknowledging presence, or execute pre-activation history after reconnecting. Current-member role changes could also leave the in-memory roster stale.
Why This Change Was Made
The bus owns a live admission assertion that is checked after queued/dedupe work and again after asynchronous ingress. Cancellation throws so the replay claim is released rather than recording a successful no-op. The existing presence heartbeat now treats the pinned relay library's publish timeout as fatal; explicit relay rejection remains nonfatal. Gateway reconnects reuse the canonical persisted activation floor instead of switching to a broader history window.
The membership tracker now applies the latest received, validated relay-signed roster through one owner, preserving pending removal denials and refusing rollback from older in-flight queries. It removes the obsolete self-join freshness inference that could reject already-reflected startup notifications. Role authority means the latest received signed roster, not unseen upstream database state.
Buzz's wire and signed-event filters differ: every wire filter must have
#hfor room-topic routing, while a signed roster has only#d. The existing manual-REQ helper carries room-scoped wire filters separately from the original strict client filters, preserving normal signature validation. There are no extra subscriptions, polling loops, dependencies, configuration fields, schema changes, or protocol changes.Production: +109/-61 (net +48). The added ownership boundaries are live admission revalidation, signed roster delivery, and the explicit wire/client filter contract. The duplicate reconnect-history path, redundant fatal flag, and obsolete self-join inference are removed. Test support is counted separately, including an extracted relay fixture to keep the lifecycle test file within its existing size limit.
User Impact
Removed room members cannot start queued or asynchronously admitted turns. An unresponsive relay becomes visibly recovering and reconnects. Reconnects retain the documented activation boundary and replay deduplication. Signed Bot-role removal stops the active account until access is restored.
Sender membership is an admission boundary: removing a sender does not retroactively cancel a room turn already admitted for them. Bot-role loss or connection shutdown still fences output. Recipient room access remains the relay's responsibility; this is not a new privacy guarantee.
Evidence
2555e9fa4e4ba6ebe92c3baa8bd9b82398a352a5; the repaired owner tests pass.4f554b6385065b698db819498a6f359b17a45459, using generated enrolled identities and private test rooms: the normal built Gateway passes the canonical canary and mention-gating scenarios (2/2), with a controlled model provider.recovering/publish timed outbefore it resumed. The Gateway reauthenticated, returned to ready, and replied to another real Buzz message. A signed Bot-role downgrade stopped the active bus immediately; restoring the role recovered the account and another reply. Three live round trips passed. Activation-floor and exact replay assertions are covered by the controlled regression, not claimed from this live sequence.recoveringduring the relay freeze before resume, an explicit Bot-role error after downgrade, and readiness plus new replies after both recoveries. All five scoped behavior clauses passed; service roles were restored and the isolated Gateway stopped. This sequence does not establish an exactly-once guarantee.Dependency contracts were checked directly in Buzz room scope extraction, stored-event channel matching, signed roster emission, and the installed
[email protected]publish/filter implementation. The existing Gateway-owned reconnect contract remains in force.