Skip to content

refactor(cron): consume standing grants through the Gateway owner (cron 3/3) - #164864

Merged
steipete merged 12 commits into
mainfrom
dbasync/cron3
Oct 4, 2026
Merged

steipete merged 12 commits into
mainfrom
dbasync/cron3

Conversation

@steipete

@steipete steipete commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Cron standing-grant lookup and consumption still ran SQLite on the Gateway thread. A committed consume did not retain live authority through child, PTY, and relay preparation, leaving a consume-to-spawn revocation gap.

Why This Change Was Made

Move lookup and atomic consumption into the existing shared-state read worker and approval writer. Bind each attempt to its exact admitted receipt, operational instance, selected grant and parent, operation binding, and physical database. Message and standing-grant uses share cron2's receipt observation and FIFO held-use owner through native initiation and acknowledgement.

Consumption accounts once. Unknown consumption never launches, retries, or refunds; a proven pre-initiation fallback revalidates the same grant without another count. Close seals new effects and joins accepted writes and native settlement before retiring resources. Rejected native acknowledgement now fails logical drainage explicitly while retaining physical custody and sealed admission; the Gateway process must retire before that database can reopen.

The existing exec-policy owner supplies prepared final assertions without new SQL and coordinates pending/committed invalidation. Permission withdrawal refuses while native acknowledgement remains unresolved. Local exec-policy mutations retain supported offline behavior and refuse a foreign live Gateway owner. Normal unguarded spawn cancellation and signal-zero behavior remain intact.

User Impact

Scheduled commands retain current receipt, grant and policy authority until native startup, while grant lookup and consumption run through database workers. Eligibility, use accounting, stored schemas, retention, configuration and required released-call parameters are unchanged. There are zero new OPENCLAW_* names. The released two-argument asynchronous PTY call remains supported with an optional lifecycle hook; no released callable is removed or changed from synchronous to asynchronous.

Both prerequisites are merged and incorporated: foundation #164805 (58bcc015) and held-use transport #164906 (9a7b4dab). Final candidate 7025348efa4832bc973437e899113a5d2e04725d incorporates main 2be4d4fc561b281a13042ec1c55d3c7b1b5404bf through merge commits, without rebasing. Later main integrations preserve the shared receipt owner, main persistence settlement and dependency-free refusal leaf. The latest integration is mechanical and changes no cron3 production file.

Incidental overlap with #162433 and the test cleanup #164976 is preserved. #112375 receipt semantics and #158244 skill-policy expansion are not adopted. The initial general approval evaluation retains its pre-existing native policy load (src/infra/exec-approvals.ts:82), and the non-standing/public SDK final assertion retains its reader (src/infra/exec-approvals-authorization.ts:61); neither is credited as migrated here. Standing lookup, consumption and final guards are the migrated boundary. No pre-existing other-owner SQL remains inside those new worker grants.

Operator behavior and worker ownership are documented in docs/tools/exec-approvals.md and docs/reference/database-schemas/worker-access.md. This PR carries its release-note context; CHANGELOG.md remains release-owned.

Evidence

All current-head qualification below binds 7025348e / tree 6adf0b5eaf7fc396bcab6b52e52989111c5d111c. Native preparation completed in github_pending mode and verified that the published head already matched the prepared head; it did not repush or rebase.

Qualification Result
Independent P2 review Scoped-clean on the exact committed tree; no actionable P0–P2 findings. Diff checks pass.
CI Run 37223362025, attempt 1: 90 success, 21 skipped, one inherited QA root failure plus its aggregate; no cancellations.
Native Windows All five Windows Node shards passed on this head.
Gateway and browser Both real-Gateway shards, browser tests, and affected core jobs passed. Build, type, lint, docs and security-fast passed.
Released SDK Canonical comparison exited 0 in 1,411.336s. Zero direct cron3 API changes versus main; released PTY callable preserved.
Published-driver update Published 2026.9.8 updated this exact candidate successfully through the authorized AWS fallback. Durable status succeeded/finished, replacement build verified, readiness HTTP 200, legacy SQLite preservation and repeated Doctor checks passed.
ClawSweeper Trusted exact-head completion at 2026-10-04T18:16:15.085Z, durable comment 5979054408; no actionable correctness/security findings. Its SDK and published-driver requirements have now passed. The surrounding workflow failed later lifecycle-finalization steps, so it is not presented as a successful workflow run.

The SDK main digest is d99c3c9a154a754f211641f0ffd1ad9fe802f52e43d4ab1f4e5df8dba8ba0190 (ack d99c3c9a): no direct entrypoint/export/signature changes, 127 reachable closures and the same 16 distinct reviewed declaration changes. Release digest c43ed69eca4f9081cd6a81bc1af2e44232a528f5a9e60dbf180da43a8ef578a1 (ack c43ed69e) has exactly the same direct differences as release-to-main, including all 79 signature differences. Candidate/main declarations were freshly rendered. Immutable release reuse was qualified against 41 renderer modules, 51 source/config objects and unchanged compiler/tsx/fs-safe resolutions; the lockfile changed only four Baileys patch hashes. The released PTY parameter, handle and subscription types remain compatible, with retained compatibility type-test proof for unchanged inputs.

The update candidate SHA-256 is 37c0019051c4d206682f90efa05fb1a3e7318d2865a38841adbfc4c5d13cb447; build ID 2026.9.8-7025348efa48-2026-10-04T19-11-45.335Z. Canonical prepack took 645.471s; the cell took 489.730s within the unchanged 1,125-second deadline. The real updater exited 0 in 383.870s and durably finished run 566ec3ce-ed89-4e4d-b5ec-eb5a1cdaa458. All three SQLite stores retained their logical hashes and passed integrity/FK checks; global schema 19→20 and reclamation 0→2 were followed by successful idempotent Doctor maintenance (16.275s), without repeated conversion. Connected server build identity and readiness were verified; operator-read diagnostics remained scope-limited.

Update limitations and infrastructure outcomes remain explicit. Changed agent snapshots retain manual-recovery protection for later writes; container service membership used managed stop/update/start; advisory Doctor inspections were deferred. The build emitted a nonblocking startup-JavaScript diagnostic of 365.1 KiB versus a 364.7 KiB budget, so no passing performance-budget claim is made. Testbox timed out after 15 minutes in admission before any payload ran and was stopped before AWS allocation. AWS telemetry/automatic-heartbeat warnings were handled with successful supported keepalives within the original budget. After the successful cell, the task-owned tar command returned 1 for a directory-mtime change. Its existing archive was recovered and independently verified: 75 files, SHA-256 9402fc8a5e41a9b4533d8f67c2d9f1afb72ecbaeae8b31be841f3f1831720883. The outer capture failure is not relabeled green. No updater or prepack rerun was performed.

Explicitly approved inherited CI failure

Only job 111498230245 (checks-node-changed-extensions-config-27) and aggregate 111499788525 are qualified for the native admin route. In extensions/qa-lab/src/gateway-child-artifacts.test.ts, cleanupQaGatewayTempRoots > retains runtime on agent close failure, removes staging, and permits cleanup retry expects tempRoot: close failed but receives tempRoot: Agent database close failed. The unchanged agent lifecycle aggregates close errors, while QA intentionally exposes only the redacted top-level message. The fixture still expects the older inner text; the shared-store variant passes. Cron authority and native spawn acknowledgement do not produce this mismatch.

The same case fails independently on main 2be4d4fc (10 passed / 1 failed, 146.291s wall) and in all five historical head/base pairs. The actual CI checkout is 851fa1e13652c401ac8795bbb702778c6fe39ed5, with ordered parents main c9bff77155b0d6fde8214b5e9cbfbc32178eff09 and candidate 7025348e. Its tree bc1414e3ecbd9c6631a1d2fde8b6186466a1586a exactly matches a fresh merge reconstruction. All 103 inspected QA/auth/config/lifecycle/normalization/SDK/SQLite objects match baseline to tested merge. This covers the specific failing path, not the complete transitive process/import closure. The five critical QA/cleanup/SDK/lifecycle files remain unchanged through the final inspected main 3071b147; no QA repair has landed there.

The owner-approved exception binds this completed attempt, original logs, independent main reproduction, source objects, merge reconstruction and actual passing scoped proof. Security, required reviews and live authority remain enforced. Tests remain recorded as failed; only this root and its downstream aggregate are admitted. No CI rerun was requested.

Repairs, retained proof and measurement

Landing repair 19803abf fixes the introduced broker regression: ordinary queued spawn/execa cancellation must settle through its native cancellation result instead of being rejected as guarded startup. Five full-file runs per revision first failed on original head 99e1dfa3 and passed on stack base 2a4d54f9; focused repaired process proof passed 41 tests in 120.43s. Integration/repair 938dc4fc fixes rejected native acknowledgement hanging logical drainage while preserving physical custody, sealed admission and refusal of replay/refund/reopening. Its disposable child regression failed on the original code (5.532s) and passed on the repair (11.205s). No recoverability was introduced into that failed process.

Current CI validates the integrated candidate. Reused proof is explicitly historical and applies to unchanged production inputs: 344 tests across seven files on 1a3bc505, including 15 real native grants, 19 receipt-owner cases, two real Gateway-close cases and required worker/import/runtime-build graphs; 239 tests across 16 files and seven type graphs on 4c0a856e; 55 compiled CLI cases; and 295 routing cases on 8fa59cbc (844.10s wrapper wall). The native grant proof composes real storage, receipt/policy authority, consumption, exec runtime, supervisor and native file I/O. Valid authority appends/consumes once; replay, revoked/replaced/finished authority and tightened policy prevent an unauthorized append. Initial approval evaluation and RPC are mocked outside the migrated boundary. Repair-head CI at 19803abf ran the 14 grant cases in 11.248s, with native-effect cases individually costing 0.617–1.130s; the later retained-custody child supplies the additional failure-lifetime contract.

Incorporated main repairs resolved the former routing, browser-spinner, memory-schema and reindex-fixture failures. Origins now pass 11/11, forget settlement 4/4 and reindex 24/24 on main 2be4d4fc, and their current CI lanes pass. Historical Bun socket and real-Gateway ownership failures did not reproduce in five head/base pairs and remain unattributed; later passing CI is not claimed as their root-cause repair, and neither is waived. Doctor auth-consumer proof passed on the earlier integration; its original cause remains unproven. Prior CI attempts and old update/SDK receipts are historical, not substituted for current-head qualification.

A fresh matched original-scope cron-tick replay measured 1,620 main-thread SQL statements on each revision; all 274 method/SQL frequency pairs match, with zero SQL errors and zero standing-grant operations. Worker SQL was 3,833→3,799; caller prepares were 538→538. Eight differing full-stack rows are existing schema-refresh pairs moving between publication and placement callers, whose 28 source files have identical blobs: publication worktree lookup (src/gateway/github-publication-availability.ts:153) and database opening (src/gateway/github-repository-publication-store.ts:58) each go 1→0; placement lookup (src/gateway/worker-environments/worker-turn-launcher.ts:207) and publication table lookup (src/gateway/github-repository-publication.kernel.ts:162) each go 0→1. readSqliteCacheDataVersion (src/infra/sqlite-schema-facts.ts:309) charges refresh to the first observer of a foreign commit; the new pair adds no frequency. Only the per-run timestamp literal in an unchanged session migration statement was normalized.

The deleted historical 1,652→1,661 (+9) traces cannot be reconstructed and remain unattributed. The new pair establishes no added main-thread SQL in its fixture; zero grant operations make it smoke/attribution evidence, not a grant-consumption speedup claim. Original-scope inventory credited only standing-grant R6: T1 914→908, worker sites 975→981, total primitive sites unchanged at 2,541; these are not final integrated-main counts.

Bind prepared effects to exact receipt facts and the existing Gateway-owned
FIFO. Keep repeatable assertions separate from one-shot native initiation,
and release exclusion before awaiting the provider response.

Allow a use to borrow its own gate for consumption while preserving native
publication and settlement. Closing retires unused effects and joins accepted
borrowed persistence independently of scheduler cancellation.

This additive interface supports the message and standing-grant cutovers;
it does not activate either consumer or change schema, retention, or policy.
@clawsweeper

clawsweeper Bot commented Oct 4, 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 gateway Gateway runtime cli CLI command changes scripts Repository scripts agents Agent runtime and tooling size: XL labels Oct 4, 2026
@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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 4, 2026
@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 4, 2026, 3:45 PM ET / 19:45 UTC (Revision 21).

ClawSweeper review

What this changes

The PR moves scheduled-command grant checks into database workers and keeps Gateway-held authorization active through native process startup.

Merge readiness

✅ Ready for maintainer review

This remains useful, distinct work. The previously required upgrade qualification is now supplied for the unchanged pinned head, and this review found no remaining actionable correctness or proof blocker.

Priority: P2
Reviewed head: 7025348efa4832bc973437e899113a5d2e04725d

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Strong native authority proof, repaired negative controls, released SDK comparison, and completed upgrade qualification support the clean patch assessment.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): Recorded native runs exercise the changed Gateway receipt/approval owners through real exec, supervisor, broker, and file I/O, showing one allowed use and no unauthorized append after invalidation. Relevant production bytes remain unchanged, and exact-head published-driver upgrade evidence resolves the previous blocker. Stored formats and schemas are unchanged.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): Recorded native runs exercise the changed Gateway receipt/approval owners through real exec, supervisor, broker, and file I/O, showing one allowed use and no unauthorized append after invalidation. Relevant production bytes remain unchanged, and exact-head published-driver upgrade evidence resolves the previous blocker. Stored formats and schemas are unchanged.
Evidence reviewed 10 items Pinned source and complete body: The checkout and live PR head are 7025348. Reading the full GitHub body filled the supplied excerpt gaps; its SHA-256 exactly matches the captured source identity 61ed7d830e33e1042537029d98ac006a0258499d971c1ca1dc591f352295c59b.
Work remains absent from fetched main: Fetched main still performs synchronous standing-grant validation and releases mutation custody after consumption, without this branch's retained launch interval. The merged foundation #164805 and transport stage #164906 do not replace this execution consumer.
Authority retained through final effects: The production consumer binds the exact source, receipt, physical database, grant, and parent approval; consumption borrows the receipt interval, and native initiation spends it once. Unknown consumption terminates the attempt; a proven pre-initiation retry revalidates without incrementing usage again.
Findings None None.
Security None None.

How this fits together

Cron schedules agent runs that can execute commands under previously approved standing grants. The Gateway coordinates receipt, approval, and policy authority before the process supervisor launches those commands.

flowchart TD
  A[Scheduled agent run] --> B[Gateway receipt owner]
  B --> C[Approval read worker]
  C --> D[Atomic grant consumption]
  D --> E[Current receipt and policy checks]
  E --> F[Native process startup]
  E --> G[Refusal without command I/O]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +939, Tests +1310, Docs +21, Other +7. Total +2277 across 76 files.

View PR surface stats
Area Files Added Removed Net
Source 48 1205 266 +939
Tests 24 2002 692 +1310
Docs 2 27 6 +21
Config 0 0 0 0
Generated 0 0 0 0
Other 2 7 0 +7
Total 76 3241 964 +2277

Review metrics

Metric Value Why it matters
Production versus regression coverage production net +939 LOC; tests/support net +1,309 LOC The stated production growth carries authority through native acknowledgement and is accompanied by final-effect, cancellation, and custody regressions.

Technical review

Best possible solution:

Preserve one-shot accounting and current authorization across every native launch transport while retaining released PTY compatibility.

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

Yes, from source: fetched main releases consumption custody before deferred native launch. The supplied negative controls and native boundary runs support that mechanism; this read-only review did not execute it.

Is this the best way to solve the issue?

Yes. The patch extends the existing receipt, approval, and process owners, preserves accounting and stored formats, and supplies authority and upgrade evidence for the changed boundaries.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded cron execution ownership repair with substantial proof and no observed urgent user-facing regression.
  • merge-risk: 🚨 compatibility: The accepted design changes live exec-policy mutation and uncertain-launch recovery behavior; released SDK and published-driver upgrade evidence now cover compatibility.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): Recorded native runs exercise the changed Gateway receipt/approval owners through real exec, supervisor, broker, and file I/O, showing one allowed use and no unauthorized append after invalidation. Relevant production bytes remain unchanged, and exact-head published-driver upgrade evidence resolves the previous blocker. Stored formats and schemas are unchanged.
  • proof: sufficient: Contributor real behavior proof is sufficient. Recorded native runs exercise the changed Gateway receipt/approval owners through real exec, supervisor, broker, and file I/O, showing one allowed use and no unauthorized append after invalidation. Relevant production bytes remain unchanged, and exact-head published-driver upgrade evidence resolves the previous blocker. Stored formats and schemas are unchanged.

Evidence

What I checked:

  • Pinned source and complete body: The checkout and live PR head are 7025348. Reading the full GitHub body filled the supplied excerpt gaps; its SHA-256 exactly matches the captured source identity 61ed7d830e33e1042537029d98ac006a0258499d971c1ca1dc591f352295c59b. (7025348efa48)
  • Work remains absent from fetched main: Fetched main still performs synchronous standing-grant validation and releases mutation custody after consumption, without this branch's retained launch interval. The merged foundation refactor(cron): publish receipt authority from the Gateway owner (cron 1/3) #164805 and transport stage refactor(cron): hold message authority from the Gateway owner for core transports (cron 2a/3) #164906 do not replace this execution consumer. (src/agents/bash-tools.exec-cron-grant.ts:9, a0c1b065b5b2)
  • Authority retained through final effects: The production consumer binds the exact source, receipt, physical database, grant, and parent approval; consumption borrows the receipt interval, and native initiation spends it once. Unknown consumption terminates the attempt; a proven pre-initiation retry revalidates without incrementing usage again. (src/agents/bash-tools.exec-cron-grant.ts:89, 7025348efa48)
  • Production-path authority proof: The captured body records native execution through real storage, receipt/policy owners, exec runtime, supervisor, and file I/O: allowed execution consumes once; replay, revoked grants, replaced/finished receipts, and tightened policy prevent unauthorized appends. The inspected harness mocks initial approval evaluation and RPC outside the migrated boundary. Broker, PTY, and relay regressions exercise their final launch boundaries separately. (src/agents/bash-tools.exec-cron-grant.test.ts:378, 7025348efa48)
  • Retained proof remains applicable: Comparison with the recorded native-proof revision produced no changes in the cron grant consumer, receipt owner, policy store, or process subtree. Historical native proof is therefore retained as unchanged-input evidence rather than presented as newly executed reviewer proof. (src/cron/store/receipt-authority-owner.ts:346, 7025348efa48)
  • Published-driver upgrade blocker resolved: The matching captured body records published 2026.9.8 updating the exact candidate: updater exit 0 in 383.870 seconds, durable succeeded/finished status, verified replacement build, readiness HTTP 200, preserved logical hashes across three SQLite stores, integrity/FK checks, and idempotent Doctor maintenance. It explicitly distinguishes successful update qualification from later archive-capture and workflow-finalization failures. (7025348efa48)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • jacobtomlinson: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (20 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-04T15:58:11.023Z sha 1a3bc50 :: blocked before merge. :: none
  • reviewed 2026-10-04T16:12:05.686Z sha 1a3bc50 :: blocked before merge. :: none
  • reviewed 2026-10-04T16:28:12.367Z sha 1a3bc50 :: blocked before merge. :: none
  • reviewed 2026-10-04T16:36:10.768Z sha 1a3bc50 :: needs changes before merge. :: none
  • reviewed 2026-10-04T17:04:55.159Z sha 8fa59cb :: blocked before merge. :: none
  • reviewed 2026-10-04T17:50:28.407Z sha 8fa59cb :: needs maintainer review before merge. :: none
  • reviewed 2026-10-04T18:16:15.085Z sha 7025348 :: blocked before merge. :: none
  • reviewed 2026-10-04T18:47:27.528Z sha 7025348 :: blocked before merge. :: none

Keep ordinary queued spawn and execa cancellation on their native settlement
path. Restrict the pre-launch cancellation refusal to guarded preparations.
Update the PTY and relay expectations without weakening credential checks.

Exercise standing-grant and receipt authority through the real exec runtime,
supervisor, and native file effects. Cover single consumption, replay refusal,
revoked grants, stale receipts, and tightened policy. Retain the released PTY
call signature with a type-only Plugin SDK compatibility check.

Validation: 82 tests across eight files; 41 process tests rerun for the final
guard; four targeted type graphs; scoped lint, formatting and P2 review clean.
@steipete

steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 4, 2026
Merge main after cron1 landed, preserving captured caller scope, accepted-write settlement, expiry checks, and Gateway close behavior.

Reject logical receipt drainage when native initiation remains uncertain while retaining physical database custody and sealed admission. Add isolated native proof and preserve save/consume close coverage.

Validation: 314 unique selected tests across 21 files, core and six test type graphs, scoped lint and formatting, and clean P2 autoreview. Cron2, final SDK reporting, exact-head CI and published-driver update proof remain landing gates.
@steipete
steipete changed the base branch from dbasync/cron2 to main October 4, 2026 12:26
@steipete

steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@github-actions

github-actions Bot commented Oct 4, 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: 7025348efa4832bc973437e899113a5d2e04725d
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/infra/exec-approvals-authorization.worker.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.
  • src/infra/exec-approvals-policy.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.
  • src/infra/exec-approvals-sqlite.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.
  • src/infra/exec-approvals-store.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Oct 4, 2026
Merge main after cron2 landed. Keep message and standing-grant authority on the same receipt observation, retain cross-owner persistence through settlement, and preserve native acknowledgement failure custody.

Use the dependency-free refusal error owner and combine message queue retirement with save and consume Gateway-close proof. No grant eligibility, receipt accounting, schema, retention, or released callable change.

Validation: 239 tests across 16 files, seven type graphs, scoped lint and formatting, and clean P2 autoreview. Final-head SDK reporting, Windows CI, and the published-driver update cell remain landing gates.
@steipete

steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Incorporate main 9da00b0, including d1fc40d which aligns the embedded admission test owner with its infra routing. The merge is mechanical and preserves the reviewed cron consume-to-spawn implementation.

Validation: 344 tests across seven focused files, core and state test type graphs, diff checks, and fresh P2 review passed. Prior SDK, update and Windows evidence remains historical pending the new exact-head qualifications.
@steipete

steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Incorporate main 5f497e7, including b7645dd which repairs the inherited model-picker browser assertions after the quiet-send change. The merge is mechanical; cron, process, policy and CLI implementation files remain unchanged.

Validation: all 295 routing cases passed; diff checks and fresh P2 review passed for the exact staged tree. Preserve prior-head runtime proof and refresh final-head CI, SDK and published-driver qualification after publication.
@steipete

steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Merge main 2be4d4f, including the schema-freshness repair in 8f7e75a and the shutdown/reindex fixture repair in 83f4c29. The merge is mechanical and changes no cron3 production file; the previous three-root CI exception is now historical.

Validation: fresh P2 review and diff checks passed for the exact staged tree. Main forget-settlement proof now passes all four cases. Reuse unchanged native grant and process proof while qualifying the replacement head through CI, SDK comparison and the published-driver update cell.
@steipete
steipete merged commit 843a24c into main Oct 4, 2026
201 of 205 checks passed
@steipete
steipete deleted the dbasync/cron3 branch October 4, 2026 19:48
@steipete

steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 5, 2026
…on 3/3) (openclaw#164864)

* refactor(cron): publish receipt authority from the Gateway owner

* fix(cron): preserve SDK admission factory contracts

* fix(cron): settle receipt authority before releasing close custody

* refactor(cron): add held receipt authority uses

Bind prepared effects to exact receipt facts and the existing Gateway-owned
FIFO. Keep repeatable assertions separate from one-shot native initiation,
and release exclusion before awaiting the provider response.

Allow a use to borrow its own gate for consumption while preserving native
publication and settlement. Closing retires unused effects and joins accepted
borrowed persistence independently of scheduler cancellation.

This additive interface supports the message and standing-grant cutovers;
it does not activate either consumer or change schema, retention, or policy.

* refactor(cron): consume standing grants through Gateway owner

* fix(cron): preserve broker cancellation and prove native grant execution

Keep ordinary queued spawn and execa cancellation on their native settlement
path. Restrict the pre-launch cancellation refusal to guarded preparations.
Update the PTY and relay expectations without weakening credential checks.

Exercise standing-grant and receipt authority through the real exec runtime,
supervisor, and native file effects. Cover single consumption, replay refusal,
revoked grants, stale receipts, and tightened policy. Retain the released PTY
call signature with a type-only Plugin SDK compatibility check.

Validation: 82 tests across eight files; 41 process tests rerun for the final
guard; four targeted type graphs; scoped lint, formatting and P2 review clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling cli CLI command changes docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts security-sensitive-changed size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant