Repository navigation
fix(cron): preserve successful silent automation runs - #154533
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. Reviewed September 21, 2026, 3:29 AM ET / 07:29 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR lets scheduled agent runs finish successfully without a reply by sharing an optional-reply contract across both runners and removing cron’s separate empty-output rejection. Merge readiness✅ Ready for maintainer review The fix remains necessary and has no actionable findings. The prior CLI assertion is corrected, and the requested test timings are now recorded; no additional contributor action remains from this review. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s automation scheduler sends scheduled prompts through CLI or embedded agent execution. Cron then records the execution outcome and delivers available output to the configured destination. flowchart TD
A[Scheduled job] --> B[Cron execution]
B --> C[Optional reply contract]
C --> D[CLI or embedded agent]
D --> E[Execution outcome]
E --> F[Record failures or successful silence]
E --> G[Deliver available output]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -43, Tests -20. Total -63 across 6 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep reply requiredness with the input owner, allowing successful scheduled silence while preserving execution failures and delivery accounting. Do we have a high-confidence way to reproduce the issue? Yes: current main’s resolved announce path overrides optional silence with a required reply, matching the recorded baseline failure. This review verified the source path without executing a fresh reproduction. Is this the best way to solve the issue? Yes: the patch uses the existing shared reply contract and removes a competing cron check without adding configuration or changing stored jobs. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 69afbbaf3742. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Added the measured wall times to the PR Evidence section: 61.04 seconds for the initial 130 focused tests, and 57.01 seconds for the 98 follow-up CLI-policy/fallback tests. Both include wrapper and worker preparation. No source changes or performance claims were added. |
|
CI attempt 1 on 90bde4c had the migration-heartbeat failure in checks-node-compact-small-3, plus four cancelled shards (large-5, small-13, large-9, large-14). The initial failure-only summary omitted those cancellations. I requested cancellation of the partial retry and will run one complete validation attempt so no cancelled required work is treated as passed. No source, test expectations, or timeout budgets changed. |
|
CI attempt 3 finished on
The logs for both attempts pin the identical actual checkout and workflow commit, The automatic recent-main fingerprint matcher found no exact matches; I am not claiming that it proved these failures base-red or claiming their precise environmental cause. The scoped exception rests on the inspected disjoint execution paths and the exact same-checkout passing evidence above. All other applicable jobs completed successfully or were intentionally skipped. Cron's focused tests, dead-code scans, real Telegram baseline/candidate/control proof, and exact-head review passed. No test expectations, timeout budgets, sandbox settings, or unrelated migration code were changed to make these failures disappear. Using the maintainer workflow's explicit unrelated-red record for these two jobs only, under the existing repair-and-land authorization. The final CI run remains reported as red, not green. |
|
landpr-approve-unrelated-red |
|
Merged as f17f50a. Scheduled NO_REPLY now completes silently without an unnecessary recovery turn; direct-user NO_REPLY still recovers exactly one visible reply. Verified through real Telegram Test Server baseline/candidate/control runs, 228 focused tests across the two validation batches, scoped lint, and both dead-code scans. The two unrelated native/updater CI failures and their identical-checkout passing evidence are documented above; the full run was not reported green. No production Gateway, job configuration, or credentials were changed. |
Related: openclaw#110565 ## What Problem This Solves Fixes announced automations being treated as missing replies when they intentionally have nothing to report. ## User Impact User impact: scheduled jobs can finish silently without an unwanted recovery answer or a false missing-payload error. Direct user messages still require a reply. Execution failures, cancellations, failed child handoffs, and transport errors remain failures. ## Why This Change Was Made An announce destination selects where an automation's output goes; it does not require output on every run. Both CLI and embedded execution now receive the same optional-reply contract. The cron finalizer consumes the runtime outcome instead of independently classifying empty output as failure. This restores the documented automation contract without changing configuration, stored jobs, tool permissions, or retry budgets. It does not interpret an assistant's prose as proof that an arbitrary task succeeded. ## Evidence - The same announced `NO_REPLY` job failed on baseline `c7725c10b87`: two provider requests followed by `incomplete_turn`. Its test job was removed and runner cleanup completed. - 130 focused tests passed in **61.04 seconds wall time** across cron completion, CLI reply hooks, and embedded terminal resolution; 98 CLI-policy and fallback-classification tests also passed in **57.01 seconds wall time** after cleanup. Coverage includes required direct-user `NO_REPLY` recovery, optional silence, provider/tool errors, cancellation, failed child handoffs, and delivery errors. - Telegram Test Server, leased real-user recorder, isolated Gateway at `8ffdf068593`: an announced cron returning `NO_REPLY` completed with `runStatus: ok`, one provider request, and zero SUT messages. The job was removed and runner scratch cleaned up. - Direct-user control on the same candidate: the model first returned `NO_REPLY`; recovery made one continuation request and Telegram showed exactly one `CRON_REPLY_HUMAN_OK` message. Utility recaps were disabled in this isolated fixture so the injected silence reached the user turn, not background work. - Full build, scoped type-aware lint, both full dead-code scans, formatting, and whitespace checks passed. Production code shrank by 43 lines. The follow-up only inlines an unchanged internal predicate and removes an obsolete test assertion; it does not change the Telegram-tested behavior. Co-authored-by: Ayaan Zaidi <[email protected]>
Related: #110565
What Problem This Solves
Fixes announced automations being treated as missing replies when they intentionally have nothing to report.
User Impact
User impact: scheduled jobs can finish silently without an unwanted recovery answer or a false missing-payload error. Direct user messages still require a reply. Execution failures, cancellations, failed child handoffs, and transport errors remain failures.
Why This Change Was Made
An announce destination selects where an automation's output goes; it does not require output on every run. Both CLI and embedded execution now receive the same optional-reply contract. The cron finalizer consumes the runtime outcome instead of independently classifying empty output as failure.
This restores the documented automation contract without changing configuration, stored jobs, tool permissions, or retry budgets. It does not interpret an assistant's prose as proof that an arbitrary task succeeded.
Evidence
NO_REPLYjob failed on baseline6beea0a8521: two provider requests followed byincomplete_turn. Its test job was removed and runner cleanup completed.NO_REPLYrecovery, optional silence, provider/tool errors, cancellation, failed child handoffs, and delivery errors.8ffdf068593: an announced cron returningNO_REPLYcompleted withrunStatus: ok, one provider request, and zero SUT messages. The job was removed and runner scratch cleaned up.NO_REPLY; recovery made one continuation request and Telegram showed exactly oneCRON_REPLY_HUMAN_OKmessage. Utility recaps were disabled in this isolated fixture so the injected silence reached the user turn, not background work.