Skip to content

Fix false failures in completed and queued automations - #152174

Merged
pash-openai merged 2 commits into
sjf_openclaw_2026-09-04from
codex/backport-cron-completion-repair
Sep 18, 2026
Merged

pash-openai merged 2 commits into
sjf_openclaw_2026-09-04from
codex/backport-cron-completion-repair

Conversation

@pash-openai

@pash-openai pash-openai commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Scheduled work can report a failure after it has already delivered its report, and heartbeat jobs can time out while merely waiting behind foreground work. This backports #152165 and #148876 to the current release branch so completed reports retain their successful outcome and heartbeat execution time starts when the queued work actually runs.

Run-level errors, interrupted runs, explicitly progress-only messages, missing final answers, and execution deadlines keep their existing handling. The backport preserves the release branch’s existing abort handling and queue function signature. It changes no configuration, persisted-state format, or model runtime requirements.

Upstream commits: e73121691a6314c8a6f4c0b7807fff0e807d23d3 and 4e885874ce965a929b1d9ba69c738f1f6e298767; release base: e56ad899fff8799366480edb387d8b9c63dc3636.

srinatar and others added 2 commits September 18, 2026 17:21
Closes #148874

Heartbeat cron jobs report execution timeouts while queued behind foreground work.

Queue entry pauses the cron watchdog; attempt start arms it. This state has one writer. Retries retain their final outcome, including after handler replacement.

Growth: `timer-job-runner.ts` +7 (deadline), `timer-execution.ts` +1 (handoff), `timer-execution-timeout.ts` +5 (type), `session-event-wake.ts` +18 (notifications).

Growth accepted under the owner's standing acceptance (2026-09-15).

Queue waits no longer create false errors. Actual failures and execution deadlines remain effective.

Real Gateway: hold a `chat.send` response for five seconds; call `cron.run` with a two-second heartbeat timeout; read `cron.runs`/`cron.get`.

Main expired at 2,010 ms before any heartbeat request, with one consecutive error. The fix stayed pending, then recorded the retained retry's success at 60.4 seconds. Separate controls recorded a failed retry and an executing timeout, each with one consecutive error.

Preserves #134464 outcome accounting. No config, schema, protocol or SDK change. #148333's next-cadence policy remains separate.

Scheduled monitors, heartbeat tasks and immediate cron events.

Enqueue pauses the deadline; attempts restart it; completion disposes it.

196 tests passed on a fresh merge with main; 27 focused tests also cover unlimited heartbeats. Original-code negative controls fail. Type-aware checks passed.

Immediate handoff, coalescing and cancellation remain unchanged and covered.

Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit 4e88587)
* fix: preserve completed scheduled reports after tool read failures

* fix: keep cron failures after progress-only messages

(cherry picked from commit e731216)
@clawsweeper

clawsweeper Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-18T21:31:16.552866Z d744a84 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: M maintainer Maintainer-authored PR labels Sep 18, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d744a84d6e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@pash-openai

Copy link
Copy Markdown
Contributor Author

The candidate build and production typecheck passed. Broad optional CI reports the same inherited release-line failures as #151874: existing lint/dead-code/boundary and Slack test-fixture issues, plus two stale runtime assertions. The 85 Slack failures match the base exactly, and both runtime assertions also fail when run directly at the unchanged e56ad89 release base. No files responsible for those failures changed in this backport. The 131 focused delivery, scheduler, heartbeat, queue, and terminal-error cases pass. This PR retains only the two upstream repairs and their necessary release-line conflict resolution; it does not fold unrelated release maintenance into the automation fix.

@pash-openai
pash-openai merged commit 3c78fdc into sjf_openclaw_2026-09-04 Sep 18, 2026
177 of 187 checks passed
@pash-openai
pash-openai deleted the codex/backport-cron-completion-repair branch September 18, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants