Skip to content

perf(exec): prepare exec defaults and approvals through the async readers - #164648

Merged
steipete merged 14 commits into
mainfrom
dbasync/execprep
Oct 4, 2026
Merged

steipete merged 14 commits into
mainfrom
dbasync/execprep

Conversation

@steipete

@steipete steipete commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Reply skill preparation synchronously reads exec approval policy on every turn, including shared-state admission and ownership checks on the Gateway thread.

Why This Change Was Made

ensureSkillSnapshot now uses the existing resolvePreparedExecDefaultsAsync and loadExecApprovalsReadOnlyAsync readers, then carries the resolved defaults into the existing node-eligibility calculation. Policy precedence, sandbox/full-session short circuits, node bindings, and the system.run deny check stay with their current owners. Read failures retain the existing deny/refusal behavior; there is no native retry.

Scope is limited to reply skill preparation: createOpenClawDelegateToolsForRun is excluded and remains owned by #138596's delegated approval-authority repair. Its measured warmed direct reads remain 10 → 10. Other synchronous callers remain outside this lane; this does not retire the shared primitive or reclassify it as worker-only.

Prerequisites #164490 and #164514 are merged. This branch now targets main and integrates 06d4475d6079aaa875a9b477ac0935d1459b1023 through merge commit 41836cc9f6baf8f3231da18d774c24ca9a3fe468, without rebasing. The production delta remains unchanged. The diff contains the four exec-preparation files plus a one-line shrink of the mock-export baseline required by the integrated main guard; the history has one merge base. The original before/after measurements below used integrated base 4b27b04c2c8348528dbbef7bace70700be16f3be.

User Impact

No user-visible policy change, new worker service, cache, schema, retention/durability change, migration, or new environment name. Prepared skill availability is not execution authority; existing execution-time approval checks and session publication guards remain in place.

Lane production LOC: +23 / −12 / net +11 (35 changed lines), excluding prerequisite commits. Production files: src/agents/exec-defaults.ts and src/auto-reply/reply/session-updates.ts; tests: the existing session-updates suite plus its new exec-preparation boundary suite.

Evidence

The unchanged local sqlmeasure harness ran before and after with Node 24.21.0 / SQLite 3.53.4, source maps, isolated synthetic state, and the same local streaming model fixture. Both runs completed 13/13 top-level chat receipts, child completion, cron, compaction, and graceful shutdown. All observed on-disk database locations stayed inside their synthetic fixtures.

Selected caller: 3.2 → 0 main-thread statements per warmed turn, 32 → 0 over ten turns, and 41 → 0 across the whole workload. The 32 warmed statements were 10 direct approval reads, 12 admission checks, and 10 ownership checks. Static T1 remains 921 → 921, since the shared primitive retains other callers.

Overall warmed mean: 343.9 → 342.4; median 338 → 335. Whole-workload main-thread totals: 9,504 → 9,436. Phase windows include concurrent maintenance, so the overall delta is not all credited to this patch. This is one run per revision and not a latency benchmark. Failed statements are separate: baseline had two main-thread and two off-main errors; after had none.

Successful main-thread SQL by phase and turn
Phase Overall before Overall after Selected caller before Selected caller after
Boot 2922 2916 0 0
Connection / settling 50 44 0 0
First chat 884 883 3 0
Ten warmed turns 3439 3424 32 0
Second session / parent / child 1151 1142 6 0
List / history / Inbox 0 0 0 0
Cron 455 424 0 0
Compaction 342 342 0 0
Shutdown 261 261 0 0
Warmed turn Overall before Overall after Selected caller before Selected caller after
1 336 335 3 0
2 338 333 3 0
3 340 337 5 0
4 338 335 3 0
5 336 344 3 0
6 336 335 3 0
7 345 400 3 0
8 394 333 3 0
9 338 335 3 0
10 338 337 3 0

Counts exclude prepares and failed statements; trigger internals are outside the observer contract.

Phase Worker threads before Worker threads after Helper processes before Helper processes after
Boot 989 998 109 109
Connection / settling 335 323 0 0
First chat 3743 3793 63 63
Ten warmed turns 13005 13102 216 252
Second session / parent / child 4831 4790 60 60
List / history / Inbox 69 65 0 0
Cron 2297 2306 10 10
Compaction 641 635 20 20
Shutdown 1985 1971 0 0

Final-head validation (a99909f3484eccde4d5ec11146ed21e5d2be122e):

  • pnpm test src/auto-reply/reply/session-updates.exec-preparation.test.ts src/auto-reply/reply/session-updates.test.ts --maxWorkers=1: 9 passed, 83.11 s wall. This confirms zero caller-thread approval SQL, captured-store routing, worker-read failure denial, and session deletion/rebound/rename/unpin handling on the final head.
  • node --import ./scripts/tsx.mjs scripts/check-test-mock-exports.mts --base 06d4475d6079aaa875a9b477ac0935d1459b1023: passed, 10,848 grandfathered factories. The canonical pruning command removed exactly the obsolete exec-defaults mock entry; no baseline allowance was added.
  • Changed-file cost: local test execution was 3.073 s for the exec-preparation boundary and 0.029 s for session updates (83.11 s shared command wall). In CI job 111398611560, the individual file wrappers passed in 4.98 s and 3.86 s respectively; their test execution was 0.463 s and 0.033 s.
  • Fresh independent Codex autoreviews through P2 for the integrated change and the narrow CI repair: scoped-clean, no accepted/actionable findings. Formatting and git diff --check pass.
  • The first integrated CI run failed the newly introduced mock-export ratchet on five intentional closed factories. Commit a99909f3484eccde4d5ec11146ed21e5d2be122e documents their isolation and prunes the removed factory. Production code, assertions, and factory behavior are unchanged. Final-head CI passed with no rerun or admin exception.

Integrated-head proof (41836cc9f6baf8f3231da18d774c24ca9a3fe468):

  • All four focused reply/defaults/approval-reader suites plus runtime-process build graph, eager import closure, get-reply imports, and state-worker imports: 86 tests across 8 files passed, 1,581.28 s wall. This includes all 30 import/wrapper checks and 16 approval-reader cases. The later repair only changes test-isolation comments and one obsolete baseline entry.
  • Main integration was conflict-free and preserved the original lane patch. No new environment names, production modules, or exports were added by the integration repair.

Original-head validation (c481aed2180845ffc8d191252d725a6cb716aa99):

  • Focused command: pnpm test src/auto-reply/reply/session-updates.exec-preparation.test.ts src/auto-reply/reply/session-updates.test.ts src/agents/exec-defaults.test.ts src/infra/exec-approvals-store.read-worker.test.ts --maxWorkers=1: 56 tests passed, 349.32 s wall including cold worker compilation. The two changed reply files shared a 42.77 s shard; their test execution was approximately 0.079 s (existing suite) and 3.325 s (new boundary suite).
  • Boundary tests exercise the real caller and approval store, proving zero caller-thread SQL for the moved operation, captured-store routing across an await, current policy on the next preparation, and deny behavior after a worker read failure. Session classification and downstream skill loading are isolated as other owners. Both tests failed against the original caller (native approval SQL and an async-read bypass).
  • Required import checks: pnpm test test/scripts/runtime-process-build-graph.test.ts test/scripts/eager-import-closure.test.ts src/auto-reply/reply/get-reply.imports.test.ts src/state/openclaw-state.worker.imports.test.ts --maxWorkers=1: 30 tests passed, 419.93 s wall.
  • pnpm check:madge-import-cycles: 0 cycles, 42.28 s.
  • pnpm check:database-worker-ratchet --base 58b544712d0349f85a06fda6a249f872012582a1: passed, 17.82 s.
  • Independent Codex autoreview through P2, pinned to the same merge base: scoped-clean, no accepted/actionable findings.

Tooling recovery: the interrupted initial setup retained its own build lock; it was released using the documented recovery after verifying its processes had exited. An initial regression invocation failed before running tests because the concurrent Gateway build changed the compiled namespace. Builds and tests were then serialized; the stable original-code run failed for the intended regression, and the candidate passed. These tooling failures are not counted as product regressions.

Released SDK comparison generated against v2026.9.8 (digest 890cdcee): 8 entrypoints removed, 1 added, and 2,307 affected exports across the full branch history. The lane adds an optional preparedDefaults argument to an indirectly reachable declaration; existing one-argument synchronous calls and their return type remain supported. This lane removes no entrypoint or export. The report is not a zero-diff compatibility assertion for all changes since the release. The SDK command exited successfully after cleanup (2,245.35 s wall). node scripts/check-changed.mjs --base 58b544712d0349f85a06fda6a249f872012582a1 -- <the four lane files> passed (2,591.15 s wall), including production types, all 27 test type graphs, formatting, lint, dead exports, and the selected guards. No required local gate remains unrun. CI seconds are not yet available at publication.

Refresh freshness at read admission and after BEGIN while reusing
handle-owned facts for runtime schema checks. Validate canonical
triggers before exposing agent readers and classify shared-state
failures only after failed admission.

Focused runtime checks execute zero SQL statements, versus 30 with
the baseline owner. Preserve foreign-commit and snapshot semantics.
Full workload measurement and remote integration checks remain merge
preconditions after remote runner and fleet-capacity admission failed.
Route audited writer claims, live-model-switch bookkeeping, and pending-final
preparation, settlement, and cleanup through the existing agent executor.
Preserve native opaque SDK callbacks and the excluded lifecycle and cron paths.

The paired isolated Gateway workload reduces native patch transactions from
8 to 2 per warmed turn and target-site SQL from 48 to 12. Overall main-thread
SQL averages 648.5 to 493.4 statements per warmed turn. Lifecycle persistence
remains follow-up work after #142236; cron preparation remains with #161105.

Local caller, settlement, error identity, import-boundary, cycle, and database
ratchet proof passes. Full build, changed checks, and released SDK diff remain
explicit merge preconditions under the maintainer's validation instruction.
Integrate the pinned measurement baseline and retain main-key facts through the existing connection and reader-admission owners. Preserve raw writes, foreign commits, transaction snapshots, authorizers, and continuation authority.
Create and read producer-recovery sessions under the same explicit shared-state root as their delivery queue. Worker-backed pending-final settlement correctly rejects the previous fixture ownership mismatch. Preserve durable payloads and all existing assertions.
Use the existing worker generation claim for maintenance metadata instead of
retaining a host read handle. Keep both live ownership checks around the
required transaction-entry freshness probe.

Consolidate shared-state cache initialization, refresh, and terminal failures
in its admission sibling and update the compiled-wrapper inventory. This
keeps the cache within the existing module-size limit without changing stored
schema or quarantine semantics.

Focused maintenance, ownership, schema, worker, wrapper, and quarantine proof
passed. Independent Codex review is clean through P2. Full landing validation
remains required before merge.
Keep the accounting persistence suite within its line cap by moving fixture construction into a dedicated test-support module. Preserve suite-owned state, immediate operation registration, and every test case and assertion.
Refresh canonical readiness when it consumes schema facts. Retention only
holds native lifetime, so cold restore and other worker handoffs no longer
execute host SQLite before dispatch.

Protect foreign schema invalidation at the warm readiness fast path. Tighten
retained-reader budgets to the optimized counts, and require early missing-table
diagnosis before callbacks while preserving handle-cleanup assertions.

Validation: 93 focused tests, production types, state/config test types, and
independent review clean through P2.
Integrate the released-SDK diff tooling fix and the inherited child-coordination fixture correction. The merge preserves every authored source, test, and documentation blob; the wrapper inventory combines both branches.
…dad14cf0e74a246c18c001341577ae6b5d8a' into dbasync/execprep
@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 scripts Repository scripts agents Agent runtime and tooling size: XL labels Oct 4, 2026
@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:

Base automatically changed from dbasync/schemafacts to main October 4, 2026 07:37
@openclaw-barnacle openclaw-barnacle Bot added size: S and removed docs Improvements or additions to documentation gateway Gateway runtime scripts Repository scripts size: XL labels Oct 4, 2026
@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 P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. 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, 4:54 AM ET / 08:54 UTC (Revision 3).

ClawSweeper review

What this changes

The PR moves approval-policy reads during reply skill preparation to existing asynchronous readers and reuses the prepared execution settings when selecting node skills.

Merge readiness

✅ Ready for maintainer review

The optimization remains useful on current main. No blocking correctness or security finding remains, and the prior mock-export ratchet finding is resolved.

Priority: P2
Reviewed head: a99909f3484eccde4d5ec11146ed21e5d2be122e

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable caller cutover has strong production measurement evidence and no remaining actionable finding.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The reported paired real Gateway/storage/worker workload exercises reply skill preparation and observes its targeted main-thread SQL falling to zero with successful workload receipts. The final repair changes only test annotations and the mock baseline, preserving that production proof. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The reported paired real Gateway/storage/worker workload exercises reply skill preparation and observes its targeted main-thread SQL falling to zero with successful workload receipts. The final repair changes only test annotations and the mock baseline, preserving that production proof. No stored-data contract changes.
Evidence reviewed 9 items Pinned introduced change: The merge-base-to-head diff changes the reply preparation caller, adds an optional prepared-defaults input to its existing eligibility owner, updates boundary tests, and removes one obsolete mock-baseline entry.
Existing policy owner retained: Preparation retains configuration precedence, sandbox and Full Access short circuits, approval floors, and node binding. Eligibility retains the system.run deny check; existing one-argument synchronous calls still resolve defaults as before.
Captured policy store and failure behavior: The existing async reader resolves the physical database path before awaiting worker execution. Migration-required errors propagate; other read failures return the existing deny fallback without retrying native SQLite.
Findings None None.
Security None None.

How this fits together

Reply skill preparation combines configuration, session settings, and stored execution policy to decide which skills appear in the agent’s context. Command execution separately checks current approval policy before dispatch.

flowchart TD
  A[Configuration and session settings] --> C[Prepare execution defaults]
  B[Stored approval policy] --> D[Existing async policy reader]
  D --> C
  C --> E[Check node skill eligibility]
  E --> F[Reusable skill snapshot]
  F --> G[Agent reply context]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +11, Tests +97, Other -1. Total +107 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 2 23 12 +11
Tests 2 106 9 +97
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 5 129 22 +107

Review metrics

Metric Value Why it matters
Targeted main-thread SQL 32 → 0 statements across ten warmed turns The reported paired Gateway workload measures the selected caller’s removal from the main thread without claiming a latency improvement.

Technical review

Best possible solution:

Use the existing worker-backed approval reader for reply preparation while preserving the synchronous compatibility callers and execution-time policy owner.

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

Not applicable as a functional bug reproduction; source confirms the synchronous caller, and the reported paired Gateway workload measures its SQL before and after.

Is this the best way to solve the issue?

Yes. Reusing the existing async reader and policy resolver is a narrow cutover that preserves policy ownership and synchronous callers.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded runtime performance improvement with preserved user-facing policy behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The reported paired real Gateway/storage/worker workload exercises reply skill preparation and observes its targeted main-thread SQL falling to zero with successful workload receipts. The final repair changes only test annotations and the mock baseline, preserving that production proof. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The reported paired real Gateway/storage/worker workload exercises reply skill preparation and observes its targeted main-thread SQL falling to zero with successful workload receipts. The final repair changes only test annotations and the mock baseline, preserving that production proof. No stored-data contract changes.

Evidence

What I checked:

  • Pinned introduced change: The merge-base-to-head diff changes the reply preparation caller, adds an optional prepared-defaults input to its existing eligibility owner, updates boundary tests, and removes one obsolete mock-baseline entry. (src/auto-reply/reply/session-updates.ts:157, a99909f3484e)
  • Existing policy owner retained: Preparation retains configuration precedence, sandbox and Full Access short circuits, approval floors, and node binding. Eligibility retains the system.run deny check; existing one-argument synchronous calls still resolve defaults as before. (src/agents/exec-defaults.ts:87, a99909f3484e)
  • Captured policy store and failure behavior: The existing async reader resolves the physical database path before awaiting worker execution. Migration-required errors propagate; other read failures return the existing deny fallback without retrying native SQLite. (src/infra/exec-approvals-store.ts:133, a99909f3484e)
  • Session publication and execution boundaries: Snapshot persistence and return paths retain session-id and lifecycle-revision checks across awaits. Separately, node dispatch rereads current approval policy and rejects a later deny. The introduced prepared defaults affect availability rather than execution authority. (src/agents/bash-tools.exec-host-node-policy.ts:17, a99909f3484e)
  • Current main still needs this caller cutover: Fetched main still calls resolveNodeExecEligibility directly from reply skill preparation, retaining synchronous default approval loading. The merged prerequisites do not implement this distinct caller change. (src/auto-reply/reply/session-updates.ts:147, bced15851945)
  • Latest release comparison: The v2026.9.8 source also uses the synchronous eligibility call at this preparation boundary; the requested optimization is not already present in that release. (src/auto-reply/reply/session-updates.ts, fc23bc864e45)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • RomneyDa: 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 (2 earlier review cycles)
  • reviewed 2026-10-04T08:06:04.248Z sha 41836cc :: needs changes before merge. :: [P2] Satisfy the mock-export ratchet for the changed fixtures
  • reviewed 2026-10-04T08:43:01.534Z sha a99909f :: needs maintainer review before merge. :: none

@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 rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 4, 2026
@steipete
steipete merged commit bb9f63c into main Oct 4, 2026
145 checks passed
@steipete
steipete deleted the dbasync/execprep branch October 4, 2026 09:36
@steipete

steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

* perf(state): carry admitted schema facts with database handles

Refresh freshness at read admission and after BEGIN while reusing
handle-owned facts for runtime schema checks. Validate canonical
triggers before exposing agent readers and classify shared-state
failures only after failed admission.

Focused runtime checks execute zero SQL statements, versus 30 with
the baseline owner. Preserve foreign-commit and snapshot semantics.
Full workload measurement and remote integration checks remain merge
preconditions after remote runner and fleet-capacity admission failed.

* perf(agents): run per-turn session-entry patches through the worker

Route audited writer claims, live-model-switch bookkeeping, and pending-final
preparation, settlement, and cleanup through the existing agent executor.
Preserve native opaque SDK callbacks and the excluded lifecycle and cron paths.

The paired isolated Gateway workload reduces native patch transactions from
8 to 2 per warmed turn and target-site SQL from 48 to 12. Overall main-thread
SQL averages 648.5 to 493.4 statements per warmed turn. Lifecycle persistence
remains follow-up work after openclaw#142236; cron preparation remains with openclaw#161105.

Local caller, settlement, error identity, import-boundary, cycle, and database
ratchet proof passes. Full build, changed checks, and released SDK diff remain
explicit merge preconditions under the maintainer's validation instruction.

* test(outbound): align recovery fixtures with queue state

Create and read producer-recovery sessions under the same explicit shared-state root as their delivery queue. Worker-backed pending-final settlement correctly rejects the previous fixture ownership mismatch. Preserve durable payloads and all existing assertions.

* fix(state): preserve worker handoffs during schema admission

Use the existing worker generation claim for maintenance metadata instead of
retaining a host read handle. Keep both live ownership checks around the
required transaction-entry freshness probe.

Consolidate shared-state cache initialization, refresh, and terminal failures
in its admission sibling and update the compiled-wrapper inventory. This
keeps the cache within the existing module-size limit without changing stored
schema or quarantine semantics.

Focused maintenance, ownership, schema, worker, wrapper, and quarantine proof
passed. Independent Codex review is clean through P2. Full landing validation
remains required before merge.

* test(agents): extract accounting persistence fixture

Keep the accounting persistence suite within its line cap by moving fixture construction into a dedicated test-support module. Preserve suite-owned state, immediate operation registration, and every test case and assertion.

* fix(state): keep retained handles free of schema probes

Refresh canonical readiness when it consumes schema facts. Retention only
holds native lifetime, so cold restore and other worker handoffs no longer
execute host SQLite before dispatch.

Protect foreign schema invalidation at the warm readiness fast path. Tighten
retained-reader budgets to the optimized counts, and require early missing-table
diagnosis before callbacks while preserving handle-cleanup assertions.

Validation: 93 focused tests, production types, state/config test types, and
independent review clean through P2.

* perf(exec): prepare reply skill approval defaults asynchronously

* test: document exec preparation mock isolation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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