Repository navigation
Conversation
Migrate heartbeat state, scratch, execution policy, and monitor ownership into ordinary editable Automations. Preserve Doctor backups and a once-only migration notice, controller settlement, retained source authority, and revision-owned scratch.
Separate legacy enrollment from migration discovery so stored tasks retain implicit ambient cadence without provisioning jobs on empty installations. Preserve explicit monitor and task disables.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 53a3c032b7
ℹ️ 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".
|
Codex review: needs real behavior proof before merge. What this changesThis PR converts legacy heartbeats into editable Automations through Doctor and adds ordinary job policies, scratch editing, and portable Claw conversion. Example: An existing heartbeat checks an evening checklist every 30 minutes.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Partial Merge readiness⛔ Blocked before merge - 10 items remain Keep open: this maintainer-approved migration remains necessary, but SQLite upgrade handling, native schema compatibility, portable schedules, and retained test consumers need correction. Priority: P2 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherDoctor converts legacy configuration, monitor rows, scratch, and pending outcomes into canonical automation storage; Cron then admits work through session execution and ordinary delivery. flowchart LR
A[Legacy heartbeat inputs] --> B[Doctor migration]
B --> C[Jobs scratch and receipts]
C --> D[Cron scheduler]
D --> E[Session execution]
E --> F[Ordinary delivery]
G[Automations editor] --> C
Technical reviewBest possible solution: Complete the approved cutover using the existing Doctor and Cron owners, with a registered SQLite v30 migration, aligned native readers, preserved partial-window semantics, and migrated test consumers. Do we have a high-confidence way to reproduce the issue? Source establishes the missing SQLite destination, native v29 ceiling, and portable partial-window regression; exact-head CI independently reports migration refusal, native drift, and unmigrated consumer failures. Is this the best way to solve the issue? The approved single-owner migration fits the existing architecture, but its compatibility fence must be complete across SQLite and native readers, and portable conversion must preserve the same scheduling contract as Doctor. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 76707b46ae79. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: The new Claw Add persistence operations carry live guards, but final-effect authorization remains unproven. EvidenceSecurity concerns:
What I checked:
Likely related people:
PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 21, 2026, 12:13 AM ET / 04:13 UTC. |
Retain current Cron test simplifications with the Automations settlement path. Keep producer-owned scheduled and immediate turns isolated from unrelated passive notices in the persisted-session routing proof.
Merge current main, regenerate the config baseline, and keep fixture scheduling disabled through the current Cron owner. Prepare incognito plugin metadata per case after shared lifecycle cleanup.
Merge current main without rewriting reviewed history. Preserve command admission, timeout, revocation, drain and session-event notification coverage while adopting the shared Cron fixtures. Regenerate config documentation through its owner.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85e8ae640b
ℹ️ 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".
Keep the five native Mac presence identity assertions on the existing S3 options-based fixture. The merged cases still referenced their predecessor helper names, breaking the Gateway-methods test type graph and runtime shard. Validation: 21 focused cases, Gateway-methods test type graph, typed lint, formatting, and scoped review pass.
Preserve main's Cron test fixtures while retaining Doctor-owned heartbeat migration and controller settlement. Carry the current Security Review publisher unchanged from main.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: acc023cf50
ℹ️ 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".
Keep announce and owner delivery available for main-session agent turns in the CLI and editor. Preserve unflagged main delivery defaults and system-event/script restrictions.
Preserve main fixture reuse and origin-route table cleanup while retaining receipt-owned script follow-ups, captured destinations, cancellation, and restart settlement.
There was a problem hiding this comment.
💡 Codex Review
For an automation running in an isolated session, the caller session differs from the account policy's owner session, while trusted scheduled policies are also rejected by the normal caller-scope path. Because these new scratch handlers invoke scopedCronJobHandler without allowCurrentJob: true (and the read recheck/write commit guard likewise omit it), the advertised scratch_get and scratch_set actions return “Automation not found” for the current job. Use the signed current-job capability for both scratch reads and writes, as cron.get and self-removal already do.
ℹ️ 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".
|
Closing this PR only to replace its native tooling identity. The retained workflow binding pins pre-#178708 tooling, whose Security Review publisher-source check cannot match current main. The source branch and reviewed head c0d0b44 are preserved unchanged, including contributor history and proof. GitHub refuses a second open PR from the same branch, so the replacement must be opened after this closes. Replacement: #179387 (same branch and reviewed head). The replacement will retain the full body and labels and receive its own exact-head CI before normal native landing. Related: #167796; landed slices #178650 and #178764; executor retirement follows in S4. |
Related: #167796
This is slice 3 of 4 of the heartbeat-to-Automations migration:
What Problem This Solves
Heartbeat monitors cannot become independently editable Automations while their settings, scratch, execution policies, and startup reconciliation remain owned by the old heartbeat path.
User Impact
Existing monitors and supported legacy heartbeat tasks become ordinary editable Automations, preserving job identity, run history, scratch revisions and explicit deletion, disabled state, scheduling anchors, pending occurrences, and existing tool authority. Run
openclaw doctor --fixafter a manual binary replacement; supported updates run the same migration through Doctor. Edit, disable, or delete the resulting job in Automations or through the CLI. Restart, config reload, and repeated Doctor runs preserve those choices.This implements Peter's approved October 3/12 migration design and the October 18 additive Claw review decision. Claw Add converts legacy heartbeat declarations into ordinary jobs and shows their positive-integer
everyMsschedules andownerdelivery truthfully; existing{ cron, timezone },none, andlast-channelvariants retain their meaning.Doctor emits this notice once when the migration receipt completes:
The shared state schema advances to 30 so an older scheduler cannot ignore the new job policies. Keep the verified pre-upgrade backup for rollback; do not lower the schema marker. The agent schema remains 31. Physical executor and public SDK removal remain in slice 4.
Why This Change Was Made
The existing Cron service and session controller own migrated execution from admission through settlement. Main-session system events and agent turns use that boundary; queue acceptance alone is not success. Job-level active hours, idle admission, scratch, structured results, and owner/direct-message delivery replace the corresponding heartbeat behavior. Quiet
no_changeresults suppress automatic delivery without hiding execution failures, and optional reasoning accompanies meaningful output. Retained authenticated source, workspace custody, and current permission checks remain in force.Doctor writes and verifies canonical jobs and context before retiring legacy inputs. Its existing backup and include-aware config owners preserve recovery. Completed provisioning receipts prevent deleted monitors from reappearing, and startup/reload no longer reconcile the old monitor declarations. Explicit setup creates the ambient owner's default proactive check once. Claw Add creates imported jobs disabled until scratch is accepted and activation is verified; an uncertain or conflicting scratch write retains the admitted agent/jobs and reports the required inspection instead of overwriting concurrent edits.
The repair commit fa7eac0a0688 addresses defects exposed by candidate CI: the missing bounded v30 maintenance step; published, native, and plugin migration support; a type-import cycle; health and config producers retaining obsolete heartbeat fields; and fixtures still calling the retired execution contract. The changes keep these responsibilities with their existing owners. Test-module extractions preserve assertions and budgets.
It also fixes a Claw Add review finding: importing a start-only or end-only active-hours window synthesized the missing endpoint and unexpectedly restricted runs. Incomplete windows now retain the prior unrestricted behavior for both imported monitor and task jobs; complete overnight windows remain enforced.
The final adapter repair preserves announce/owner delivery when opening and saving a migrated main-session agent-turn job. CLI add/edit now accept the same delivery policies as the existing Cron service; unflagged main jobs retain their internal-delivery default. Main-session system-event and script chat restrictions remain enforced. The original CLI and browser failures reproduce before the repair.
Limits and recovery behavior:
Evidence
Current main
2db57c72bf2448a2ff2004fa96ffd54672cd25b1is merged without rewriting reviewed history. The only manual resolutions preserve its Cron fixture reuse and consolidated origin-route cases while keeping S3's captured-target, deferred-receiver, cancellation, and settlement contracts. The Security Review publisher workflow is byte-identical to this main revision, including #178708; it was not edited or bypassed.On the resolved tree committed as
c0d0b44bc72be9f8ff3ba2f173d1c506af53222f:Retained proof, with its original revision scope: serial Doctor 15/15, focused migration/restart 71 tests in 12 files, Claw Add incomplete-hours RED/GREEN 3/3, synthetic Automations UI 8/8, and published-upgrade corruption 11/11. S1's negative control reproduced false success before adoption on main. Required secretless Linux attribution was completed; no task-owned leases remain. Optional AWS/package/PostgreSQL extras were omitted at Peter's direction.
Earlier run 39560577767 ended with the inherited tooling TS2345 failure; incoming main resolved that graph locally. Run 39572941097, on
acc023cf50fa6, completed with eight independently reproduced main signatures (memory publication/read repair, planner environment metadata, restart diagnostic, Telegram policy/settlement/emoji, and Discord progress). Its diagnosed Levanto and Codex retries passed; the subpixel UI geometry failure passed local controls. Those results are historical. Exact-head run 39580173234, attempt 2 completed with 170 passing and 15 skipped jobs. Test types, production types, all nine UI E2E shards, and security-fast passed. The one permitted Levanto timing retry passed; that replay is not claimed as a code fix. Seven owner jobs remain red with twelve independently reproduced main signatures, plus the aggregate gate. Peter authorized the native inherited-failure exception; these failures are not represented as green.The fresh Telegram controls used CI-pinned Node 24.19.0 and Bun on macOS. The retained memory, restart and Discord controls used their recorded macOS runtime versions; they are not claimed as fresh Linux runs. The inspected CI checkout is 32bc0b1ee806, with ordered parents main 662e2d3 and candidate c0d0b44. Exact logs, controls and source-object hashes qualify every remaining failed job for native verification.
Line delta against merged main
2db57c72bf24(tests include test support; generated includes config baselines):Synthetic desktop, before:
Synthetic desktop, after:
Synthetic narrow layout, before:
Synthetic narrow layout, after:
Main-session delivery repair, synthetic before:
Main-session delivery repair, synthetic after:
Native landing status: admission currently refuses a retained-workflow/Security Review publisher source mismatch. This candidate’s security workflow matches current main, including #178708; the retained native workflow predates that update. No security workflow was edited or bypassed, and no merge was submitted.