Repository navigation
fix: scheduled conversation reviews report delivery failure - #188146
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 maintainer review before merge. What this changesCount a confirmed same-conversation result commit as delivery for scheduled announcements without an external route. Example: A scheduled Control UI review saves REVIEW-AFTER.md in its existing conversation without a messaging channel.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR is ready for normal landing consideration: the prior skipped-write finding is fixed, no actionable defect remains, and exact-head gates pass. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherCron submits scheduled work through ordinary session admission; settlement writes the answer through the existing conversation-result owner and returns delivery facts for completion accounting. flowchart TD
A[Scheduled announcement] --> B[Cron session runner]
B --> C[Session admission and execution]
C --> D[Conversation result writer]
D --> E[Committed or skipped receipt]
E --> F[Delivery and completion accounting]
Technical reviewBest possible solution: Land the existing commit-receipt propagation while preserving external delivery obligations and the canonical conversation writer. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the commit-versus-delivery mismatch, supported by the reporter’s native reproduction and inspected before screenshot; this review did not rerun it. Is this the best way to solve the issue? The patch repairs accounting at the existing owners, preserves skipped writes and external obligations, and extends a production-path integration fixture without adding another dispatcher or persistence mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6052fffac299. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +47, Tests +118, Docs +1, Other +2. Total +168 across 8 files. Added test files: 0. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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 HistoryReview history (1 earlier review cycle)
Reviewed October 30, 2026, 4:27 AM ET / 08:27 UTC (Revision 2). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Fixed: scheduled reviews report successful delivery after their result is committed to the same conversation. |
…#188146) Count a committed same-conversation scheduled review as delivered when no external route is required, while preserving skipped writes and external delivery failures. Fixes openclaw#188131.
…#188146) (cherry picked from commit f718482) Release adaptation: bounded product, matching tests and relevant documentation only. Excluded: config/test-lines-allocations/session-review-delivery.txt. Carry actual internal result-commit evidence; same-conversation internal success only, preserve external failures and skipped writes. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit e236180f3345fa90b631e75f835fdeff1f7cdf89)
Fixes #188131
What Problem This Solves
A scheduled review can finish inside its existing Control UI conversation, save its work, and display the answer, while the automation still reports failed completion and “Not delivered.” This happens when announce delivery has no external messaging route: the shared-session runner treats missing channel coordinates as a delivery failure even after the existing conversation writer commits the answer.
User Impact
A persistent same-conversation announcement now records successful delivery when its settled answer is actually committed to that destination. Users can rely on the completion state without configuring an unrelated messaging channel or sending the review elsewhere. The answer remains a single conversation result; this does not fabricate a transport or message-tool send.
Explicit external destinations, remembered external routes, unavailable creating conversations, and different source/execution destinations remain outside the internal fallback. Native-only payloads that cannot produce a conversation entry remain undelivered. Supported main-session aliases use the existing Cron key resolver. Quiet runs, deliberate silence, cancellation, and current session/operator authority retain their existing owners and behavior. There is no configuration, schema, or public protocol change.
Why This Change Was Made
The existing session-event settlement path already owns the useful conversation write. It now preserves the writer’s committed-versus-skipped result and returns the fact that a write committed, which the scheduled runner consumes only when the internal destination is the same session. The runner rechecks the current delivery route before that commit and preserves its existing occurrence and authority fences.
This keeps result persistence and delivery policy with their current owners. It avoids another dispatcher, duplicate result writes, error-text matching, or treating successful computation alone as delivery evidence. The focused regression extends the existing integration fixture, with a small test-line allocation for internal delivery, deliberate silence, and a genuinely unavailable external destination.
Evidence
On base 87facf0, a normal administrator asked for one later review in the same conversation, then changed a criterion before execution. The single scheduled run produced a useful visible review and a 19,034-byte saved file; all three original files kept their hashes. Its native event and run receipt nevertheless reported
status: ok,completionStatus: failed, anddeliveryStatus: not-deliveredwith the missing-channel error.The new real-owner integration case failed on unchanged production code after confirming one persisted result, with
delivered: falseinstead oftrue; the six existing cases passed. The current candidate passes all 14 cases, including internal silence, explicit external failure, native-only output, configured main keys, legacy agent-main aliases, global-scope main aliases, and a different-conversation control. Only model decisions and the external channel transport are synthetic in that fixture; scheduling, admission, conversation persistence, and settlement use their production owners.Remote validation passed changed-file formatting/lint and all selected production/test compiler graphs on the final tree. The initial 754 tests across 53 affected files passed; after the reviewed receipt/key corrections, all 268 tests in 13 affected files passed. The final global-main comparison correction also passes all 163 tests in eight affected files, retaining applicable earlier results. The two correction batches took 278.89 and 194.28 seconds. The 13-case predecessor fixture measured 49.91 seconds in its focused run because it exercises the actual Gateway, session admission, SQLite result commit, and settlement together. Broad hosted checks and the final independent recheck are clean on e537ad0.
The corrected live run accepted a new criterion on the same job before execution and produced a 20,930-byte review using the amended 60-book capacity and 100-book overflow. All original files and the earlier review kept their hashes. One native execution settled as
completionStatus: succeeded,delivered: true, anddeliveryStatus: delivered, with the internal fallback recorded and no delivery error. The conversation displayed one useful final result, unchanged after reload. The successful one-shot removed itself normally.The captures compare failed-job history before the fix with global history afterward because the successful job has already retired. The 43-second recording joins the actual scheduling/criterion and completion/reload windows; idle time and observer recovery are omitted, and no model work was replayed.
Visual evidence
Condensed scheduling, criterion update, successful history and conversation reload
proof.mp4
Visual verification
e537ad08b4612ce28ec907e8cf4cec76ac1eea9c