Repository navigation
Conversation
On a channel-less gateway a failing automation's operator alert cannot
be delivered: the delivery failure ('Channel is required (no configured
channels detected)') lands only in job state fields, while the repair
brief injected into the owner conversation says just 'No failure alert
was sent.' - the operator's only visible signal omits the reason
(openclaw#186990).
buildCronFailureRepairBrief now takes the last failure-alert delivery
outcome (from failureNotificationDeliveryFromJobState) and renders it:
the recorded status and reason when a delivery failed, the fact of
delivery when it succeeded, and the original bare sentence when no
attempt was recorded. The recurring variant keeps its consecutiveErrors
counter and the incident-level single-brief behavior stays as-is, so
each repair window still produces one counted brief rather than one per
run. The doctor/status-line visibility option from the report is left
as a follow-up (the report's Expected offers either).
|
🦞👀 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: blocked before merge. What this changesThis PR includes recorded failure-alert delivery outcomes in owner repair briefs and settled fallback notices. Example: A channel-less Gateway cannot deliver an automation alert, and directPolicy is block.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains This PR remains useful and resolves the prior typed-mock finding; no actionable code defects remain, but required hosted CI awaits approval. Priority: P2 Before merge
FindingsNone. Agent review detailsHow this fits togetherCron finalization turns run outcomes into committed notification intents; host dispatch transports alerts, records settlement, and queues fallback or owner-conversation notices. flowchart TD
A[Automation run outcome] --> B[Cron finalization]
B --> C[Owner repair brief]
B --> D[Failure alert transport]
D --> E[Recorded delivery outcome]
E --> F[Fallback session notice]
E --> B
Technical reviewBest possible solution: Keep the existing notification owners and routing policy while carrying settled delivery facts into their existing diagnostic text. Do we have a high-confidence way to reproduce the issue? Current-main source shows the omission directly, and the contributor supplies base-versus-head Gateway evidence; this read-only review ran no target code. Is this the best way to solve the issue? The patch is a small, complete fix for the stated text omission: it reuses recorded outcomes, existing dispatch boundaries, and one shared formatter without adding persistent state or competing notification policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5b2a999a3042. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +39, Tests +33. Total +72 across 6 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. 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 (7 earlier review cycles)
Reviewed November 24, 2026, 5:02 AM ET / 10:02 UTC (Revision 8). |
The repair brief's alertDelivery read ran after two reset sites had already cleared job state: run finalization resets lastFailureNotification* to not-requested, then the new alert cycle resets them again, so a channel-less gateway's recorded reason (e.g. "Channel is required (no configured channels detected).") never reached the brief. Capture the settled outcome before the run-level reset and thread it through failure-alert finalization into the brief (openclaw#186990, review finding P2). The service-boundary regression fails on the prior head and passes after this change.
Replace the as-unknown-as CronJob cast with the canonical cronTestJob builder so job-contract changes stay type-checked, and drop the standalone consecutive-counter case: the service.failure-repair suite already asserts the recurring brief's counter (review finding P3).
|
Addressed both review findings on head Finding → commit mapping1. [P2] Capture the settled outcome before starting the new cycle ( Source tracing confirmed the read was too late, and actually behind two reset sites, not one:
Fix: capture the prior settled outcome via 2. [P3] Construct a valid typed cron fixture ( The 3. Low-value test note → 3d46581 The standalone consecutive-failure counter case is removed; Service-boundary regression (red on base, green after repair)New test in
Local verification on the touched files: oxlint 0 warnings/0 errors, format check clean, @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…prompt data Codex review (head 3d46581) flagged that delivery.error originates from transport errors, is persisted without prompt escaping, and was interpolated inline beside scheduler instructions, bypassing the wrapper used for the job's other errors. Render the delivery status (internal enum) in the summary sentence and move the transport error into a wrapUntrustedPromptDataBlock bounded by the existing REPAIR_ERROR_MAX_CHARS, restoring the original intent of fb2052a (external content presented as untrusted data). Also replace the standalone recorded-delivery wording unit case with an injection-boundary case (raw structural markup must stay escaped inside the data block).
Add an owner-level sequence regression for the canonical openclaw#186990 lifecycle: failure 1 requests repair before any alert is attempted, the post-deadline alert's delivery settles as failed, and no later failure in the same streak emits another brief carrying that settled error (signature dedup suppresses identical failures; the finalizer captures the outcome but no brief consumes it). Update the prior-delivery regression to the untrusted-block wording.
|
Addressing the re-review on head 1. [P2] Wrap delivery errors as untrusted prompt data →
|
|
@clawsweeper re-review |
Body maintenance (no code change; head stays
|
Body maintenance (head stays
|
Body maintenance (head stays
|
Body maintenance (no code change; head stays
|
Body maintenance (head stays
|
Landing-ready handoff (no code change; head stays
|
Still the only open cron delivery brief fix — re-checked against main today (head stays
|
Body maintenance (head stays
|
Re-verification against main
|
Body maintenance (head stays
|
11-05 pass (head stays
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Related to #186990.
What Problem This Solves
Cron records a failed alert's delivery result on the job. The fallback conversation receives the original alert text and omits that delivery result. An owner repair brief also loses the previous alert outcome when the next run clears the per-run delivery fields.
User Impact
Fallback notices identify a settled delivery failure. A fallback already scoped to the private owner route also shows the redacted reason. An owner repair brief labels any retained outcome as the previous alert's, so the agent can distinguish it from the current failure.
Why This Change Was Made
Integrates upstream main at
10b7402043dand retains its current owner repair, deduplication, and routing policy. Captures the previous recorded delivery result before resetting per-run fields. When the transport settles asnot-delivered, the existing fallback includes the status. Detailed errors are bounded, redacted, and wrapped as untrusted text for private fallbacks. Existing stale-cycle and private-delivery guards still control dispatch. #203362 separately addresses ambiguous timeout classification.Evidence
A built channel-less Gateway ran the same isolated cron job against a loopback model fixture. The job failed on the base build
e2de897bf5fand on the reviewed head5b5172b43a9. In each runcron.getrecordednot-deliveredand the missing-channel explanation. The Gateway's persisted session events confirm the fallback text.e2de897bf5f, default fallback5b5172b43a9, default fallbackFailure alert delivery: not-delivered.5b5172b43a9, privatedirectPolicy: blockfallback10b7402043d. Six focused suites passed 106 tests on the reviewed tree. They cover owner notices, previously settled status, public and private fallback behavior, credential redaction, stale cycles, and route selection.pnpm build qaRuntime, core typecheck, scoped lint and formatting, andgit diff --checkpassed. The runtime check used Node 26.12.1 on macOS with synthetic data and a loopback model endpoint. All isolated Gateways stopped cleanly.The report was closed by inactivity triage. It describes the original behavior, and the current proof above reproduces the omission in the fallback path. Issue closure
Review follow-up
Commit
71b856788d5retains an explicitly typed mock for the optional session enqueue callback. The services-cron test typecheck now passes after reproducing the reported TS2532 on the preceding revision. All 106 focused tests passed again, as did scoped lint and formatting. This commit changes one test file. The Gateway evidence above applies to the same production source.Live proof for the owner repair brief
Repeated the same two-run scenario on the built base
e2de897bf5fand candidate5b5172b43a9. The candidate has the same production code as current head71b856788d5(the intervening commit changes one test file).cron.addRPC. The first run failed through the loopback model, and the explicit last-channel alert settled asnot-delivered.cron.getrecorded the missing-channel reason.cron.updatecleared the alert's explicit channel and selected a different synthetic failure for a second run of the same job. The owner and previous delivery status remained intact across the edit.Previous failure alert delivery: not-delivered.Both job runs recorded
erroron both builds. The second run's repair delivery settled asdeliveredon both builds. Both isolated Gateways stopped cleanly. Only the model responses were synthetic. The scheduler, transport, owner admission, and transcript storage used the built Gateway.