Skip to content

refactor(automations): retire the heartbeat executor - #179526

Closed
steipete wants to merge 25 commits into
mainfrom
steipete/automations-s4
Closed

steipete wants to merge 25 commits into
mainfrom
steipete/automations-s4

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What problem this solves

Completes the heartbeat-to-Automations migration by retiring the old periodic executor, wake scheduler and response tool after jobs moved to ordinary Automations. The session controller is the single owner of admission and settlement; plugin follow-ups capture their original destination and retain current-authority checks across asynchronous work.

S4 of #167796, after S1 #178650 (restart settlement), S2 #178764 (ordinary execution and additive Claw review schema), and S3 #179387 (Doctor migration; replaces #178990 after its tooling-binding deadlock). Peter's approved October 3/12 design and October 18 everyMs / owner schema decision are preserved.

User impact and migration

Approved breaking plugin SDK change: removes the heartbeat runtime subpath, wake/run methods, response tool and executor-specific reply/context flags. Plugins use ordinary automation jobs or captureSessionEventTarget / enqueueSessionEvent; replacements are documented in docs/plugins/sdk-migration/removed-surfaces.md.

Doctor keeps its once-only migration notice. Historical transcript readers, public hook trigger values and v4 diagnostic adapters remain supported. No new configuration, retention policy or lifecycle owner is introduced. Pending keyed plugin retries deduplicate matching text and route at the existing event owner; distinct host occurrences remain distinct. Deduplication intentionally ends at adoption.

Implementation and review

Discord, Slack, Reef and node follow-ups now use ordinary controller receipts. Gateway shutdown keeps delivery recovery and upstream-monitor cleanup in its existing owner. Retired execution paths, their tests and public exports are removed together. The SDK comparison records nine removed exports, three signatures dropping executor-only fields and 254 reachable-type changes; observed bundled consumers are migrated. External SDK usage is known, so this is an explicit breaking migration rather than a claim of zero impact.

Gateway action-policy checks attach to the surviving concrete Codex tool map, including hook-adjusted MCP calls. Retired fallback executors stay absent. Tests retain unavailable/restored-session and action-policy coverage.

The preceding CI also exposed a ClawHub test baseline sampled during its eight-pixel card entrance animation. The fixture now awaits the existing layout-settlement helper before measuring. Every geometry assertion and timeout is unchanged. The original candidate reproduces the failure; the repaired exact case passes on both main and candidate and on the final integrated source.

Evidence

  • Full artifact build, declaration generation and all 157 public SDK subpaths pass. SDK and prompt outputs were regenerated through their owners.
  • Focused cutover proof covers Cron/restart/Doctor, shutdown/reload, node events, visible replies, real-runner WebChat, plugin authority, Discord/Reef, Slack and Codex source replies. All 29 selected compiler graphs passed at extraction; affected graphs were repeated after repairs.
  • Policy cutover validation: 66 focused cases pass, including all three restart-settlement regressions and Gateway/Codex policy cases; canonical extension production/test type graphs, typed lint, format and generated inventory check pass. The exact integrated ClawHub gutter case passes in 2.171 seconds. The focused wrapper takes 202.95 seconds, primarily compilation and worker setup.
  • Independent committed and repair reviews are scoped-clean through P2, including the policy resolution and final one-file planner resolution. No assertions, timeouts, budgets or skips were weakened.
  • Against integrated main 4d5538094426, production is +2,132 / −10,173 (net −8,041), tests/QA/helpers +3,183 / −21,337 (net −18,154), and other files net −21. Counts group test/spec/E2E/benchmark names and test support with tests.

Latest integration 5cb5ef765d7a merges main 9985064c131a. Its single test-only conflict combines effective child-worker environment assertions from #179885 with S4's selected canonical row budgets; the two-worker ceiling remains unchanged. Four focused planner cases and all three restart cases pass, as do tooling types, typed lint, format and generated inventory verification. The one-file resolution review is scoped-clean through P2.

Prior-head CI and accepted limits

Run 39676973516 completed on 5cb5ef765d7a24f34db88421c69033a7f3a8d03d. CI checked out merge fdd5a3fa453b0a539d675fb20e476bcca9c24c1c, with ordered parents clean main f365d7852ae107d1ddb343d4a2416231e232bbba and this PR head. The retained checkout log and source hashes bind that pair.

The five remaining root failures are attributed to main, using matching exact-revision controls and unchanged relevant inputs:

Failure Main attribution
Plain-config cold import (gateway-status-route-cold-imports.test.ts:93) Same false/true assertion on main; all 14 relevant inputs match.
Packaged IMAP (tsdown-config.test.ts:511) Main #179835 removed the success log awaited by the fixture. Exact main and tested merge dispatch the four expected messages, then hit the same child deadline. Cursor/restart assertions are not reached.
Memory background reload (four cases at 196/270/368) Same 120-second timeouts and startup-catchup sync wait on main. Thirty causal inputs match; four broader SDK/registry/package differences remain disclosed and do not alter this signature.
CLI message authority (seven cases) Main #117464 switched the provider to /messages/pins; the fixture still expects /pins, destroys the unexpected response, and yields the same ECONNRESET. Twelve causal inputs match; two inactive continuation-source differences are disclosed.
UI boot storm (chat-boot-render-storm.e2e.test.ts:233) Exact main and tested merge open the menu labeled “Session access”; the test awaits the old “Message permissions” label. All 15 relevant inputs match.

The two investigated timing failures each received one actual targeted CI retry after workflow completion. Levanto's prepared-prefix case passed on retry (job 119503451104; exact case 295 ms). The background-process SIGKILL/revocation case passed on retry (job 119509340215). No assertion, deadline, budget or source was changed to obtain these results. An initial 502 rerun response was reconciled before retrying the transport request; a rejected old-job-ID request did not execute the restart test.

The original local Levanto result is preserved: main passed in 314 ms, candidate failed in 925 ms against its unchanged 500 ms fixture deadline during overlapping build work; the isolated reverse pair passed candidate 237 ms / main 234 ms. The original refusal phase remains unobserved, so passing retries are not claimed as a repair. The exact restart case passed locally on both main in 24.478 s and tested merge in 22.769 s, reaching revocation, restart recovery and no-duplication assertions; its original pre-restart permission refusal was not reproduced. These local controls used the CI Node/Bun pins but Darwin rather than Linux; the successful targeted CI retries supply the Linux follow-through.

The native landing uses Peter's authorized pre-existing-failure exception for the five attributed roots and their aggregate only. Independent security remains required. Historical transcript/public adapters remain supported; keyed-event deduplication ends at adoption; external SDK consumers must follow the explicit breaking migration. Optional package/PostgreSQL/live campaigns were not repeated per Peter; preceding slices retain stable-upgrade evidence. No live Gateway was modified.

Attempt 4 and native admission

Run 39676973516 attempt 4 completed with 206 unique job IDs, all terminal: 182 success, 18 skipped, five failed test jobs and the aggregate gate. The attempt-3 queued duplicate is absent. Both previously targeted timing retries remain successful; independent security-fast passed.

The five remaining jobs retain the main-baseline attribution above. The memory job has a recorded variation: three familiar timeouts are followed by a shared-state ownership refusal in the fourth case, immediately after the preceding timeout. Its fixture, seed-session write path and database guard are identical on main and the tested merge. The exact fourth-case error was not reproduced in the retained main controls; the unchanged-source audit attributes it to the existing memory lifecycle/fixture failure, while the precise cleanup interleaving remains uninstrumented. No source, timeout, assertion or skip was changed.

Native review and admission use attempt 4 with fresh job IDs and retained logs, under the authorized inherited-failure exception. The earlier attempt-3 admission refusal remains part of the evidence history.

Previous integration (c1b8)

Head c1b8c4f11cca474e779ab2b0da22059dd579f8f9 integrates main 4d55380944261e25a1f849328b8304ad397c4b6d. The two manual conflicts from #180003 are limited to Slack presence source/tests: optional enqueue/wake callbacks remain removed, while the production provider supplies the required session-event capability for target capture, admission and settlement. Retired heartbeat imports and spies remain removed. Existing presence behavior and all 24 tests are preserved.

All 24 focused presence cases, extension production/test typegraphs, typed lint, format and index checks pass. The resolution-only review is scoped-clean through P2. The preceding integration already passed 173 focused cases; unchanged proof is retained. Native preparation is complete for this head. Exact-head CI run 39691941914 attempt 1 completed with 205 unique terminal jobs (181 success, 18 skipped, five failed test jobs plus the aggregate). There were no duplicate or unfinished phantom jobs. Attempt 2 completed with 205 unique terminal jobs: 182 success, 18 skipped, four inherited failed test jobs and the aggregate. The targeted Levanto retry passed; previous runs above remain historical evidence.

Prior-head failure investigation (c1b8)

Run 39691941914 checks head c1b8c4f11cca474e779ab2b0da22059dd579f8f9 through merge b343b1ae230cbba26f522dd89d7035394a3f57b3, with actual main 4d55380944261e25a1f849328b8304ad397c4b6d. Four failed jobs are attributed to main, with exact current-main reproduction where needed. No source, assertion, deadline, budget or skip was changed to obtain the results:

  • checks-node-changed-compact-small-22 (job 119541168845): src/infra/fs-safe-import-boundary.test.ts:299:24 rejects the namespace import in extensions/acpx/src/codex-auth-bridge.test-support.ts, introduced on main by refactor: narrow private plugin adapter inputs #180003. The complete file fails identically on candidate and clean actual main: one failed, 22 passed. Twelve causal source/tooling inputs match. The initial main setup failed before tests because a workspace dependency link was absent; the subsequent correctly linked replay supplies the product result.

  • checks-ui-e2e (3/9) (job 119541165123): ui/src/e2e/chat-header-subagents.e2e.test.ts:122:62 waits for a Details section that remains hidden, before any delegated-work request. The exact file fails identically on candidate and clean actual main, each resolving the same hidden section 23 times. Local default timeout is 10 seconds; CI uses 30 seconds and resolves it 62 times. Relevant product, test, style and bundling inputs match. Test durations were 23.32 seconds on candidate and 22.14 seconds on main. This is an inherited failure, not a repaired timing issue.

  • checks-node-changed-compact-small-21 (job 119541168251): all four memory-background-reload.test.ts cases hit the same 120-second deadline on fresh clean actual main. Both detached-sync variants report session-startup-catchup: sync completion, with no ordinary calls or retained work. The main control took 512.72 seconds. Relevant memory lifecycle code had moved since earlier controls, so a fresh replay was used; four broader adapter/package differences remain disclosed. The precise internal wait in the first two watcher cases remains uninstrumented.

  • checks-node-changed-compact-large-12 (job 119541173131): both transcript-conflict cases in run.shared-integration.test.ts expect the original SQLite conflict by identity, while the unchanged production normalization owner throws ReplaySafeTranscriptConflictError. Both fail identically on candidate and clean actual main (21.48 / 20.19 seconds). The exact failing case block and production owners match; the scenario module differs only by deletion of a later obsolete heartbeat test.

The fifth root, Levanto job 119541168362, timed out waiting for its image-preparation probe before its admission assertion. The exact case passes locally on candidate (184 ms) and main (208 ms), using pinned Bun, and had passed on two earlier Linux jobs. Its unchanged fixture allows only 500 ms for evaluation, which can return unavailable before the deferred probe starts. All 27 causal inputs match. One exact-job retry was dispatched after the full workflow completed; replacement job 119549576773 passed. Passing replay is not a source repair.

The four inherited roots remain red and qualify for the authorized exception. Local controls use Darwin; CI supplies Linux candidate evidence. Independent security passed. The complete attempt-2 census is terminal with no unfinished or duplicate phantom jobs. The four inherited executions were copied into attempt 2 with verified matching execution fields: UI 119549559486, memory 119549564491, filesystem boundary 119549567279, transcript conflict 119549569207. The aggregate gate is 119553199338. Native admission uses these exact records under the authorized inherited-failure exception; independent security and all non-exempt gates remain enforced.

Second integration (0ca1)

Head 0ca1ff6a11bbb5c74e0e0bca014ed7edadc86fe9 merges main 9d2ac90d14da283e9f6595eeaf483f4c19a5dbac. Native admission of c1b8 stopped before dispatch because main introduced a conflict in reply-turn-admission.waiting.test.ts. The resolution preserves main’s simplified helpers and all surviving admission behavior, while removing only tests and parameters for the retired heartbeat kind. All 11 admission cases and three restart-settlement cases pass. Messaging test types, typed lint, format, SDK export synchronization, worker-inventory generation and index checks pass; generators produced no new delta. Resolution-only review is scoped-clean through P2.

Exact-head CI 39696922641 was superseded by the final conflict repair below. Its completed filesystem-boundary failure matches the previously recorded main signature; no source repair is claimed.

Final integration and CI

Head 029329373fd27f4fbb965b81ba879eceda7f226c merges main f6ee99166170edff91c73abb851f8c4bf79d96b3 after a conflict from main’s cron test consolidation. The resolution preserves the surviving execution-deduplication and persisted-history assertions and removes only the obsolete requestHeartbeat fixture field. There is no production resolution delta and no generated-output conflict.

All seven focused cron end-to-end cases and three restart-settlement regressions pass. The focused E2E invocation took 200 seconds including the required build; its test phase took 33.60 seconds. Restart proof took 33.17 seconds. The services-cron test typegraph, typed lint, formatting and index checks pass. Resolution-only review is scoped-clean through P2. Exact-head CI is pending; earlier classifications remain historical until the actual checkout and changed inputs are verified.

Current landing blocker

After the final integration was pushed, main advanced to 6b16cf629434102f12f821346e3e4e8da88655ce. A read-only merge check now reports a conflict in test/scripts/ci-changed-node-test-plan.test.ts following #180051 (6cf6894e7e40e). No fourth integration was attempted beyond the three authorized cycles. The branch is clean at 029329373fd27f4fbb965b81ba879eceda7f226c.

No CI workflow has attached to this head; Security Review reports “Waiting for CI.” The passing focused checks above remain valid local proof, not a completed exact-head CI result. No merge request was sent for this head. S4 and the original #167796 remain open.

Route plugin and node follow-ups through captured ordinary session-event
receipts, preserving current authority, destination identity, cancellation,
and settlement. Remove the superseded executor, wake scheduler, response tool,
and approved heartbeat SDK exports.

Keep Doctor migration and once-only notice, historical transcript readers,
public hook tags, diagnostic adapters, and existing Gateway cleanup ownership.

Completes the S4 retirement slice of #167796 after #178650, #178764, and #179387.
@steipete steipete added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. security-sensitive-changed labels Oct 21, 2026
@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.

@steipete
steipete marked this pull request as ready for review October 21, 2026 13:44
@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-22T00:18:09.712645Z 0293293 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: 029329373fd27f4fbb965b81ba879eceda7f226c
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/agents/cron-creator-authority-context.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.

Carefully review these changes before merging.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: whatsapp-web Channel integration: whatsapp-web app: web-ui App: web-ui gateway Gateway runtime extensions: memory-core Extension: memory-core cli CLI command changes scripts Repository scripts commands Command implementations docker Docker and sandbox tooling agents Agent runtime and tooling extensions: codex plugin: file-transfer extensions: xai extensions: copilot channel: reef Channel integration: reef size: XL labels Oct 21, 2026
@steipete steipete closed this Oct 21, 2026
@steipete steipete reopened this Oct 21, 2026

@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: e32b1fb757

ℹ️ 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/infra/heartbeat-active-hours.ts Resolved
The ClawHub baseline could capture the initial eight-pixel rise transform even with reduced motion. Reuse the existing layout-settlement helper before the desktop measurement, preserving every viewport, gutter and restoration assertion and deadline.
Keep current Gateway action-policy checks on available Codex tools without restoring retired heartbeat fallback execution. Preserve main policy coverage and regenerate the worker inventory through its owner.
@clawsweeper clawsweeper Bot removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 21, 2026
Retain current main completion handling for silent before_agent_reply claims without restoring the retired heartbeat acknowledgment branch. Regenerate the database worker inventory through its owner. Hook completion10/10, restart settlement3/3, targeted types/lint/format and scoped resolution review pass.
Preserve main bootstrap fixture consolidation without restoring the retired heartbeat run kind. Keep both catalog completion and layout settlement before ClawHub geometry measurements. Regenerate worker inventory through its owner. Bootstrap 15, ClawHub 1, restart 3, targeted type/lint/format and independent resolution review pass.
Combine main effective child-environment assertions with selected canonical row packing. Preserve the two-worker ceiling and serial projection contract. Planner4, restart3, tooling types, lint, format, generated inventory and independent resolution review pass.
@clawsweeper clawsweeper Bot added 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 removes the heartbeat executor and routes plugin and node follow-ups through ordinary session admission.

Example: A Slack block action queues an agent follow-up.

  • Before: The interaction enqueues a system event and requests a heartbeat wake.
  • After: The interaction captures its destination and receives acceptance and settlement from the ordinary session controller.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The approved ownership cutover has substantial supporting boundary coverage, but the new authority chain lacks complete final-effect evidence and a confirmed migration-link defect remains.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Scheduled monitoring and immediate follow-ups retain a separate heartbeat execution owner after migration to ordinary Automations.
Reason: The maintainer-approved design calls for this final cutover, including breaking SDK removal; the substantial deletion removes superseded execution machinery.

Merge readiness

⛔ Blocked before merge - 5 items remain

Keep open: this completes an approved Automations migration, but both new SDK compatibility records still link to a nonexistent migration heading.

Priority: P2
Reviewed head: 5cb5ef765d7a24f34db88421c69033a7f3a8d03d

Before merge

  • Add real behavior proof - Authority-chain proof required: exercise the new registry-bound plugin follow-up through real admission and final I/O, with an allowed control and rejection after plugin revocation or Gateway replacement while pending; supplied images cover the earlier editor migration, and the new registry tests mock host handoff. 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.
  • Point both removal records at the live migration heading (P2) - When compatibility diagnostics expose either new heartbeat removal record, docsPath targets #heartbeat-runtime-and-reply-helpers, which does not exist. The added guide section is #heartbeat-executor-and-wake-helpers, already used by the other migration links. Change both records so plugin authors following diagnostics for this breaking removal reach the replacement instructions.
  • Resolve security concern: Verify retained plugin authority through final I/O - The registry creates live plugin/Gateway assertions and the adapter retains them in captured targets, but the new registry tests mock the host handoff. They demonstrate callback rejection rather than rejection through the complete queued execution and delivery path.
  • Resolve merge risk - Establish that a captured or queued plugin follow-up cannot reach provider, tool, or delivery I/O after its plugin is revoked or its Gateway owner is replaced.
  • Complete next step - Resolve GitHub's reported merge conflict, then establish the resulting head's required-check outcome and attribute remaining failures without treating prior-head controls as current proof.

Findings

  • [P2] Point both removal records at the live migration heading — src/plugins/compat/plugin-sdk-removed-export-records.ts:113
  • [medium] Verify retained plugin authority through final I/O — src/plugins/registry-runtime.system.test.ts:23

Tests

  • Missing end-to-end proof: The supplied evidence does not show the new registry-bound plugin capability being revoked or reassigned while pending and rejected before final I/O.
Agent review details

How this fits together

Cron, plugins, and node events supply scheduled work or follow-ups; the session controller owns admission and settlement, and existing delivery owners publish the resulting replies.

flowchart LR
  Cron[Automation jobs] --> Admission[Session admission]
  Plugins[Plugin follow-ups] --> Capture[Captured destination]
  Nodes[Node events] --> Capture
  Capture --> Admission
  Admission --> Execution[Ordinary agent execution]
  Execution --> Delivery[Reply delivery]
  Delivery --> Settlement[Controller settlement]
Loading

Technical review

Best possible solution:

Complete the approved cutover through the existing session controller, correct both migration links, and establish final-effect plugin revocation proof.

Do we have a high-confidence way to reproduce the issue?

The migration-link defect is directly reproducible from source: both compatibility records reference a fragment absent from the migration document; no target code was executed.

Is this the best way to solve the issue?

Using ordinary session admission is consistent with the approved design and avoids a competing scheduler; retained Doctor and historical-reader helpers serve existing compatibility responsibilities.

Full review comments:

  • [P2] Point both removal records at the live migration heading — src/plugins/compat/plugin-sdk-removed-export-records.ts:113
    When compatibility diagnostics expose either new heartbeat removal record, docsPath targets #heartbeat-runtime-and-reply-helpers, which does not exist. The added guide section is #heartbeat-executor-and-wake-helpers, already used by the other migration links. Change both records so plugin authors following diagnostics for this breaking removal reach the replacement instructions.
    Confidence: 1
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.84

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0e3aaad0c2e8.

Merge-risk options

Maintainer options:

  1. Prove plugin retirement at the final effect (recommended)
    Exercise an allowed follow-up through the real registry and session owner, then revoke the plugin or replace its Gateway while work is pending and verify rejection before provider, tool, or delivery I/O.

Provenance checked

  • Heartbeat execution and ordinary session ownership changes intended behavior with a stated reason (refactor(automations): run scheduled conversation work through session admission #178764: The preceding stage moved conversation jobs into session admission while deliberately retaining heartbeat execution until migration and retirement stages.)
  • Doctor migration helpers keeps the original intent (ec5d369: Doctor preserves legacy schedules and persisted job identity; this PR relocates the retained identity and schedule helpers rather than removing migration support.)
  • Public SDK removal changes intended behavior with a stated reason (28d3760: The shipped-surface guard requires dated compatibility records; the current records and migration guide document the explicitly approved breaking exception.)

Testing

Proof path: in-process harness.

Security

Needs attention: No concrete authorization bypass was established, but the new plugin capability needs final-effect revocation evidence.

Evidence

Security concerns:

  • [medium] Verify retained plugin authority through final I/O — src/plugins/registry-runtime.system.test.ts:23
    The registry creates live plugin/Gateway assertions and the adapter retains them in captured targets, but the new registry tests mock the host handoff. They demonstrate callback rejection rather than rejection through the complete queued execution and delivery path.
    Confidence: 0.91

What I checked:

PR surface

PR surface statistics unavailable: the file list is incomplete.

Root-cause cluster

Relationship: partial_overlap
Canonical: #134994
Summary: This PR is the executor-retirement stage of the accepted heartbeat-to-Automations 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 runtime consolidation with a concrete migration-guidance defect and unresolved validation work.
  • add merge-risk: 🚨 security-boundary: New captured plugin capabilities carry authority across asynchronous admission, and complete revocation-to-final-effect evidence remains unverified.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Label justifications:

  • P2: This is an approved runtime consolidation with a concrete migration-guidance defect and unresolved validation work.
  • merge-risk: 🚨 compatibility: The PR intentionally removes public SDK exports and runtime methods used by external plugins; this breaking tradeoff is explicitly approved and documented.
  • merge-risk: 🚨 security-boundary: New captured plugin capabilities carry authority across asynchronous admission, and complete revocation-to-final-effect evidence remains unverified.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add final-effect proof that a revoked plugin or replaced Gateway cannot cause provider, tool, or delivery I/O from a retained queued follow-up.

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, 5:54 PM ET / 21:54 UTC.

Preserve current main fixture consolidation and inline Slack interaction handling while retaining captured destinations, runtime-policy checks, awaited session-event admission, and retired executor removal.
Keep the narrowed Slack presence inputs and ordinary session-event capture, admission, and settlement. Drop conflicting imports and spies for the retired heartbeat path.

@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: 0ca1ff6a11

ℹ️ 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 on lines +357 to +361
const receipt = params.runtime.system.enqueueSessionEvent(notice.text, {
agentId: route.agentId,
sessionKey: route.sessionKey,
contextKey: notice.contextKey,
expectedTarget,

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.

P2 Badge Route Reef owner notices to the owner

For a waking overdue-delivery notice, route.sessionKey identifies the Reef conversation with notice.peer, and the captured target therefore contains that peer's Reef delivery route. Because this call supplies no explicit deliveryContext, enqueueSessionEventForHost falls back to expectedTarget.deliveryContext (src/auto-reply/reply/session-event-handoff.ts:94), so any terminal reply can be sent to the unreachable recipient rather than the owner the notice is intended to inform. This also changes the previous heartbeat behavior, whose default delivery target was owner; capture or provide the owner's delivery destination while retaining the peer session only as context.

Useful? React with 👍 / 👎.

Keep current main cron contract test consolidation and remove its retired requestHeartbeat fixture wiring. Preserve isolated execution deduplication and restart settlement coverage.
@steipete

Copy link
Copy Markdown
Contributor Author

The heartbeat retirement has landed in four replacement slices:

Closing this superseded integration PR. Ordinary scheduled work now uses Cron/session-controller admission and settlement; Doctor retains the heartbeat-to-Automations migration and once-only notice. The retained public hook adapter and legacy migration inputs are intentional compatibility surfaces. Full migration context remains in #167796.

Final slice #180563 merged as 7f4cbc1. Its exact-head CI attempt 2 passed after one retry of two investigated transient failures; security review passed. No remaining work from this retirement is held in the superseded PR.

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: discord Channel integration: discord channel: reef Channel integration: reef channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: whatsapp-web Channel integration: whatsapp-web clawsweeper:intake:feature Preliminary submission classification; full source review pending. cli CLI command changes commands Command implementations docker Docker and sandbox tooling docs Improvements or additions to documentation extensions: codex extensions: copilot extensions: memory-core Extension: memory-core extensions: qa-lab extensions: xai gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. plugin: file-transfer scripts Repository scripts security-sensitive-changed size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant