fix(cron): honor isolated sessionTarget and fail missing cron.remove id#86234
Conversation
|
Codex review: needs maintainer review before merge. Reviewed May 24, 2026, 8:47 PM ET / 00:47 UTC. Summary PR surface: Source +9, Tests +51. Total +60 across 4 files. Reproducibility: yes. source inspection gives a high-confidence path: current main auto-stamps caller 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 the isolated-session tool fix with regression coverage, and either explicitly accept or split the stricter remove error contract while tracking any existing-job cleanup separately. Do we have a high-confidence way to reproduce the issue? Yes, source inspection gives a high-confidence path: current main auto-stamps caller Is this the best way to solve the issue? Mostly yes: the PR fixes future tool-created isolated cron jobs that would inherit caller session keys. The missing-id remove error is a stricter API contract and should be maintainer-accepted or split before merge. Codex review notes: model gpt-5.5, reasoning high; reviewed against f09b4ebe314e. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +9, Tests +51. Total +60 across 4 files. View PR surface stats
Acceptance criteria:
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
|
|
ClawSweeper PR egg ✨ Hatched: 🌱 uncommon Velvet Test Hopper Hatch commandComment Hatchability rules:
Rarity: 🌱 uncommon. What is this egg doing here?
|
6f3054e to
ac3ec47
Compare
Summary
sessionTarget: "isolated"cron.removereturn an invalid-request error when the target job id is not found, instead ofok: true, removed: falseFixes #86202
Verification
node scripts/run-vitest.mjs src/agents/tools/cron-tool.test.ts src/gateway/server-methods/cron.validation.test.tsorigin/mainReal behavior proof
Behavior addressed: isolated cron jobs should not inherit the caller/dashboard session key, and removing a missing cron id should be surfaced as an invalid request instead of a successful no-op.
Real environment tested: local OpenClaw source checkout on Node 24-compatible tooling, loading the real cron tool and gateway cron handler modules through the repo test harness.
Exact steps or command run after this patch:
node scripts/run-vitest.mjs src/agents/tools/cron-tool.test.ts src/gateway/server-methods/cron.validation.test.tsEvidence after fix:
Test Files 4 passed (4)andTests 204 passed (204). The new cron-tool assertion observed an isolated add payload withsessionTarget: "isolated"and nosessionKey; the gateway validation assertion observedINVALID_REQUESTfor a missingcron.removeid.Observed result after fix: isolated cron add requests remain isolated, and missing cron removals now return a clear invalid-request error.
What was not tested: a full long-running gateway cron scheduler process with wall-clock job execution; the changed request construction and gateway handler branches were tested directly.