Skip to content

fix: scheduled conversation reviews report delivery failure - #188146

Merged
shakkernerd merged 3 commits into
mainfrom
session-review-delivery
Oct 30, 2026
Merged

shakkernerd merged 3 commits into
mainfrom
session-review-delivery

Conversation

@shakkernerd

@shakkernerd shakkernerd commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

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, and deliveryStatus: not-delivered with the missing-channel error.

The new real-owner integration case failed on unchanged production code after confirming one persisted result, with delivered: false instead of true; 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, and deliveryStatus: 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

Open preview

Before After
A useful scheduled review with failed completion and Not delivered The new review is Delivered and uses the amended 60-book capacity

Condensed scheduling, criterion update, successful history and conversation reload

proof.mp4

Visual verification

  • Baseline: 87facf0
  • Exact head: e537ad08b4612ce28ec907e8cf4cec76ac1eea9c
  • Scenario: Ask for one later review in the same conversation, amend a capacity criterion before execution, then inspect its useful saved result and native delivery/completion. No external messaging route is configured.
  • Runtime/build: OpenClaw 2026.10.9; Gateway build 2026.10.9-e537ad08b461-2026-10-30T07-44-08.147Z; fresh UI document 2026.10.9-e537ad08b461
  • Native completion: failed → succeeded
  • Native delivery: not-delivered → delivered; internal fallback confirmed
  • Execution and persistence: One scheduled run; one visible result, unchanged after reload
  • Saved work: 20,930-byte new review; original packet and prior review unchanged
  • Exact final Gateway and fresh document identities verified independently.
  • The amended criterion was accepted on the same job before execution; the result correctly uses 60 spaces and 100 books of overflow.
  • Before uses retained failed-job history; after uses global history because the successful one-shot removes itself. This lifecycle difference does not change the accounting comparison.
  • Both runs use the same conversation, packet, viewport and theme; the new 60-book criterion deliberately differs from the earlier 72-book criterion to prove the fresh amendment was used.
  • Runtime identity details are redacted. The recording joins two actual capture windows; idle time and observer recovery are omitted and no model work was replayed.

@shakkernerd shakkernerd self-assigned this Oct 30, 2026
@clawsweeper

clawsweeper Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: S labels Oct 30, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 30, 2026
@clawsweeper

clawsweeper Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Count 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.

  • Before: The useful answer appears, but completion reports failed and delivery reports Not delivered.
  • After: The committed answer satisfies delivery, and completion reports succeeded without an external send.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused contract repair with inspected user-visible proof, meaningful owner-level controls, a resolved prior finding, and passing exact-head gates.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected Control UI captures show the changed Cron accounting before and after the fix, and the exact-head native-run account records successful delivery with one persisted result after reload.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A scheduled review visibly completes useful work but reports failed completion because its conversation commit is absent from delivery accounting.
Reason: The maintainer-authored direction restores the documented internal-delivery contract with a focused change.

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
Reviewed head: e537ad08b4612ce28ec907e8cf4cec76ac1eea9c

Before merge

None.

Findings

None.

Agent review details

How this fits together

Cron 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]
Loading

Technical review

Best 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

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +47, Tests +118, Docs +1, Other +2. Total +168 across 8 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 5 74 27 +47
Tests 1 149 31 +118
Docs 1 1 0 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 8 226 58 +168

Review metrics

Metric Value Why it matters
Production versus test changes Production +74/-27; tests +149/-31 The production growth carries commit evidence and confines fallback eligibility; test growth extends the existing owner-level table for distinct routing, silence, and skipped-write failures.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #188131
Summary: This PR addresses the canonical delivery-accounting report; global-session selection and native-payload projection are distinct neighboring concerns.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: A bounded automation accounting defect reports failure despite successful visible work; no lost result or runtime outage is established.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-30T06:46:34.811Z sha 4898d52 :: needs changes before merge. :: [P2] Preserve skipped writes before asserting conversation delivery

Reviewed October 30, 2026, 4:27 AM ET / 08:27 UTC (Revision 2).

@shakkernerd

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 30, 2026
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 30, 2026
@shakkernerd
shakkernerd merged commit f718482 into main Oct 30, 2026
153 of 154 checks passed
@shakkernerd
shakkernerd deleted the session-review-delivery branch October 30, 2026 08:31
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Fixed: scheduled reviews report successful delivery after their result is committed to the same conversation.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 31, 2026
…#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.
github-actions Bot pushed a commit to clawhaven/openclaw that referenced this pull request Nov 23, 2026
…#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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Same-conversation scheduled review reports failed delivery after its result is committed

1 participant