Repository navigation
fix: show why channel messages fall back from steering - #165876
Conversation
Report bounded steering rejection reasons and distinguish follow-up policy, confirmed queue admission, rejected admission, and known queue-cap drops. Keep message content and raw errors out of default diagnostics. Repair stale authority queue fixtures to observe actual acceptance and final delivery through the current session owner without waiting for a timeout. Related: #150918
|
🦞👀 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. Reviewed October 5, 2026, 8:58 PM ET / October 6, 2026, 00:58 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR adds privacy-conscious warning logs explaining why incoming channel messages fall back from steering, documents their fields, and updates queue regression coverage. Merge readiness✅ Ready for maintainer review The prior completion-barrier finding is resolved, and no remaining introduced correctness defect was found. Current main still lacks these diagnostics, so the PR remains useful. Priority: P2 Review scores
Verification
How this fits togetherThe channel reply runner decides whether incoming messages join an active agent turn or enter the follow-up queue. These diagnostics expose that decision and queue admission outcome to operators. flowchart TD
A[Incoming channel message] --> B[Reply runner]
B --> C{Steering eligible?}
C -->|Yes| D[Active turn injection]
C -->|No or rejected| E[Follow-up queue policy]
E --> F[Warning with reason and disposition]
E --> G[Later reply or recorded rejection]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +175, Tests -36, Docs +10. Total +149 across 5 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep fallback diagnostics in the existing reply owner, with bounded reasons and accurate admission outcomes that preserve queue ordering and privacy. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main routes steering rejection explanations through verbose logging, leaving default logs without these reasons. No runtime reproduction was executed. Is this the best way to solve the issue? Yes. Adding bounded diagnostics at the existing decision owner avoids another routing mechanism and preserves the original source-completion regression. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 43b33cecb225. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Integrate main to resolve the authority-test conflict while preserving its source-owned completion barrier separately from steering target selection. Retain the original source-keyed ordering and image regression and report source-operation-pending through the same bounded fallback diagnostics. Related: #150918
|
Merged via squash auto-merge.
|
Report bounded steering rejection reasons and distinguish follow-up policy, confirmed queue admission, rejected admission, and known queue-cap drops. Keep message content and raw errors out of default diagnostics. Repair stale authority queue fixtures to observe actual acceptance and final delivery through the current session owner without waiting for a timeout. Related: openclaw#150918
Related: #150918
What Problem This Solves
Fixes: channel messages that fall back from steering have no explanation in default logs, so a deliberate wait can look like lost input.
User Impact
Operators can see a bounded rejection reason and distinguish a follow-up policy decision, confirmed queue admission, rejected admission, and a known queue-cap drop. No configuration or upgrade steps are required.
Why This Change Was Made
The reply owner previously logged these decisions only with verbose logging. Warnings now omit message text, attachments, session keys, and raw exceptions. Terminal-reply and pending-source-operation paths report the actual enqueue outcome, including rejection.
The source-operation completion barrier from #165788 is preserved, along with its original source-keyed ordering and image regression. Steering still targets the current target-session operation. The privilege-mismatch case uses the real queue's acceptance and delivery lifecycle, avoiding the unrelated 15-second settlement timeout. Related receipt cases stay in the existing companion file, and the oversized test file shrinks.
Evidence
80d27bdf9111d1aa2d5c1334432d099a6dd4a4f7, all 38 active-steering cases pass. The restored source-barrier case first passed its original ordering/image assertions and failed only the added warning assertion; it passes withsource-operation-pendinglogging. Earlier controls also reproduced missing warnings for backend rejection, terminal receipts, queue-cap outcomes, and rejected enqueue.OPENCLAW_E2E_USE_PREBUILT_DIST=1 pnpm test src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts --maxWorkers=1 -t 'runReplyAgent active steering': 50.37 s wall, 47.21 s Vitest, with completed E2E prerequisites reused. Privilege-mismatch and source-barrier cases took 2.034 s / 0.890 s. CI timing is not available yet.5e685462and the initial logging candidate both produced 222/224, taking 201.82 s / 213.81 s wall. One failure was a stale enqueue assertion; the other protected the real source-completion defect subsequently fixed by fix(auto-reply): wait for source operations before draining followups #165788. The original regression is retained. The complete 225-case suite has not been repeated after integration.5e685462, an isolated built Gateway exercised real Telegram ingress, durable storage, reply runtime, and completions requests. Both a plain correction and a 2,152-character forwarded correction reached the first provider continuation after a running tool; each produced one final reply and completed ingress without retries. Full forwarded text and origin context survived. Telegram and the model were local API stand-ins: this is runtime-boundary evidence, not live Telegram/model proof. The historical long ingress hold was not reproduced or attributed to this PR.