Repository navigation
docs(cron): scope consecutive-failure wait to failure alerts - #162695
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. |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed October 1, 2026, 9:06 PM ET / October 2, 2026, 01:06 UTC (Revision 6). ClawSweeper reviewWhat this changesClarifies automation documentation and agent tool guidance that consecutive-failure thresholds govern failure alerts while run output follows delivery settings, and refreshes prompt snapshots. Merge readiness✅ Ready for maintainer review The correction remains necessary on current main. The wording matches the existing delivery behavior, the supplied runtime output covers the changed tool description, and no actionable patch defect remains. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw's automation tool gives agents instructions for creating scheduled jobs. The scheduler separately handles each run's output delivery and threshold-based failure alerts. flowchart TD
A[Automation author] --> B[Docs and tool guidance]
B --> C[Scheduled job]
C --> D[Run outcome]
D --> E[Configured output delivery]
D --> F[Failure threshold and cooldown]
F --> G[Failure notification]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource 0, Tests 0, Docs +1. Total +1 across 6 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep automation authoring guidance consistent with the scheduler's separate output-delivery and failure-alert contracts. Do we have a high-confidence way to reproduce the issue? Not applicable to a runtime defect: this PR corrects text. Current-main guidance and the existing completion-delivery path establish the contradiction directly. Is this the best way to solve the issue? Yes. Updating the existing documentation and static tool description is the narrowest repair, and the regenerated fixtures reflect the same correction. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4809de9b6add. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
c5c9e41 to
1591972
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Landed as e993be8 on head 1591972. Text-only: the cron authoring guidance now says only the failure alert waits for consecutive failures, while the run's own output follows the job's delivery setting. ClawSweeper ready, CI green (the cancelled Security High jobs are the docs-only skip path), real tool-builder output in the PR body. |
…w#162695) ## What Problem This Solves Follow-up to openclaw#160996. The cron authoring guidance (docs `payloads.md` and the automations tool description) said failure notifications wait for consecutive failed runs, "so a one-off outage stays quiet". That isn't true, so the guidance taught models a wrong cost for failing loudly: - A command payload with announce delivery still delivers its output when it exits non-zero: `runCommandJob` in `src/gateway/server-cron.ts` passes the summary to completion delivery without checking the exit status. - Since openclaw#162391, an agent's `AUTOMATION_FAILED` explanation is delivered for announce jobs. ## Solution Only the failure alert waits for consecutive failures; the run's own output still follows the job's delivery setting. Both places now say exactly that. The tool description stays static (prompt-cache stable) and grows by 12 characters. Prompt snapshots are regenerated. ## User Impact No runtime behavior change. Models writing automations get accurate guidance about what a failed run sends. ## Evidence The automations tool description an agent actually receives, taken from the regenerated prompt snapshot (`codex-dynamic-tools.telegram-direct.json`, built by the real prompt builder): - Before: `throw from the script so the run records the failure (returning {error} still succeeds); failure alerts already wait for consecutive failures, so a one-off failure stays quiet.` - After: `throw from the script so the run records the failure (returning {error} still succeeds); only the failure alert waits for consecutive failures, run output still follows the job's delivery.` Checks on the exact head: - `pnpm run prompt:snapshots:check`: snapshots are current (7 files). - `node scripts/run-vitest.mjs src/agents/tools/cron-tool.test.ts`: 72 passed. Text-only change, so no live channel proof applies: no message, delivery or runtime path changes. Runtime output from a real OpenClaw setup on head `15919727aaa`: the actual `createCronTool()` builder run in an isolated state dir (default config), printing the failure-guidance sentences of the `automations` tool description an agent receives: ```text tool: automations When a run fails, throw from the script so the run records the failure (returning {error} still succeeds); only the failure alert waits for consecutive failures, run output still follows the job's delivery. FAILURE ALERTS: jobs with a failure route default to alerting after 2 consecutive execution failures with a 1h cooldown. ``` The same sentence on `origin/main` read: `…failure alerts already wait for consecutive failures, so a one-off failure stays quiet.` Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Follow-up to #160996. The cron authoring guidance (docs
payloads.mdand the automations tool description) said failure notifications wait for consecutive failed runs, "so a one-off outage stays quiet". That isn't true, so the guidance taught models a wrong cost for failing loudly:runCommandJobinsrc/gateway/server-cron.tspasses the summary to completion delivery without checking the exit status.AUTOMATION_FAILEDexplanation is delivered for announce jobs.Solution
Only the failure alert waits for consecutive failures; the run's own output still follows the job's delivery setting. Both places now say exactly that. The tool description stays static (prompt-cache stable) and grows by 12 characters. Prompt snapshots are regenerated.
User Impact
No runtime behavior change. Models writing automations get accurate guidance about what a failed run sends.
Evidence
The automations tool description an agent actually receives, taken from the regenerated prompt snapshot (
codex-dynamic-tools.telegram-direct.json, built by the real prompt builder):throw from the script so the run records the failure (returning {error} still succeeds); failure alerts already wait for consecutive failures, so a one-off failure stays quiet.throw from the script so the run records the failure (returning {error} still succeeds); only the failure alert waits for consecutive failures, run output still follows the job's delivery.Checks on the exact head:
pnpm run prompt:snapshots:check: snapshots are current (7 files).node scripts/run-vitest.mjs src/agents/tools/cron-tool.test.ts: 72 passed.Text-only change, so no live channel proof applies: no message, delivery or runtime path changes.
Runtime output from a real OpenClaw setup on head
15919727aaa: the actualcreateCronTool()builder run in an isolated state dir (default config), printing the failure-guidance sentences of theautomationstool description an agent receives:The same sentence on
origin/mainread:…failure alerts already wait for consecutive failures, so a one-off failure stays quiet.