Repository navigation
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 11, 2026, 2:05 PM ET / 18:05 UTC. Summary PR surface: Source +10, Tests +206, Docs +2. Total +218 across 3 files. Reproducibility: yes. The linked issue supplies a concrete beta reproduction, current main's finalizer explains the retained disabled row, and the PR provides a real isolated Gateway before/after path with durable CLI state. Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land one canonical narrow fix that preserves watcher pre-disable replay safety, removes successful watcher-fired on-exit jobs, retains failed or keep-after-run jobs, and leaves broader manual-run policy to its existing dedicated work. Do we have a high-confidence way to reproduce the issue? Yes. The linked issue supplies a concrete beta reproduction, current main's finalizer explains the retained disabled row, and the PR provides a real isolated Gateway before/after path with durable CLI state. Is this the best way to solve the issue? Yes. Post-success removal belongs in the shared service finalizer, while the watcher continues to own durable pre-fire disabling; the updated branch also avoids terminalizing armed non-delete force runs. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d4adddbe9c7a. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +10, Tests +206, Docs +2. Total +218 across 3 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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
Review history (2 earlier review cycles)
|
|
@clawsweeper re-review Removed unconditional on-exit terminalization for non-delete runs (armed keep/fail stay enabled); kept successful deleteAfterRun removal; added regression tests + isolated live Gateway proof (watched exit → job removed from durable store). |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
#104550 is the preferred fix for #104518. It has the same correct runtime change with a smaller, refactored regression that verifies in-memory state, durable persistence, and lifecycle events across successful deletion, configured retention, and failure retention. The refreshed exact head is green and passed the isolated focused test, so I am closing this duplicate in favor of #104550. Thank you for the contribution. |
Closes #104518
What Problem This Solves
Fixes an issue where users who create an
on-exitcron job with--delete-after-runwould still find the job retained as disabled after a successful payload run, instead of being removed from the store. Manualcron rmwas required for cleanup even though deletion was requested.Why This Change Was Made
Successful
deleteAfterRunfinalization previously applied only to one-shotatschedules. The Gateway exit watcher still disables anon-exitjob before the payload runs (replay-safe if the Gateway restarts mid-fire). This change generalizes the post-success delete path toon-exitas well, while keeping non-success / keep-after-run jobs disabled rather than deleted.User Impact
Operators using
openclaw cron add --on-exit … --delete-after-runget the documented cleanup contract: a successful fire removes the job. Failed fires remain disabled for inspection. Pre-fire disable for restart safety is unchanged.Evidence
Verification host: local macOS (isolated Gateway + focused Vitest)
Commands:
Focused on-exit suite (post CS code fix):
Commit:
4c4e37cfa9c042c473ed465edebe85cc220b528fonfix/104518-on-exit-delete-after-runReal behavior proof
on-exit+deleteAfterRunremoves the job. (2) Non-delete / failed operator force runs no longer terminalize an armedon-exitjob (CS P1 ontimer.ts).OPENCLAW_STATE_DIR+ loopback port 61922; rebuilt runtime withnode scripts/run-node.mjs gatewayso the working-tree finalizer was live.shouldDeleteonly coveredat, so successful on-exit jobs stayed disabled in the store. An earlier stale-dist isolated run on this branch reproduced that retention; after rebuild with the PR finalizer, the same path removed the job.auth token,OPENCLAW_SKIP_CHANNELS=1,cron.enabled=true).cron list --all --json→jobs: [].cron add --name pr104559-on-exit-delete-proof --on-exit "sh -c 'echo watched-exit; sleep 1; exit 0'" --system-event "pr104559 on-exit proof wake" --session main --delete-after-run --json.deleteAfterRun.cron list --all --json→jobs: [],total: 0(durable store empty).2e583284-f0f6-4a10-930f-70f35ed45c8e,deleteAfterRun: true,schedule.kind: on-exit.cron list --all --json:{"jobs":[],"total":0,...}(JOB REMOVED).enabled: true.enabled=falsein the shared finalizer.