Repository navigation
fix(cron): keep delivered results in the destination conversation - #168996
Conversation
Write cron results once through the canonical session writer in the resolved destination, independent of the execution session. Send the prepared notification route without re-resolving it, and remove recipient mirrors and creator awareness notes. Keep cross-agent delivery transport-only and record a warning rather than writing unread context into the job agent's local session. Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Kimiyu-186 <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review blockedAutomated review did not run, so no review verdict was produced. Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here. Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update. Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it. |
|
@clawsweeper re-review The input-safety diagnostic identified an unverified FTP detector finding in the synthetic completion-webhook redaction fixture. The fixture now uses the existing URL-construction pattern with placeholder credentials and still exercises credential redaction. No real credential was involved. The cron failure-alert fixture now supplies a real destination, and the intended prompt snapshots have been regenerated. |
|
🦞👀 Re-review progress:
|
* fix(scan): qualify Cron FTP destination-owner source blobs Add only two reviewed complete-source hashes for the unchanged synthetic FTP fixture in openclaw/openclaw#168996. Preserve detector, decoder, native value, line, path, mode, ref, occurrence and verification checks. * docs: refresh Cron qualification for frozen destination-owner head
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR records confirmed automation output once in the receiving conversation through the canonical session writer. Example: An automation created in conversation A delivers “Readiness 65 today” to Telegram conversation B.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it addresses demonstrated missing destination context, repairs the prior current-session generation defect, and has no remaining actionable finding. Priority: P1 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherCron finalization consumes execution output and prepared delivery coordinates, confirms channel delivery, then publishes model-visible output through the destination’s existing conversation writer. flowchart TD
A[Automation execution] --> B[Finalize visible payload]
B --> C[Prepared destination]
C --> D[Durable channel send]
D --> E[Confirmed delivered payload]
E --> F[Canonical conversation writer]
F --> G[History and next model turn]
Technical reviewBest possible solution: Use the confirmed destination payload and existing serialized conversation writer while retaining implicit source custody and visible warnings for failed history writes. Do we have a high-confidence way to reproduce the issue? Current source retains the competing mirror/awareness paths, and the supplied main-control Telegram readback demonstrates a delivered result missing from the next destination provider request; this review executed no target code. Is this the best way to solve the issue? The patch consolidates result persistence behind the existing conversation writer, commits effective delivered content, and preserves delivery success when subsequent history work fails. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 963017465bce. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -652, Tests +1289, Docs -2, Other -8. Total +627 across 68 files. Added test files: 5. View PR surface stats
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 (5 earlier review cycles)
Reviewed October 11, 2026, 2:48 PM ET / 18:48 UTC (Revision 6). |
…absorb: step 57 openclaw#168996 "fix(cron): keep delivered results in the destination conversation", isolated as its own step (+3 conflicts). It removes recipient mirrors and creator-awareness notes and deletes the cron delivery-outbound runtime barrel. Conflicts: - delivery-outbound.runtime.ts: deleted upstream; our only delta was the enqueueSystemEventRaw alias re-export. No cron code imports system events any more, so the deletion is taken. - delivery-dispatch.double-announce.test.ts: took upstream's rewrite (2076 -> 1680 lines). Our line-cap helper delivery-dispatch.double-announce.test-support.ts (emptyParams, deletingRunParams) and the enqueueSystemEventRaw mock alias are obsolete and removed; the two mock-isolation annotations our side had (outbound send deps, system events) are re-applied so the mock-factory baseline stays shrink-only. - test-mock-exports-baseline.txt: upstream's removals plus our 19 removals (mock factory ratchet OK vs step 56). Refs #1475 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…gain Step 57 (5e55eb2) took upstream's openclaw#168996 rewrite of delivery-dispatch.double-announce.test.ts and dropped our enqueueSystemEventRaw mock export. The "real outbound retry outcomes" suite loads the real cron run path, whose continuation modules import system events under that name, so the suite failed to load: "No "enqueueSystemEventRaw" export is defined on the mock", 5 cases skipped. Both names now share one mock function, as they are one function in the real module, so the suite's "not called" assertions cover both. Pre-fix at 9a3022b: 67 passed | 5 skipped, file FAILED. Now 72/72. Found by 🩸 Cael's review of 9a3022b. Refs #1475 Co-Authored-By: Claude Opus 5.5 <[email protected]>
What Problem This Solves
When an automation delivers to another conversation, that conversation can receive the message without the result becoming available to its next model turn. Transcript-only mirrors and creator-awareness notes provide competing accounts of the same result.
Why This Change Was Made
Make the resolved destination own the conversation result for agent, command, and script jobs. Send the already prepared channel/account/recipient/thread without resolving it again against the execution session. After confirmed delivery, commit through the canonical background-result writer, behind active turns and with occurrence idempotency. A conversation-write failure cannot undo confirmed delivery. If execution already owns the destination, retain its existing final reply instead of appending another.
Remove recipient mirrors and creator-awareness notes. Normalize intentional silence before either sending or writing.
User Impact
noneandwebhookdo not create automatic conversation results.Evidence
121c1905e804f6177fd12157b91e9de22924c197includes main's UI test-contract repair (ab6c07f595e). Confirmed voice-only speech now enters the existing conversation projection, preserving speech and omitting generated audio. Successful transport fixtures report their confirmed payloads, and media revocation fixtures use a media-capable adapter without weakening cancellation or owner-revocation assertions.121c1905e804: one native result at +13.475s (Bot API message 82447), exactly one canonical conversation entry, and exactly one occurrence in the next provider request. This round used a DM because Test Server forum fixture preparation failed before Gateway startup. The DM job and all six run-owned messages were removed with deletion readback. The failed forum's exact-title server search found no remaining group; its lease and the final DM lease were released, and both proof ports were free.ac012cc19783aabd1323480bc2d30e3f9e8c5b76preserves the existing source-isolation policy, binds routes only after confirmed delivery, and records the effective delivered payload. Its runtime-only build passed with the shared build cache.a4056f5bbccdf54679f56dd579dfd22ab945c7c1: corruption now interceptscat-file --batchwhile retaining the integrity assertion. After integrating that repair, candidate0caf96bddec3passed all 12sessions-files.repository.test.tscases in 93.26 seconds.fdd38e70c856d2e4fb0415abdfffbe7bfc918f8b, the nine owner suites plus outbound queue/recovery integration suites passed 225 tests in 11 files, 197.69 seconds. Sixteen targeted counterfactuals failed when their protections were removed; the rebase-sensitive unknown-replay and physical-send deduplication counterfactuals were also rerun and restored.message_sendinghook rewriting the visible text. All fail onc407dec21ac2for the reported reason and pass after repair. The repaired cron suites pass 37 tests in 89.27 seconds, and the Gateway completion suite passes 19 tests in 108.38 seconds.c407dec21ac2and passes after repair: external delivery continues and the result enters the current destination session. Routeless creator deletion/reset remains fail-closed. Existing released-row coverage still loads and delivers stored jobs without rewriting retained receipts or schema; the minimal persisted fields are also present in the inspected latest stablev2026.10.1contract. This PR changes no stored schema.667cce02e196add1e184096d2740856621eb2447, the refreshed Telegram A → A, A → B, and explicit-destination reset round passed all 16 checks with 22 provider requests. One A message arrived at +8.368s, one B message at +17.836s, and a further result reached B after native/new; transcript and next-provider-request readbacks showed exactly one destination result and no creator copy. The forum and both jobs were deleted, with a zero runner exit.ac012cc19783passed all six cases below with 56 recorded provider requests.session:B→ BNO_REPLYNO_REPLY; neither A/B history nor subsequent provider context contains it./newin B, then run againThe doctor passed. The forum was deleted, all five jobs removed, run-owned DM messages verified deleted, and the runner exited zero. Native identities, full events, per-session Gateway transcript reads, and provider requests are retained privately. The thread-99 fixture is a persistent execution-session key, not a fabricated native Telegram private thread. The first reset checker incorrectly expected
sessionIdrotation; native/newpreserves that identifier and rotates the lifecycle revision. The corrected checker uses the native acknowledgement, occurrence identity, and model-context readback from the same preserved recording.Round 1 on repair head
7c740dbb53392c07278a0dc291530f7fe9cbae3dalso passed all five cases with 52 provider requests and clean fixture teardown. Two earlier candidate repetitions atfdd38e70c856passed the same cases.Main control at
3f97b146a5aa8dc4c4fdec77d5b182936a74cfe1, A → B twice: one message arrived in B at +9.082s / +7.635s. Both runs showed one transcript-only mirror in B, but the next B provider request contained zero occurrences of the result; A also contained none. This is the discriminating contrast with the candidate's canonical, model-visible destination entry. Both control forums and jobs were deleted, with clean runner exits.The pre-existing synthetic FTP URL in the completion-webhook redaction fixture is unchanged. ClawSweeper #1931, merged as
472765315dd11b112847ed39a0b2e7d9912f293b, qualifies the exact base/head source blobs for this candidate. The native scan refused before qualification and admitted afterward; foreign-path and changed-source controls remain refused. Only two complete-source hashes were added; the fixture, detector, decoder restrictions, and verification policy are unchanged.Known limits
automations showand run-history JSON, not the Control UI's run-history view (#168687).session:<key>) and delivering elsewhere retains its run in the executing conversation's transcript; the destination separately owns the delivered result.Related: #168615 — source of this destination-owner split; the prepared worker-command protocol is not included.
This has a one-way data effect: reverting stops the new behavior but does not relocate entries already written. The blast radius is automation result delivery and the transcript context available to the next reply in the selected destination.