Skip to content

feat(automations): migrate heartbeat jobs through Doctor - #178990

Closed
steipete wants to merge 15 commits into
mainfrom
steipete/automations-s3
Closed

steipete wants to merge 15 commits into
mainfrom
steipete/automations-s3

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Related: #167796

This is slice 3 of 4 of the heartbeat-to-Automations migration:

  1. fix(cron): preserve pending reminder outcomes across restarts #178650 — landed: prevent main-session cron events from being recorded successful before adoption.
  2. refactor(automations): run scheduled conversation work through session admission #178764 — landed: session-controller execution and settlement; additive Claw review schema.
  3. This PR — migrate heartbeat data and make ordinary automation jobs authoritative.
  4. After this PR lands — remove the retired heartbeat executor and the approved breaking plugin-SDK surfaces.

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 --fix after 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 everyMs schedules and owner delivery truthfully; existing { cron, timezone }, none, and last-channel variants retain their meaning.

Doctor emits this notice once when the migration receipt completes:

Migrated heartbeats now use standard Automations delivery. Heartbeat-specific duplicate suppression and no-route skipping were removed: repeated updates can be delivered, and a missing route no longer skips the run before execution. Delivery failures follow ordinary automation handling. Review the migrated jobs' delivery settings if you relied on either behavior.

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_change results 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:

  • Missing or ambiguous owner identity never falls back to the last group conversation. A missing route does not skip execution; a configured DM block remains intentional non-delivery.
  • A legacy model outside the agent's current allowed policy is dropped with a diagnostic. Doctor preserves allowed overrides and does not expand permission or model allowlists. Changed definitions may require fresh standing approval.
  • Ambiguous migration inputs remain recoverable and their pending jobs cannot run. Archived source bytes and explicit scratch tombstones are preserved; stale pending facts are not promoted into a replacement session.
  • Scratch becomes model context, so it is not a secret store. It remains revision-guarded and omitted from ordinary job/history responses.
  • Script state advances only after the complete run succeeds, preserving the existing retry contract when a requested follow-up is refused. Scripts with external effects must remain idempotent.
  • This does not promise exactly-once arbitrary tool effects across a crash. The existing Cron recovery contract still applies; the main-session system-event regression specifically prevents false success and replay before adoption.
  • Legacy protocol-v4 controls remain as adapters. Transport keepalives are unchanged. This slice adds no new global configuration, retention policy, or Claw lifecycle owner.

Evidence

Current main 2db57c72bf2448a2ff2004fa96ffd54672cd25b1 is 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:

  • 83/83 focused tests in six files pass: 26 Cron/controller cases, including restart settlement and both resolved suites, and 57 Doctor cadence/task migration cases.
  • Canonical Cron, Doctor, and root-tooling test type graphs pass. Typed lint, formatting, diff, and unmerged-index checks pass.
  • Independent Codex review of the two-file resolution delta is scoped-clean for P0–P2.
  • The preceding delivery repair passes 90/90 CLI tests, 81/81 UI owner tests, and 2/2 desktop/narrow browser edit-save cases, plus targeted types/lint/format and independent scoped-clean review. These inputs are unchanged by the merge. Its three new positive CLI cases and the actual editor fail before the fix; main default delivery and system-event/script restrictions remain preserved.
  • The preceding integration passed 135/135 focused tests and the canonical Cron, config, Doctor, and root-tooling type graphs. That is retained revision-scoped evidence, not a second run on this head.

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.

Failed job Main-baseline qualification
extensions-bundle-20 Memory publication admission expects schemaRebuilt=true; identical retained clean-main failure and unchanged causal source inputs.
extensions-bundle-23 Memory retained-worker read expects repairPending=true; identical retained clean-main failure and unchanged causal source inputs.
compact-large-15 Restart tombstone expects a slow-lifecycle warning that current main suppresses for uncontended work; identical retained clean-main failure.
changed-9 Both Telegram inherited-policy cases return delivered=false on a fresh build of actual CI main 662e2d3.
changed-14 Telegram emoji discovery has no request or scripted call on the same freshly built main.
changed-16 Telegram provider failure emits the Gateway-restarting notice on the same freshly built main.
changed-4 Five non-native Discord progress/custody cases reproduce on clean main; subsequent native-command-only changes do not exercise those fixtures, and the named inputs remain equal.

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):

Category Added Removed
Production/tooling 9,419 2,897
Tests/support 11,307 5,581
Docs 754 838
Generated output 5 9

Synthetic desktop, before:

Automations desktop before migration

Synthetic desktop, after:

Editable migrated automation and scratch on desktop

Synthetic narrow layout, before:

Automations narrow layout before migration

Synthetic narrow layout, after:

Migrated automation owner delivery on narrow layout

Main-session delivery repair, synthetic before:

Main-session job loses announce delivery before the repair

Main-session delivery repair, synthetic after:

Main-session job preserves announce and owner delivery after the repair

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.

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.
@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord channel: googlechat Channel integration: googlechat app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes scripts Repository scripts commands Command implementations agents Agent runtime and tooling channel: feishu Channel integration: feishu extensions: anthropic channel: buzz size: XL labels Oct 21, 2026
@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Oct 21, 2026
@steipete
steipete marked this pull request as ready for review October 21, 2026 03:48
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T10:09:01.673927Z c0d0b44 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: c0d0b44bc72be9f8ff3ba2f173d1c506af53222f
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/config/types.agents.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.

Carefully review these changes before merging.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/claws/portable-automation.ts Resolved
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 21, 2026
@clawsweeper clawsweeper Bot removed the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

This 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.

  • Before: Heartbeat configuration and reconciliation control the monitor and can replace independent job edits.
  • After: Doctor converts it into an ordinary Automation whose edits, disabled state, scratch, and deletion remain authoritative.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The direction is approved and visual evidence is useful, but confirmed upgrade defects block correctness and required authority and upgrade proof is incomplete.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🧂 unranked krab (1/6) Security review found an item that needs attention.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Partial
User problem: Heartbeat monitors appear as Automations while legacy configuration and reconciliation still control their behavior and can override edits or recreate deleted jobs.
Reason: The maintainer-approved design establishes clear value; this deliberately staged PR handles migration while executor and SDK removal remain for the following slice, so Related is appropriate.

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
Reviewed head: 53a3c032b7d01eb48d649b7d39cad910f71e3489

Before merge

  • Add real behavior proof - Authority-chain proof required: show authenticated claws.add.apply administrator success, writer-only rejection, and administrator revocation during preparation, with rejection before real scratch or activation commit and unchanged rejected-operation state. Inspected screenshots support the editor presentation; the supplied rejection tests mock persistence. Provide redacted runtime output or an authorized production-path harness trace without credentials, IPs, phone numbers, or non-public endpoints. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • Register the SQLite v30 migration before advancing the schema (P1) - For an existing SQLite store at v29, migrateBoundedStateSchema finds zero pending destinations while requiring one to reach the new version 30, so it returns undefined. prepareDoctorDatabaseMigrations uses versionMigrationOnly and fails with No bounded shared-state migration instead of reaching heartbeat conversion; older supported stores fail the same contiguous check. Register the metadata-only v30 destination in the SQLite migration owner. Exact-head CI already reports this refusal for v20, v25, and v28 fixtures.
  • Align the native reader with the new shared-state version (P1) - After the backend creates or upgrades a shared-state database to v30, the unchanged Swift maximumSupportedSchemaVersion of 29 rejects it as requiring a newer app. This affects the current app's Port Guardian shared-state access even when app and backend ship together. Update the native ceiling and its compatibility coverage with this schema bump; the exact-head native-version check already reports the drift.
  • Preserve unrestricted incomplete windows in portable imports (P2) - A valid portable profile can specify activeHours: { start: "09:00" } without an end. Legacy evaluation allows an 08:00 run, but this mapping supplies 24:00 and the ordinary scheduler suppresses that run. End-only profiles likewise gain an unintended restriction. Omit activeHours unless both bounds are present, matching Doctor's existing conversion rule, and cover both partial forms with independent execution-time expectations.
  • Migrate retained consumers of the removed heartbeat contracts (P2) - Removing heartbeat from the runtime schema leaves retained Gateway fixtures supplying agents.defaults.heartbeat, so they now fail during startup before exercising their intended behavior. Exact-head annotations show this across automation, routing, continuation, and authority suites. Retained heartbeat suites also create legacy payloads through createJob in heartbeat-runner.test-utils.ts, which the changed validator rejects. Update these consumers to canonical automation setup or explicit legacy migration fixtures while preserving their original assertions.
  • Resolve security concern: Establish revocation rejection at real scratch and activation commits - The added tests replace the Add service and persistence methods with mocks that invoke commitGuard themselves; they do not establish that the real persistence owners reject an administrator revoked during preparation.
  • Resolve merge risk - Administrator revocation during Claw Add preparation has not been shown to prevent the new scratch and activation operations from committing through the real persistence owners.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.
  • Explain or restore the original intent of Bounded SQLite version migrations - fix(doctor): bound scoped backups to version migrations #172671: Doctor finishes fully declared version phases before broader maintenance so scoped rollback remains valid; every destination must be declared, including a metadata-only fence.
  • Explain or restore the original intent of Incomplete active-hours windows - unknown: Current legacy source explicitly treats absent endpoints as permissive, and Doctor preserves that rule. Scoped log and content-history searches encountered unavailable older blobs, so the introduction is unknown.

Findings

  • [P1] Register the SQLite v30 migration before advancing the schema — src/state/openclaw-schema-versions.ts:31
  • [P1] Align the native reader with the new shared-state version — apps/shared/OpenClawKit/Sources/OpenClawNativeState/OpenClawNativeStateSQLite.swift:50
  • [P2] Preserve unrestricted incomplete windows in portable imports — src/claws/portable-automation.ts:41-47
  • [medium] Establish revocation rejection at real scratch and activation commits — src/gateway/server-methods/claws-add.ts:216

Provenance

  • Bounded SQLite version migrations changes intended behavior without addressing why it exists (fix(doctor): bound scoped backups to version migrations #172671: Doctor finishes fully declared version phases before broader maintenance so scoped rollback remains valid; every destination must be declared, including a metadata-only fence.)
  • Incomplete active-hours windows changes intended behavior without addressing why it exists (unknown: Current legacy source explicitly treats absent endpoints as permissive, and Doctor preserves that rule. Scoped log and content-history searches encountered unavailable older blobs, so the introduction is unknown.)

Tests

  • Missing end-to-end proof: Still needed: real Claw Add persistence with allowed, forbidden, and revoked authority, plus completed latest-stable upgrade preservation and regressions for the confirmed defects that fail on the reviewed head.
Agent review details

How this fits together

Doctor 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
Loading

Technical review

Best 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:

  • [P1] Register the SQLite v30 migration before advancing the schema — src/state/openclaw-schema-versions.ts:31
    For an existing SQLite store at v29, migrateBoundedStateSchema finds zero pending destinations while requiring one to reach the new version 30, so it returns undefined. prepareDoctorDatabaseMigrations uses versionMigrationOnly and fails with No bounded shared-state migration instead of reaching heartbeat conversion; older supported stores fail the same contiguous check. Register the metadata-only v30 destination in the SQLite migration owner. Exact-head CI already reports this refusal for v20, v25, and v28 fixtures.
    Confidence: 1
  • [P1] Align the native reader with the new shared-state version — apps/shared/OpenClawKit/Sources/OpenClawNativeState/OpenClawNativeStateSQLite.swift:50
    After the backend creates or upgrades a shared-state database to v30, the unchanged Swift maximumSupportedSchemaVersion of 29 rejects it as requiring a newer app. This affects the current app's Port Guardian shared-state access even when app and backend ship together. Update the native ceiling and its compatibility coverage with this schema bump; the exact-head native-version check already reports the drift.
    Confidence: 1
  • [P2] Preserve unrestricted incomplete windows in portable imports — src/claws/portable-automation.ts:41-47
    A valid portable profile can specify activeHours: { start: "09:00" } without an end. Legacy evaluation allows an 08:00 run, but this mapping supplies 24:00 and the ordinary scheduler suppresses that run. End-only profiles likewise gain an unintended restriction. Omit activeHours unless both bounds are present, matching Doctor's existing conversion rule, and cover both partial forms with independent execution-time expectations.
    Confidence: 1
  • [P2] Migrate retained consumers of the removed heartbeat contracts — src/config/zod-schema.agent-defaults.ts:18-20
    Removing heartbeat from the runtime schema leaves retained Gateway fixtures supplying agents.defaults.heartbeat, so they now fail during startup before exercising their intended behavior. Exact-head annotations show this across automation, routing, continuation, and authority suites. Retained heartbeat suites also create legacy payloads through createJob in heartbeat-runner.test-utils.ts, which the changed validator rejects. Update these consumers to canonical automation setup or explicit legacy migration fixtures while preserving their original assertions.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 76707b46ae79.

Merge-risk options

Maintainer options:

  1. Prove the real persistence boundary (recommended)
    Exercise authenticated administrator success, writer-only rejection, and administrator revocation during preparation through claws.add.apply, checking actual job activation and scratch storage.
  2. Hold the migration
    Keep this PR open until the final-effect authorization evidence is available.

Provenance checked

Testing

Proof path: in-process harness.

Security

Needs attention: The new Claw Add persistence operations carry live guards, but final-effect authorization remains unproven.

Evidence

Security concerns:

  • [medium] Establish revocation rejection at real scratch and activation commits — src/gateway/server-methods/claws-add.ts:216
    The added tests replace the Add service and persistence methods with mocks that invoke commitGuard themselves; they do not establish that the real persistence owners reject an administrator revoked during preparation.
    Confidence: 0.98

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 3d2f7ca adds src/cron/session-run.ts:23 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3d2f7ca06b26; files: src/cron/session-run.ts)

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Per-job policy additions 6 optional fields activeHours, idleOnly, delivery.target, delivery.directPolicy, payload.skipIfScratchEmpty, and payload.includeReasoning expand ordinary automation controls under the approved migration.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #134994
Summary: This PR implements the data and ownership migration slice of the accepted heartbeat-retirement design.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add P2: This is an approved migration improvement with concrete pre-merge defects; the reviewed changes have not shipped.
  • add merge-risk: 🚨 compatibility: The v30 fence currently lacks its SQLite migration and native reader alignment, and portable imports change incomplete active-hours semantics.
  • add merge-risk: 🚨 security-boundary: Claw Add gains administrator-authorized scratch and activation effects whose rejection after revocation remains unproven at real persistence.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🧂 unranked krab.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Label justifications:

  • P2: This is an approved migration improvement with concrete pre-merge defects; the reviewed changes have not shipped.
  • merge-risk: 🚨 compatibility: The v30 fence currently lacks its SQLite migration and native reader alignment, and portable imports change incomplete active-hours semantics.
  • merge-risk: 🚨 security-boundary: Claw Add gains administrator-authorized scratch and activation effects whose rejection after revocation remains unproven at real persistence.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🧂 unranked krab.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

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.
@openclaw-barnacle openclaw-barnacle Bot added channel: voice-call Channel integration: voice-call docker Docker and sandbox tooling labels Oct 21, 2026
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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread ui/src/lib/cron/form.ts Resolved
Comment thread src/cli/cron-cli/register.cron-add.ts Resolved
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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/cli/cron-cli/register.cron-edit.ts Resolved
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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

"cron.scratch.get": scopedCronJobHandler(

P1 Badge Allow current runs to access their own scratch

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".

@steipete

steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui channel: buzz channel: discord Channel integration: discord channel: feishu Channel integration: feishu channel: googlechat Channel integration: googlechat channel: voice-call Channel integration: voice-call cli CLI command changes commands Command implementations docker Docker and sandbox tooling docs Improvements or additions to documentation extensions: anthropic extensions: ollama gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts security-sensitive-changed size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant