Repository navigation
fix: keep ambient chatter from evicting user requests - #191733
Conversation
OpenClaw-Publication: 4ccedf5d-d860-4b15-85e9-251f70601797
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR sheds optional ambient events before user requests and preserves bounded previews on an existing pending turn. Example: With followup cap 2, Ada's deploy request is followed by Grace's and Linus's ambient messages.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored PR open: current main still allows ambient overflow to evict user requests, and source review found no actionable introduced defect. Priority: P1 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherChannel inputs enter the shared session mailbox, which applies overflow policy and drains accepted work into agent turns while settling channel receipts. flowchart TD
A[Channel inputs] --> B[Session mailbox]
B --> C[Overflow policy]
C --> D[Pending user turn]
C --> E[Ambient disposition]
E --> F[Channel receipt settlement]
C --> G[Bounded background previews]
G --> D
D --> H[Agent execution]
Technical reviewBest possible solution: Keep ambient shedding in the existing mailbox owner, with bounded recipient-owned context and unchanged authority and request-versus-request overflow rules. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the failure with followup cap 2: an oldest direct request followed by ambient events becomes an overflow summary; no target code was executed during this review. Is this the best way to solve the issue? The change repairs the shared mailbox boundary and uses the existing turn lifetime for previews; the added tests protect distinct failures without introducing a parallel queue or unnecessary test scaffolding. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ae420c504045. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +172, Tests +191, Docs +28, Other +3. Total +394 across 13 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed November 4, 2026, 9:23 PM ET / November 5, 2026, 02:23 UTC (Revision 3). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
OpenClaw-Publication: 933231df-b944-4a6d-9e8d-becfd2191d99
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Follow-up to the current ClawSweeper reviewChecked published head Executed behavior evidenceThe published head and locally tested candidate
The current-head CI changed-tests job also passed all 9 Gateway session-input lifecycle integration tests, including followup, steering, stop preservation, and announcement/recovery interactions. These are useful sibling checks, not ambient-channel overflow proof. Current-head CI attributionCI run
Gateway failure: attribution now establishedRan the same focused command with the repository test wrapper and pinned Bun runtime, using isolated test state: node scripts/run-vitest.mjs src/gateway/server.goal-child-authority.product.test.ts --maxWorkers=1
These are local macOS replays, not a claim that Linux CI was rerun. The matching failure on unchanged base establishes that this PR is not required to cause it. Source attribution: #192722 / Both substantive CI failures are therefore inherited: the 51-line budget deficit and this stale post-revocation RPC expectation. No CI retry, assertion weakening, or unrelated production change was made. This corrects the earlier unresolved attribution; it does not close the separate live-channel proof gap. Live-channel proof attempt and blockerRan the canonical Telegram Test Server readiness command: node .agents/skills/telegram-e2e-userbot/scripts/telegram-test-doctor.mjsIt returned To complete the missing real-channel proof, the QA credential owner must supply authenticated access to the existing Convex broker, or privately provide No code, budgets, or branch history were changed for this follow-up. The PR remains unmerged. |
* fix: preserve user requests during ambient queue overflow * fix: settle discarded ambient input without delivery scopes * fix: keep ambient chatter from evicting user requests OpenClaw-Publication: 4ccedf5d-d860-4b15-85e9-251f70601797 * fix: preserve bounded ambient context during queue overflow * Publish openclaw/fast-shell OpenClaw-Publication: 933231df-b944-4a6d-9e8d-becfd2191d99 --------- Co-authored-by: RomneyDa <[email protected]>
Upstream openclaw#191733 sheds ambient room events at the cap with a settled, no-retry discard, and isDiscardableRoomEvent has no owner check, so the human owner's unaddressed room message could be silently consumed. Mark it protected before capacity selection through the existing protectFromQueueOverflow flag. Ownership is the channel-verified sender identity in commands.ownerAllowFrom (isConfiguredCommandOwner), never the wider senderIsOwner bit (operator.admin scope, operator profiles), and a listed bot account such as a prince stays ambient. Non-owner ambient discard is unchanged. At a full protected cap the existing queue-cap refusal already releases the source for retry. Refs #1564
* fix: preserve user requests during ambient queue overflow * fix: settle discarded ambient input without delivery scopes * fix: keep ambient chatter from evicting user requests OpenClaw-Publication: 4ccedf5d-d860-4b15-85e9-251f70601797 * fix: preserve bounded ambient context during queue overflow * Publish openclaw/fast-shell OpenClaw-Publication: 933231df-b944-4a6d-9e8d-becfd2191d99 --------- Co-authored-by: RomneyDa <[email protected]> Source: 69d6eae Release adaptation: Selected queue-only production and regressions applied cleanly atop baseline source custody. Required requests displace ambient only, previews bounded to same route and approved text, attach once. Terminal discard uses existing lifecycle adoption without executable backlog. Excluded QA transport/docs/allocation. Later openclaw#193313 broader ingress policy-drop work not imported; baseline unbound payload/custody retained. Formatting/diff checks pass; runtime unavailable due established setup blocker. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 88dc9f72f0e34b12944e155d90d5c884b7f2bbb7)
What Problem This Solves
Closes #182176. Follow-up to #187833: optional room events must not evict or delay explicit user requests when the follow-up queue reaches capacity.
User Impact
Requests retain their place ahead of optional room events. Under the default
summarizepolicy, overflow ambient text is compacted into bounded background context on an eligible pending turn, rather than always discarded or replayed as extra turns. Explicitoldandnewpolicies still discard ambient overflow without previews.Behavior and limits
min(cap, 20)previews, ordered by mailbox arrival. Each message body is capped at 160 characters; sender and message ID fields at 80 each.contextPreservedwithout message content.Evidence
6275c329bf19: ambient overflow has no context undersummarize.git diff --check, line-cap ratchet, and staged test-line ratchet pass.65181e714709..06a8405bf219(high reasoning effort), finding no actionable correctness or security issues; no review findings remain. It did not execute tests or mutate GitHub.2241d0d4d086was 8 lines over its ceiling, and unchanged base232327e0239awas already 8 over. The PR allocated its own complete test growth. Revised-head CI must be assessed separately.Scope and review
The revised design replaces unconditional default-policy content loss with context owned by an existing pending turn.
pr-simplifyavoided a mailbox-wide buffer, cleanup state machine, new configuration, and independent replay work. Compared with the original merge base: production +172 net lines, tests +191, docs +28. The dedicated allocation covers exactly the PR's 191 net test lines; the shared scalar is unchanged.