Repository navigation
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 4, 2026, 12:36 PM ET / 16:36 UTC. Summary PR surface: Source +2720, Tests +2805, Docs +340, Generated +14, Other +254. Total +6133 across 51 files. Reproducibility: not applicable. this is a new feature implementation for an open product issue, not a report of broken current behavior. Review metrics: 2 noteworthy metrics.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Keep the draft open, refresh exact-head real CLI/Gateway routines proof, and merge only after maintainers accept or narrow the routines protocol, CLI, generated-client, shared SQLite table, and cron ownership boundary. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a new feature implementation for an open product issue, not a report of broken current behavior. Is this the best way to solve the issue? Unclear as a final merge decision: the cron-backed registry is a plausible owner-boundary fit, but the permanent API/state contract needs maintainer acceptance or narrowing before merge. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 280e8d487627. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +2720, Tests +2805, Docs +340, Generated +14, Other +254. Total +6133 across 51 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 (1 earlier review cycle)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
7ede583 to
0c181be
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
3a0d4fb to
adba2a3
Compare
adba2a3 to
0bc2292
Compare
|
@clawsweeper re-review Final routines draft refreshed on |
|
🦞🧹 I asked ClawSweeper to review this item again. |
0bc2292 to
786ba1e
Compare
Typed routine registry layered on the existing cron scheduler: durable content-addressed identity, owner and delivery target, idempotent replay-safe create/enable/disable/delete with staged recovery, live status/drift projection against the backing cron job, six operator gateway RPCs, openclaw routines CLI, and generated Swift protocol models. Cron remains the only scheduler; tasks remain the activity ledger. Squashed from the 52-commit routines stack for replay onto current main.
|
Rebased onto current main (post #99816/#99817) — zero conflicts. The 52-commit stack is squashed to a single commit; protocol JSON schema and Swift GatewayModels regenerated on the new base. Refreshed proof on head (current exact head of this branch): Remaining before merge per prior review: maintainer acceptance of the six new gateway RPCs, the |
786ba1e to
e8096ab
Compare
|
Superseded by #100480. Product decision: a routine is not a new concept — it is a cron job with missing ergonomics. The registry approach here (separate Salvaged into #100480: the caller-scope and error-classification extractions, delivery-channel validation, update preconditions, and the test intents. Trigger-kind generalization (repo events/webhooks) remains the follow-up, now planned directly on cron. Thanks to the worker session that built this lane — the requirements it proved out (idempotent declaration, ownership, replay safety, status) are exactly what shipped; only the shape changed. |
Closes #98515
What Problem This Solves
OpenClaw has cron jobs, tasks, heartbeat, commitments, and channel/session delivery primitives, but no first-class durable registry for recurring team-operations routines. Operators can schedule work today, but they cannot create, inspect, pause, delete, or recover a typed routine as one durable product object with ownership, delivery target, run status, and replay-safe mutation semantics.
Why This Change Was Made
This adds the smallest complete routine slice: a typed routine registry backed by the shared SQLite state DB, Gateway RPC methods, CLI entrypoints, an agent-tool entrypoint, and a schedule trigger that delegates execution to the canonical cron service rather than creating a second scheduler. The design keeps cron as the scheduler owner and routines as the durable registry owner, with internal create/toggle stages so retries recover safely after partial persistence or scheduler failures.
Non-goals for this draft: no Control UI yet, no channel-watch/repository-event/webhook triggers yet, no duplicate scheduler, and no transcript attachment. The trigger model is shaped so those future triggers can share the same routine subsystem instead of growing a second path.
AI-assisted implementation and review were used for this draft PR.
User Impact
Users and operators can now use
openclaw routines, Gateway RPC, or the Gateway agent tool to create, list, inspect, enable, disable, and delete durable scheduled routines. Routine inspection shows owner, delivery target, enabled/deleted state, last and next run visibility, status, and last error context. Repeated create/toggle/delete calls are idempotent, and restart/replay behavior preserves the intended routine state instead of silently losing a schedule toggle or rolling scheduler state backward.Evidence
786ba1e63a6953c9c12c95fa99abe3b5aaffe7d3, rebased onorigin/main5bcd25f0fb6de3cc2ba6b6a7688a9361eb355143.+6542/-409; production 27 files+3103/-390, tests 11 files+2805/-0, docs 9 files+359/-19, generated protocol/state files 4 files+275/-0. Remaining positive production LOC is concentrated in the routine service durability/recovery state machine, narrow CLI/Gateway/protocol entrypoints, and shared cron validation/scope helpers that delete duplicated cron Gateway policy rather than creating a second scheduler.git diff --check origin/main...HEAD,pnpm docs:list,pnpm protocol:check, and cleangit status --porcelain=v1.node scripts/run-vitest.mjs <routines/cron/Gateway/CLI/protocol/session/tool-result-truncation tests>completed 5 shards / 156 tests, and targetednode scripts/run-oxlint.mjs <touched runtime/test files>passed. The later rebases touched only iOS/Android/Discord/Feishu owner files outside the routines/cron/Gateway/protocol lane.blacksmith-testbox, idtbx_01kwh57ehx56t754rqjxqttskg, Actions run https://github.com/openclaw/openclaw/actions/runs/28582551404. The proof matched exact tree0b6d7d0814271c196c8fae82170f3590c1f12bde, built the branch, started an isolated local Gateway, approved the staged device scope request, and droveopenclaw routines list/create/list/get/disable/enable/deletethrough the public CLI and Gateway RPC. Final assertion output:{"routineId":"proof-daily","cronJobId":"routine-cron-61f944366f18f9191d29a9b0425f6694","backing":"linked","status":"enabled","deleted":true,"persistentTarget":"session:agent:ops:main","isolatedTarget":"isolated","isolatedDelivery":"none"}.blacksmith-testbox, idtbx_01kwh5gdg666jm6dm0sknq6taq, Actions run https://github.com/openclaw/openclaw/actions/runs/28582820315. The proof matched exact tree0b6d7d0814271c196c8fae82170f3590c1f12bde, then rancorepack pnpm build:strict-smokeandcorepack pnpm check:changedwith remote changed lanes enabled.origin/mainpassed clean on exact head with modelgpt-5.6-sol, extra-high reasoning:.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --engine codex --model codex=gpt-5.6-sol --thinking codex=xhigh --prompt-file <prompt-file> --output <review-output> --json-output <review-json>. It explicitly reassessed best-fix fit, owner boundaries, LOC pressure, cron helper duplication, idempotent mutations, drift handling, re-enable behavior, docs/generated alignment, and PR evidence hygiene; result: no accepted/actionable findings.Risks and review focus: routine persistence and cron mutation ordering, idempotent replay after partial failures, schema/client drift, schedule-only routine views over mutable cron backing jobs, and delivery target defaults. No UI screenshot evidence is included because this draft intentionally defers Control UI work.