Skip to content

fix(cron): make recovered tool errors order agnostic#81585

Draft
WuKongAI-CMU wants to merge 2 commits into
openclaw:mainfrom
WuKongAI-CMU:codex/cron-outcome-order-agnostic
Draft

fix(cron): make recovered tool errors order agnostic#81585
WuKongAI-CMU wants to merge 2 commits into
openclaw:mainfrom
WuKongAI-CMU:codex/cron-outcome-order-agnostic

Conversation

@WuKongAI-CMU

@WuKongAI-CMU WuKongAI-CMU commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Narrow recovered isolated-cron tool-error handling to exec warnings with final assistant-visible recovery text.
  • Keep trailing exec warnings without recovery text, canvas warnings, and provider errors fatal.
  • Add regression coverage for recovered exec ordering and fatal trailing-error boundaries.

Fixes #81514.

Verification

  • pnpm test src/cron/isolated-agent.helpers.test.ts src/cron/isolated-agent/run.message-tool-policy.test.ts src/agents/pi-embedded-runner/run/payloads.errors.test.ts
  • git diff --check
  • pnpm check:changed

Real behavior proof

  • Behavior addressed: isolated cron outcome classification for recovered exec tool failures after a fallback success, without making unresolved trailing exec, canvas, or provider errors non-fatal.
  • Real environment tested: local OpenClaw checkout on macOS with Node 22, running the real src/cron/isolated-agent/helpers.ts implementation through Node/tsx.
  • Exact steps or command run after this patch: node --import tsx --input-type=module -e 'import { resolveCronPayloadOutcome } from "./src/cron/isolated-agent/helpers.ts"; ...'
  • Evidence after fix:
{
  "recoveredExec": {
    "hasFatalErrorPayload": false,
    "outputText": "Fallback log written successfully."
  },
  "trailingExecNoRecoveryText": {
    "hasFatalErrorPayload": true,
    "embeddedRunError": "⚠️ 🛠️ Exec failed: Discord channel unavailable",
    "outputText": "⚠️ 🛠️ Exec failed: Discord channel unavailable"
  },
  "trailingCanvas": {
    "hasFatalErrorPayload": true,
    "embeddedRunError": "⚠️ 🖼️ Canvas failed",
    "outputText": "⚠️ 🖼️ Canvas failed"
  },
  "trailingProvider": {
    "hasFatalErrorPayload": true,
    "embeddedRunError": "model provider unreachable",
    "outputText": "model provider unreachable"
  }
}
  • Observed result after fix: terminal output showed recoveredExec.hasFatalErrorPayload is false; trailingExecNoRecoveryText, trailingCanvas, and trailingProvider all returned hasFatalErrorPayload: true with the expected embedded error text.
  • What was not tested: a live scheduled isolated cron job against a real Discord channel was not run because this workspace does not have the user's model and channel credentials; the focused tests and direct Node/tsx runtime check covered the classifier behavior.

@openclaw-barnacle openclaw-barnacle Bot added size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 14, 2026
@clawsweeper

clawsweeper Bot commented May 14, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed June 2, 2026, 1:11 AM ET / 05:11 UTC.

Summary
Review failed before ClawSweeper could summarize the requested change.

PR surface: Source +13, Tests +31. Total +44 across 2 files.

Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path.

Review metrics: none identified.

Merge readiness
Overall: 🌊 off-meta tidepool
Proof: 🌊 off-meta tidepool
Patch quality: 🌊 off-meta tidepool
Result: rating does not apply to this item.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Risk before merge

  • [P1] No close action taken because the review did not complete.

Maintainer options:

  1. Decide the mitigation before merge
    Retry the Codex review after fixing the execution failure.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] Review did not complete, so no work-lane recommendation was made.
Review details

Best possible solution:

Retry the Codex review after fixing the execution failure.

Do we have a high-confidence way to reproduce the issue?

Unclear. The review failed before ClawSweeper could establish a reproduction path.

Is this the best way to solve the issue?

Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction.

AGENTS.md: unclear because the file could not be read completely.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 93fd17447abd.

Label changes

Label changes:

  • add rating: 🌊 off-meta tidepool: Overall readiness is 🌊 off-meta tidepool; proof is 🌊 off-meta tidepool and patch quality is 🌊 off-meta tidepool.
  • remove proof: sufficient: Current real behavior proof status is not_applicable, not sufficient.

Label justifications:

  • rating: 🌊 off-meta tidepool: Overall readiness is 🌊 off-meta tidepool; proof is 🌊 off-meta tidepool and patch quality is 🌊 off-meta tidepool.
Evidence reviewed

PR surface:

Source +13, Tests +31. Total +44 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 14 1 +13
Tests 1 33 2 +31
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 47 3 +44

What I checked:

  • failure reason: codex execution failed.
  • codex failure detail: Codex review failed for this PR with exit 1.
  • codex stdout: Per-item Codex failure; continuing with the rest of the shard.

Likely related people:

  • unknown: Codex failed before it could trace repository history. (role: review did not complete; confidence: low)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@openclaw-barnacle openclaw-barnacle Bot added size: S proof: supplied External PR includes structured after-fix real behavior proof. and removed size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 14, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 14, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Jun 2, 2026
@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. labels Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

proof: supplied External PR includes structured after-fix real behavior proof. rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. size: S stale Marked as stale due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(cron): isolated-job status is non-deterministic when an agent recovers from a tool error

1 participant