Repository navigation
Conversation
|
🦞👀 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 real behavior proof before merge. What this changesThis PR queues another requester’s mid-turn message as their own followup instead of refusing it when collaborative steering is disabled. Example: Alice’s turn is running when Bob sends “Check tomorrow’s schedule” with allowCollaborativeSteering set to false.
Review scores
ProductKind: Preference · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep open: this collaborator-authored PR addresses a useful group-chat limitation that remains on main, and inspection found no definite introduced code defect. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherChannel messages and Gateway chat.send requests enter session-controller admission, which either injects compatible input into an active execution or queues a separate requester-owned execution and reply. flowchart TD
A[Channel message or chat send] --> B[Session controller admission]
B --> C[Active requester comparison]
C --> D[Compatible steering]
C --> E[Requester followup queue]
E --> F[Current execution policy]
F --> G[Separate execution and reply]
Technical reviewBest possible solution: Use the existing requester-owned followup queue while preserving active-turn isolation, ordering, cancellation, and current-authority checks. Do we have a high-confidence way to reproduce the issue? Current-main source deterministically refuses identified cross-requester steering with collaboration disabled; the supplied live trace demonstrates the proposed queued behavior, while its baseline runtime attempt failed during setup. Is this the best way to solve the issue? This is a focused change to an intentional refusal policy: it reuses established followup admission and removes the replaced refusal path without adding another queue or authority owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9372bf6c87ca. Provenance checked
TestingProof path: shipped entry point. SecurityNeeds attention: Active-turn isolation remains enforced, while automatic delayed execution makes final-effect authority validation material. EvidenceWhat I checked:
PR surfaceSource -234, Tests -87, Docs -6, Generated 0. Total -327 across 29 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 HistoryReview history (1 earlier review cycle)
Reviewed October 26, 2026, 9:48 PM ET / October 27, 2026, 01:48 UTC (Revision 2). |
Live Telegram proof (Test Server userbot, exact head
|
| elapsed | event |
|---|---|
| 30.38 s | QA user message sent (scenario action 2) |
| 31.43 s | SUT: "Your message is queued for a new turn after the current turn finishes. It hasn’t changed the work already in progress." |
| 50.92 s | SUT: OPENCLAW_E2E_OK (QA user's own turn, after the operator turn was released) |
No refusal notice and no /followup or config-key text was sent.
Model boundary (/v1/responses requests):
- Request Login fails with 'WebSocket Error (socket hang up)' ECONNRESET #2 is the held operator turn. It contains the operator text and not the QA text, so the Telegram user's input never joined the operator's active execution.
- Requests Images not passed to Claude CLI - only path reference in text #4–CLI: add Opencode integration #5 are the QA user's separate followup turn, run after the active turn. They see shared conversation history as documented.
Gateway: steering rejected; applying follow-up policy {"reason":"requester-mismatch","disposition":"followup-policy","channel":"telegram","activeRunId":"proof-operator-turn-1"}.
Baseline note: I attempted the same scenario on the base commit (050cb51a504b9), but it was not a valid comparison. That fresh worktree failed to load memory-core, and its operator turn errored before the mid-turn send. Old-code coverage remains the targeted regression tests, which fail on the base and pass here.
Bot ids, usernames and chat ids are omitted.
0bcf3e0 to
0eef404
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Related: #157806
What Problem This Solves
Fixes: in a group chat, a message from a second person is dropped while someone else's turn is running, and the sender gets an admin-facing refusal ("collaborative steering is disabled … resend as
/followup").User Impact
User impact: with the default
messages.queue.allowCollaborativeSteering: false, another person's mid-turn message is now queued as their own turn and runs after the current one, under their own identity and current permissions. They see the existing "Your message is queued for a new turn…" notice instead of a refusal. Nothing is dropped, and nobody needs to know about/followupor the config key. Operators who setallowCollaborativeSteering: truekeep cross-person steering. Same-requester steering, queue caps, explicit/followupand access checks are unchanged.Why This Change Was Made
#157806 correctly stopped one person's input from steering another person's execution with that execution's permissions. It enforced that by refusing the input. The same guarantee holds if the input instead becomes the sender's own followup turn, which the existing
requester-mismatchfollowup path already supports. This change routes the disabled-collaboration case into that path on both the channel andchat.sendentry points. It also removes the refusal helper, notice and its plumbing.The session controller still rejects cross-requester injection into a live run. Only the reason changes, to the existing
requester_origin_mismatch, so callers queue the followup instead of refusing.Evidence
Targeted tests (exact head
0eef404, rebased on currentmain): 128 tests pass across steering fallback, native/steer→ followup,chat.senddirect followup and steering custody, message injection and the message-join controller.pnpm tsgo:core, oxlint,oxfmt --checkandgit diff --checkare clean. With only the production changes reverse-applied, the new followup assertions fail (3 + 1 + 1 cases).Live Telegram Test Server userbot proof (details). One DM conversation; the first requester is the Gateway operator (
chat.send), the second is the real Telegram user; the mock model is held so the first turn stays active.steering rejected; applying follow-up policy {"reason":"requester-mismatch", … "activeRunId":"proof-operator-turn-1"}./followuphint or config key is shown.Authority (merge-risk item). The cross-person message now enters the same followup admission that explicit
/followupandmessages.queue.mode: "followup"already use onmain. This PR adds no new admission path and no new authority. At admission the queued turn:chat-send-direct-followup.test.ts), never Alice's;prepareReplyRunToolAuthority,followup-turn-execution.ts:380-386);agent-runner-admission.ts:41-43) and operator authority, and a revoked operator authority is consumed without execution (followup-runner.test.ts:514).Known pre-existing gap, not introduced here. Channel sender access (
allowFrom, group access) is decided once at ingress and is not re-evaluated when a queued followup drains. This is true for every queued followup onmaintoday.docs/concepts/session-controller.mdsays "Authorization policy belongs at ingress", and Telegram'schannels.telegram.{dmPolicy,allowFrom,groupAllowFrom,groupPolicy}reload as no-ops "captured at ingress/turn admission" (#146129).allowFromthrough hot-reloadconfig.patchwhile their message waited did not stop that queued turn.Data compatibility. The removed
collaborative-steering-disabled/collaborative_steering_disabledvalues lived only in in-memory admission state, transient injection outcomes and a diagnosticsreasonstring.false) are unchanged. Omitted,falseandtrueall keep loading; only the runtime behavior offalsechanges.Gap: in the
chat.sendpath the queued admission recordssteering-unavailablerather thanrequester-mismatch; the user-facing notice is identical.