Repository navigation
improve: Doctor flags cron failure alerts that could not be delivered - #188946
Nikhil-jaiswal007 wants to merge 2 commits into
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: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
|
Hi @Nikhil-jaiswal007, thanks for this. Your d08e625 already fixes the note-mock finding: |
|
Hi @jerome-queck, thank you for verifying d08e625 on Linux and for keeping my authorship in #189881. Your real Thanks again for the collaboration. |
Related: #186990
What Problem This Solves
Fixes the Doctor gap behind #186990: when a scheduled automation fails and its failure alert cannot be delivered (for example on a gateway with no messaging channel configured), the delivery failure was recorded only in the job's state fields, and
openclaw doctornever surfaced it.User Impact
User impact: operators running
openclaw doctornow see which automations have an undeliverable failure alert, the recorded reason (such as "Channel is required (no configured channels detected)"), and what to do next: configure a messaging channel for the Gateway or set an explicit delivery target on the job. No behavior changes outside Doctor output, and the check is read-only.Why This Change Was Made
Doctor already reports chronic failures, auto-disabled jobs, and in-flight markers, but it did not read the settled alert-delivery result. This adds a finding next to those, driven by
lastFailureNotificationDeliveryStatusandlastFailureNotificationDeliveryError.Scope follows the agreement in the issue thread:
not-deliveredwarns.delivered,not-requested,unknown, and absent fields stay silent, so an unsettled delivery is never reported as a failure.Related:rather thanClosesfor that reason.Implementation notes
inspectCronJobHealthand runs for enabled and disabled jobs, so it is placed before the earlycontinuethat only the auto-disabled path needs.index.failure-alert.test.tsbecauseindex.test.tsis already at the repo's file-length cap.docs/cli/doctor/checks.mdlists the new check beside the other cron reports.Evidence
not-requested,unknown, and missing fields produce no warning. These match the verification criteria the maintainer set on the issue.pnpm tsgo:corepasses.index.test.ts: 27 of 28 pass, and the one failure (reports a moved partition, refuses --yes guessing...) also fails on unmodifiedupstream/mainon Windows. The message embeds the store path JSON-escaped, so the raw-path match fails. It is unrelated to this change.oxfmt --check.pnpm(spawn pnpm ENOENT), so I ran the docs checks manually and relied on CI for the rest.