Repository navigation
perf(agents): reduce main-thread SQLite during retirement - #167547
Conversation
Use the existing shared writer and canonical agent executor for retirement, with live cleanup authority and the deletion journal held through agent COMMIT. Preserve native final-effect guards, dedicated session generation selection, rollback custody, and acknowledged commit publication.
Preserve the serving Gateway Claw journal transport alongside the coordinated retirement worker owner, including synchronous safety checks within the journal transaction and captured session-store targets.
Preserve cleanup authority and the shared deletion fence through agent commit, archive publication, workspace retirement, and rollback. Move remaining preparation reads to the existing worker while retaining final effect guards. Include the upstream expected-schema cache from 77b322b so cold workers reuse canonical comparison definitions. Preserve released SDK contracts and historical-generation selection.
Load the existing purge handlers without preparing turn-only predicates or unrelated compound operations. Preserve command types, cleanup authority, and commit settlement.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
|
Codex review: blocked before merge. What this changesMoves agent and Claw removal database work into workers while preserving ownership through deletion, archive publication, and rollback. Review scores
ProductKind: Performance · Worth it: Yes Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this maintainer-owned performance change remains useful and is not implemented on main. No actionable patch defect was established; exact-head CI remains red. Priority: P2 Before merge
FindingsNone. Provenance
Agent review detailsHow this fits togetherThe Gateway coordinates agent removal across configuration, session databases, workspaces, and installed packages. Its lifecycle owner authorizes cleanup and publishes completed changes after database commits. flowchart TD
A[Agent or Claw removal request] --> B[Lifecycle cleanup owner]
B --> C[Current lease and journal checks]
C --> D[Database workers]
D --> E[Session purge and commit]
E --> F[Archive publication]
B --> G[Final filesystem and config guards]
F --> H[Completion or owned rollback]
G --> H
Technical reviewBest possible solution: Retain the existing lifecycle owner and worker cutover, preserving current authority checks at final effects. Do we have a high-confidence way to reproduce the issue? Not applicable to a functional bug: source and paired execution results establish remaining main-thread database work during retirement. Is this the best way to solve the issue? Yes: the inspected paths reuse the existing shared writer, agent executor, and cleanup owner rather than creating a competing removal system. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 19c968701cb6. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (7 earlier review cycles)
Reviewed October 9, 2026, 3:19 AM ET / 07:19 UTC (Revision 8). |
Merge current main into the retirement lane, retaining its exec-policy worker and accepted-work settlement. Restore durable package custody at final uninstall and rollback effects, with real takeover regression coverage. Keep wrapper runtime dependencies complete and preserve internal API callers after integration.
Await Doctor-owned history readers before returning from reserved-key repair. Route worker-backed lifecycle fixtures through the host project and retain bounded read and live lease assertions.
Preserve creation identity and accepted-work settlement alongside retirement cleanup ordering. Keep main test consolidation and transfer the bounded worker-read and awaited-cleanup assertions. Post-integration types, lint, 100 focused tests, and P2 review pass; the unchanged model-catalog import cycle remains inherited.
Use cached handle presence only for read-lane selection; preserve worker identity, quarantine, authority, FIFO admission, and settlement. Observe the existing cold discovery lane in two fixtures. Express lifecycle NULL projections through Kysely values.
Resolve the read-admission overlap with main a73ef55 unchanged, preserving its retained native-reader custody and independent recovery reads. Reuse the reviewed retirement and Kysely delta; keep main sharing-fixture repairs. Post-integration type and focused cleanup proof continue on this exact tree.
Borrow the exact live deletion executor during worker-owned cleanup instead of retaining an unrelated native read candidate. Preserve ordinary native custody, cold FIFO admission, and durable worker journal/lease grants. Warm and cold cleanup retain zero host SQL; stale cleanup rejects, and runtime import/build graph checks pass.
The only conflict was the already-equivalent discovery-lane fixture plus a main comment. Preserve main verbatim there and reuse unchanged retirement runtime proof; post-integration types and cycle checks run on the merged tree.
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
The read-only recovery fix in a73ef55 retained native read candidates on every discovery read, adding a second native custody pair around the projection's own read. That reordered custody release and failed the accepted-facts projection boundary (18 of 22 cases in session-row-projection.accepted-facts.test.ts). Probe the admitted open writer instead, without custody: a refused writer (such as pending startup inspection) is treated as not resident, exactly as the retain's refusal handling did, so execution capture and cold admission re-check it and recovery reads stay unblocked. Keep the deletion-cleanup worker branch from #167547.
…67547) * refactor: move agent retirement into database workers Use the existing shared writer and canonical agent executor for retirement, with live cleanup authority and the deletion journal held through agent COMMIT. Preserve native final-effect guards, dedicated session generation selection, rollback custody, and acknowledged commit publication. * refactor: retire unused deletion readers and complete fixtures * test(state): verify retirement archive and maintenance outcomes * perf(agents): move retirement cleanup to retained workers Preserve cleanup authority and the shared deletion fence through agent commit, archive publication, workspace retirement, and rollback. Move remaining preparation reads to the existing worker while retaining final effect guards. Include the upstream expected-schema cache from 6623b6f so cold workers reuse canonical comparison definitions. Preserve released SDK contracts and historical-generation selection. * refactor(agents): isolate retirement worker command loading Load the existing purge handlers without preparing turn-only predicates or unrelated compound operations. Preserve command types, cleanup authority, and commit settlement. * fix(agents): settle retirement readers and align host fixtures Await Doctor-owned history readers before returning from reserved-key repair. Route worker-backed lifecycle fixtures through the host project and retain bounded read and live lease assertions. * fix(sessions): keep history routing outside native admission Use cached handle presence only for read-lane selection; preserve worker identity, quarantine, authority, FIFO admission, and settlement. Observe the existing cold discovery lane in two fixtures. Express lifecycle NULL projections through Kysely values. * fix(sessions): retain worker cleanup ownership during history reads Borrow the exact live deletion executor during worker-owned cleanup instead of retaining an unrelated native read candidate. Preserve ordinary native custody, cold FIFO admission, and durable worker journal/lease grants. Warm and cold cleanup retain zero host SQL; stale cleanup rejects, and runtime import/build graph checks pass.
The read-only recovery fix in bd46d77 retained native read candidates on every discovery read, adding a second native custody pair around the projection's own read. That reordered custody release and failed the accepted-facts projection boundary (18 of 22 cases in session-row-projection.accepted-facts.test.ts). Probe the admitted open writer instead, without custody: a refused writer (such as pending startup inspection) is treated as not resident, exactly as the retain's refusal handling did, so execution capture and cold admission re-check it and recovery reads stay unblocked. Keep the deletion-cleanup worker branch from openclaw#167547.
Related: #166889
What Problem This Solves
Agent and Claw retirement still perform SQLite work on the Gateway main thread. Moving it to workers must preserve the original cleanup authority through session purge, archive publication, workspace removal, and rollback.
User Impact
Retirement keeps the existing cleanup owner through database commit and post-commit archive publication. Agent creation, deletion, recovery, and Claw removal retain their existing data and permission contracts. There are no schema, durability, retention, permission, or configuration changes. Historical generations remain under the retention owner; deletion selects removed-entry references and preserves surviving references.
This is administrative work. Moving SQL to a worker is not a total statement saving, and this PR does not claim the warmed-turn budget has been reached. The shared workload passes the documented noise-floor qualification. The additional worker requests and longer deletion wall time are an accepted cost for this rare, user-triggered administrative operation. The retained admission work is assigned to the
checkoncefollow-up; it does not block this PR.Why This Change Was Made
The existing deletion owner coordinates journal/provenance, session purge, workspace state, execution policy, and Claw bookkeeping through the shared-state writer and canonical agent executor. It retains the real cleanup lease and shared journal transaction through agent COMMIT, preserving agent-before-shared lock order, FIFO, accepted-work settlement, and acknowledged commit receipts.
Physical stores, filesystem targets, and archive plans are captured before yielding. Workers reread authoritative rows inside synchronous transactions; foreign commits, changed references, replaced stores, and lost authority refuse stale work. Post-commit archive and maintenance publication use that same captured owner. Immediate host effects retain live native final guards; config removal uses the existing awaited
beforeCommithook followed by its synchronous host guard.The running-Gateway Claw transport from the linked change remains intact: the serving Cron owner mutates its history, while the original deletion lease retains remote begin/rollback custody. Superseded internal synchronous paths are removed with their callers.
Evidence
Six paired administrative runs reduce deletion SQL from 1,924 to 1,618 and MAIN SQL from 1,521 to 336. Logical worker operations increase 80.7 to 144.7, and median deletion wall time increases 1.745 to 3.158 seconds. The request/time increase is accepted for rare user-triggered deletion; shared turn counts are separately qualified below. Static T1 falls 787 to 748 (symmetrically classified: 769 to 748).
Source pins: baseline
54644eab32b26de36a6668fad06493bb5d1513b9; final candidate tree1519090cd389409e178842dcdbdb1050172c934f. This includes the existing expected-schema cache fix from #167001 (77b322b07daad) plus the retirement cutover. Runtime savings from that imported dependency are attributed separately. Reviewed head:2c49a11c6b9377c944fe0acc8f49e1a3d0f4911d.Static retirement and size
The 18-site raw/symmetric difference represents actual caller cutovers: workspace 8, legacy/session comparison 6, journal completion/handoff 2, recovery holds 1, and provenance deletion 1. Static retirement is separate from runtime savings. The imported schema cache commit changes none of these counts. Final inventory and all 43 original-site qualifications are retained in
integration-54644/c218-static-refresh/.Change size and retained native contracts
The imported upstream dependency contributes 502 additions and 19 deletions across 16 files, including 78 net production lines. The final two-file purge-loader separation adds seven net lines and keeps the same operation handlers and guard paths. The remaining growth implements typed worker contracts, retained admission and settlement, physical purge/archive plans, commit receipts, and rollback custody across existing owners. Superseded internal native paths and dead readers are removed. Tests protect freshness, live authority, surviving references/generations, publication, and accepted settlement.
Released synchronous SDK callbacks, native initialization/Doctor paths, and immediate final-effect guards retain their named contracts and removal conditions in
worker-access.md. Preparation reads for recovery holds, team creation, and Claw monitor fencing now use the existing reader. OAuth polling and Cron enqueue/wake/acceptance guards remain synchronous immediately before their effects.The upstream cache fix shares canonical comparison definitions through the existing worker launcher. Actual shared-state schema inspection remains in the existing generic admission owner; this PR adds no retirement-specific validation scan or per-call schema/version check. Its measured admission cost stays in the totals.
Shared-workload statements and requests
Three alternating pairs on the same AWS host; both revisions used Node 24.21.0, pnpm 12.5.1, canonical package builds, and identical synthetic fixtures. Cells are medians [min–max] across runs. Warmed cells normalize each run over ten turns. All threads, child processes, startup, and cleanup stay counted. Requests are canonical logical submitted operations; separately observed admission requests and transport limits are reported for direct operations.
Qualified shared pass: warmed SQL increases by 1.1/turn (+0.0819%), below the 0.5% noise floor, with duration ratio 0.9968. Exact ten-turn SQL deltas are [+14, −1, +14]; logical-request deltas are [+2, +1, +4]. Every positive query shape exists in baseline; all 25 producing/helper blobs are unchanged. The increased row-facts requests come from the existing projection refresh/drain path. No retirement command appears. This is not a strict-decrease or warmed-saving claim.
Connect (+3 median) is unchanged deferred cron/catalog work moving from first turn; the cron mutation contributes exactly 13 statements across connect+first in every run. Control (+1) and compaction (+2) are existing content-marker/checkpoint work. All shared duration ratios are valid. The full imported expected-schema compiler subtree saves exactly 1,605 statements in each complete workload: boot −335, first turn −601, cron −468, shutdown −201. Whole-workload deltas [−1,610, −1,614, −1,578] equal that −1,605 plus residual timing/read-work deltas [−5, −9, +27]. Credit these compiler savings to #167001; no additional causal retirement saving is claimed in chat.
Evidence:
final-1519090cd389/shared-attribution-audit.md,shared-savings-additive.md, exact stack partitions and source-identity receipts.Direct owner and compiled entrypoint measurements
Six alternating owner pairs; each administrative run performs three complete create → session → delete-with-files cycles. All 18 candidate deletions passed strict archive/purge validation. Cells report median [min–max] of per-run operation means. Setup and shutdown stay counted; combined rows are descriptive and do not hide individual operation costs. Source-mode cold timings include compiler/loading costs and are distinct from the compiled CLI below.
All direct owner phases, statements, requests and duration
Accepted rare-administration cost: 1.745 s [1.739–1.748] → 3.158 s [2.909–3.500], ratio 1.809647 after six alternating pairs. Logical worker operations rise from 80.667 to 144.667. This wall-time increase is explicitly accepted for user-triggered agent deletion; the 1.5× duration-skew rule protects statement-comparison validity and is not an admin-operation latency gate. The values remain reported in full, with no whole-operation speedup claim. The purge receive-to-first-logged-admission interval changed from 670.451 ms to 512.661 ms; this span includes loading, scheduling and observer costs, and is not a measured import-only or whole-operation saving.
The native compiled
agents team createpending-last-member refusal passes three alternating pairs: all SQL 206 [206–206] → 78 [78–78], runtime MAIN 148 [148–148] → 56 [56–56], logical operations 4 [4–4] → 9 [9–9], elapsed 6.084 s [6.082–6.139] → 5.019 s [5.013–5.064], ratio 0.825. The original journal remains held, and config bytes, workspaces and member directories remain unchanged. This proves refusal before partial publication, not successful team creation.Each count in the fixture table is constant across all three runs on its side. Source compiler exchanges are separately 4,474 → 4,495 per whole fixture; none executes SQLite.
Statement and request attribution
The compiled CLI removes 116 snapshot staging/retirement-helper statements and 12 reader admission/freshness statements (20 → 8). All four journal SELECTs remain and move from MAIN to the worker; the other 66 CLI statements are unchanged. The five added logical operations are four
agentRecovery.creationJournalreads and one resource-close request. This 128-statement saving is retirement work, not imported schema-compilation savings.The deletion table below is additive arithmetic means across all 18 operations, separately from the median gate above. It conserves the complete SQL delta; thread movement itself earns no saving.
Savings remove per-call journal shape probes and redundant freshness/machine-marker work; live authority and foreign-commit observations remain. Extra transaction envelopes and cold admission offset part of those savings. All 18 candidate deletes still have 67 real shared-file admission statements: 5 catalogs, 12 additional shape pragmas, 19 metadata/table-existence, 10 versions, 8 marker/ownership, 11 connection/other pragmas, and 2 transaction statements. No scratch-schema compilation is included in those 67. Connection setup and live authority are not all removable; removing this repeated admission sequence belongs to the approved
checkoncefollow-up.The admission increase is +148 per deletion. Candidate admission stages are open 4, prepare 40, transaction 61.333 and commit 57.333. The 25
assertCurrentand 9fencePathsoperations are subsets of logical requests, not additional counts to sum again. Native-commit/settlement and attachment notifications, unrecognized control frames and shared-memory grants/refusals are outside the observer; no exact count of every transport message is claimed.Lifecycle capture/preparation/final comparisons each reduce 4 → 2 SQL by combining provenance/journal reads and removing duplicate freshness probes. Preparatory reads each add one logical worker operation; the final check remains native and adds none. Warm team preflight keeps 16 SQL, moves MAIN 12 → 4, and increases logical operations 2 → 6. These are explicitly attributed administrative moves, not request savings.
Imported #167001 is separate: full expected-compiler-subtree savings are 2,339 per administrative fixture, 468 per lifecycle fixture, 201 per source team fixture, and 1,605 per shared chat fixture. It removes the 468 scratch statements induced by the earlier retirement-only candidate; baseline deletion already had zero such statements, so those 468 are not claimed as baseline-delete savings.
The baseline recorded administrative
BEGIN IMMEDIATEexecution-error counts [4, 5, 4, 6, 4, 4]; candidate [0, 0, 0, 0, 0, 0]. Both sides completed their operations. These diagnostics remain separate from the harness successful-statement totals.Complete raw accounting, phases, controls, compiler qualification and timings are in
final-1519090cd389/six-pair-owner-control-report.mdand its JSON companions.Correctness and checks
archive-owner-regression-proof.md,archive-owner-positive.log,archive-owner-maintenance-positive-2.logarchive-owner-session-positive.logintegration-54644/focused-integration-final.logarchive-owner-negative-control.log,archive-owner-regression-proof.mdfinal-1519090cd389/followup-result/knip.logfinal-1519090cd389/followup-result/madge.logintegration-54644/autoreview-c218-p2-status.jsonintegration-54644/check-changed-c218.loglocal-prep-positive-c218-20261008T214418Z/result.jsonThe initial bulk fixture omitted explicit roster ownership, causing the documented unavailable-config fallback to select warn mode. After correcting ownership, a second fixture expectation incorrectly demanded deletion of an ordinary aged conversation. The final fixture asserts its in-place soft archive and uses a stale synthetic hook to prove physical maintenance deletion and archive publication. Neither failure justified changing production retention. The negative control restored the original positive source bytes before subsequent proof; the exact failures, restoration hash, and timings are in
archive-owner-regression-proof.md.The first loaded-Mac full creation run finished 21/25. One new assertion failed only because raw fixture config had not yet received the existing migration metadata; the fixture now publishes canonical config before capturing its bytes, and strict byte equality passes. Two existing 120-second timeouts and a following admission invalidation remain recorded. The team run was interrupted after its first passing case; the monitor file did not start. The original-order clean-host C218 run subsequently passed: 194 tests across all six complete files, with two existing query-diagnostics capability skips, in 198.61 s. A passing replay does not establish a fix for the earlier timeouts. No production change or longer timeout was used to conceal these results.
These are measured wrapper/test times, not CI seconds. Changed-test CI seconds were not yet observed; they are not inferred from local elapsed time.
Final SDK, package, and gate disposition
Final SDK compatibility passes for tree
1519090cd389: all 151 entrypoints, 3,641 direct public declarations, and 8,496 named declaration records match baseline. The canonical report has 131 reachable-only changes across 24 entrypoints (20 replaced and 271 added private namespace records), reviewed digest964686a1; this is not a zero-diff claim. The final loader change affects exactly one private namespace, and its combined command handler types remain identical. Canonical rendering passed in 272.31 s; comparison took 0.746 s. The source tree and all saved render hashes were verified. Evidence:final-loader-1519090cd389/sdk-api-result-final.jsonandsdk-compatibility-review.md.Final source validation passed: fresh Codex P2 review of the loader delta (following the clean full retirement review), changed-file checks including all 27 test typegraphs and three export scans, Madge with zero cycles (18.88 s), Knip files/dependencies (56.85 s), and all 42 cases in the three complete purge/cleanup files (135.40 s). The final package built in 433.83 s. Exact package SHA256:
6c70e17293120569415f67dd5ccd95dac2a8a366a0af776eb40a435f15347ffe.The published 2026.9.8 driver successfully updated to that exact package in 437.42 s, preserving the fixture's durable state and reaching
readyz200 on version 2026.9.9. The running-Gateway Claw/Cron custody E2E is reused from D74 because its custody/rollback and transport code is unchanged; the final loader is exercised by the fresh compiled administrative flow and full purge suites. No final-source custody E2E rerun is claimed.Accepted costs and follow-ups. The maintainer approved publication of this exact head with the measured rare-admin request and wall-time costs. Every final delete retains a 67-statement shared-file admission sequence, including five catalog scans, twelve further shape queries, and ten version reads. Lane
checkonceowns sharing admitted physical-database facts across workers under CHECK ONCE ON LOAD; that follow-up will remove the repeated admission work when it lands. This PR retains and counts it without importing unfinished work or introducing a second admission design.The 25 current-authority operations and nine path-fence operations span awaited work and privileged effects. Combining them safely would require a broader lifecycle/authority change; no low-risk per-item batching change was identified. Their live checks, lock order, rollback custody and COMMIT settlement remain intact. The final purge-loader separation already removes unrelated turn preparation without changing those contracts.
The compiled CLI's first proof attempt reached the correct pending-deletion refusal and preserved all config/workspace assertions, then failed in analysis because zero-SQL esbuild exchanges reused process-local IDs. A derived proof adapter namespaces only those proven compiler exchanges by PID, preserves every raw SQL byte and census event, and identifies the actual runtime MAIN process through its unique same-argv launcher chain. Canonical observer/analyzers and product assertions are unchanged. All three repaired compiled CLI pairs pass; every raw row remains retained. The report above includes those results and all six final owner pairs. The rare-admin timing and admission follow-up are accepted as described above; the shared turn proof retains its separate noise-floor qualification.
Evidence preservation and closeout
The final head and package are bound by source tree
1519090cd389409e178842dcdbdb1050172c934f; the package and raw evidence are retained locally. The sole AWS leasecbx_7c0c05fcfb0bis released with cleanup complete and no remaining host/resource; its controller and normal proof slot are released. Remote capacity waits and prior failed fixture/transport attempts are retained in the evidence.Remote runs: source build and primary pairs (regular pairs passed; first compiled analysis failed as qualified above), final SDK/static/focused/update. The final extra-pair receipt and raw archives are retained in
final-1519090cd389/extra-result.Landing verification
Candidate:
24b9ab7b1f97f611034f7f18364d999ec85a0ce3, integrated through mainea6dff2bf5294601b370b2db652e80b38fb0359ewith merge commits, without rebasing. The session reader conflict adopts main'sa73ef559b23arecovery fix and native-reader custody; worker-owned retirement specifically reuses its existing executor and cleanup authority. Normal cold reads retain main's native candidate owner and release ordering. Overlaps with #167115, #166183, #167515, and #167563 preserve their policy worker, trajectory reader, creation admission, and test consolidation respectively.ClawSweeper's completed review run of
2c49a11c6b93found package-only durable lease takeover during awaited removal. The final apply/rollback guard now rereads the retained package lease. A real skill-removal regression passes normal removal and preserves installed or staged artifacts on takeover. The negative control failed both takeover cases for the intended unintended-uninstall result. No actionable finding remains; the completed review is reused under the authorized landing policy.Retained native final-authority debt:
src/state/agent-deletion-final-guard.ts:17, consumed by the apply/rollback hooks insrc/claws/package-remove.ts:603and:624, performs one indexed owner/expiry SELECT at the final effect. Preparation stays asynchronous. Raw/foreign package writers prevent cached authority from replacing it; removal requires complete revocation publication at the next SDK boundary. The existing agent-deletion final guard remains with the same owner.Integration repairs preserve accepted-work settlement, creation identity checks, the awaited MCP removal guard, and complete wrapper inventories. Doctor now awaits its temporary history reader's close before returning; the new immediate-reopen regression failed on the old code and passes after repair. Worker-backed fixtures use their host project and settle resources before deleting temporary data. Main's consolidated migration suite retains the bounded worker-read and awaited-cleanup assertions. No assertions, timeouts, scanner baselines, or runtime permissions were relaxed.
The Kysely guard failure is fixed with typed value expressions instead of raw NULL snippets. Direct SQLite proof passes all four provenance/journal table-presence combinations. The retirement reader fix avoids native authority SQL only inside the exact worker-owned cleanup scope, rechecks host liveness, and retains durable journal/lease checks in worker grants. Warm and cold deletion keep the zero-host-SQL assertion, and stale cleanup rejects. Ordinary read custody stays unchanged.
Local proof: candidate
a85ac736passed 100 focused tests across six files (957.90 seconds wrapper). The subsequent history repair at8bc89869passed nine selected cases across four files, including requester custody, cold-source replacement and quarantine preservation (1,250.08 seconds wrapper; 52 unselected). After the latest main integration, the focused warm/cold cleanup and stale-scope cases passed 3/3 (375.43 seconds wrapper; 27 unselected), and runtime build-graph/import checks passed 11/11 (33.71 seconds wrapper). The original full retirement proof above remains source-pinned evidence, not a claim that all tests ran in one invocation. Current production types, dedicated lint, complete Kysely guard and Madge (zero cycles) pass; all 27 post-integration core test-type graphs and the final scoped lint/type refresh passed. Fresh full-candidate and subsequent focused P2 reviews are scoped-clean.The requester E2E local attempt was refused before execution because test preparation could not verify separation from managed Gateway artifacts. No artifacts were rebuilt and the guard was not overridden; exact-head CI is its proof route. The earlier isolated Linux QA timeout reproduction proved baseline inheritance at
3f76fe0, not current-main success or failure.CI history: 37874813911 exposed the repaired fixtures and Doctor settlement. 37885438551 tested merge
2e157b2356e9a2591ad5add812e8c9b83214468a(mainfd2fa6b9plusa85ac736): 105 jobs passed, 22 skipped, nine root failures plus the aggregate failed, no cancellations. Its Kysely and retirement SQL failures are repaired. Maina73ef559b23arepairs the independent read-only recovery and sharing-fixture failures. Remaining inherited Windows-update fixture and effort-provider failures have source/log attribution; current-head admission will use only the actual final CI attempt. The Windows package rollback case's precise refusal remains unobserved; no passing replay or baseline reproduction is claimed. Effort's identicalUnknown provider "openai"failure was also inspected on main run37871873098, job113631794381.Released SDK audit: the changed retirement declarations, internal callbacks and extracted types have no reachability through released SDK exports, documented subpaths, or
api.runtimeatv2026.9.9/v2026.10.1-beta.1. The canonical API diff and published-driver update cell above remain valid source-pinned evidence. Approved alternating SQL proof is reused; no new measurement, package/update run, or changed release contract is claimed. No newOPENCLAW_*name is added.Final diff against integrated main
ea6dff2bf529: tooling/config +69/−16 (net +53); docs +198/−110 (net +88); tests/support +3,150/−982 (net +2,168); production +6,041/−2,683 (net +3,358).Fix/integration commits:
40b465d37595,e96c7ab55fec,a85ac7367646,8bc89869a1de,9c167dd4fc22,c95df3e7970e.Changed regression cost: the package-takeover command initially took 174.04 seconds including worker preparation (45.43 seconds Vitest; 12.899 seconds for its three cases), and those cases passed again in the integrated 172-test group (722.97 seconds wrapper). The new Doctor immediate-reopen case took 14.144 seconds locally. These are measured local times; CI seconds are not inferred from them.
Completed CI exception evidence before comment-only integration
CI 37892149344, attempt 1 tested
1a183452198d94016d015cea2e09bf78298cb6ce(main50dd07c229e2162b0a530b53dd682b8d9d04b08eplus exact candidatec95df3e7970eef33ab61f0c0e772afd86554ec8c). It completed with 112 successful jobs, 22 skipped, five inherited root failures and the failed aggregate gate; no cancellations. Security-fast passed. These are independently attributed baseline failures, not a green CI claim:da67a08b20ebdeliberately made publication observers non-throwing. The tests and publication/transaction owners are unchanged in the tested merge.a73ef559adds an inner native retention release, while the fixture counts only the outer release sequence. The retirement-only branch is inactive; failure precedes the per-case callback.40d57f8made the fixture restart asynchronous; the unchanged detached-handoff test does not join it before closing shared state.The native admin evidence binds the actual checkout, ordered parents and merge tree, exact head/run/attempt, all five root jobs and the aggregate, source equality, and hashed logs/qualification receipts. No PR-caused failure or security gate is waived.
The latest merge
24b9ab7b1f97resolves only the explanatory comment accompanying main's independently landed, identical cold-quarantine fixture correction (18cade08699b). The conflicted file is preserved exactly from main; retirement runtime code and prior focused/P2 evidence are unchanged. Post-integration production types, the affected agent-session test graph, and Madge (zero cycles) pass. CI run37896369372is bound to the new exact head; any inherited exception must be rebound to that attempt rather than reusing the previous head's admission.Current-head CI disposition
CI 37896369372, attempt 1 tested
b6d804d6eafcd52eca11df5def43770bd6707905, merging candidate24b9ab7b1f97f611034f7f18364d999ec85a0ce3into main09fbd7b1f2836ac7a3b28a302b4306bd8018f1ee. It completed with 109 successful jobs, 22 skipped, three inherited root failures and the failed aggregate gate, no cancellations. Security-fast passed. This supersedes the earlier attempt for admission.The remaining roots are the same seven unrelated Windows update-fixture failures and 18 accepted-facts fixture-order failures, plus the Bun orphan-recovery case
preserves a newer restart marker when cold-restoring a retired accepted receipt. That last rejection occurs in unchanged subagent lifecycle-completion authority after awaiting predecessor registry work and before its transaction. The test, registry queue and recovery owners are unchanged, and no deletion cleanup scope is active. The log does not identify which lifecycle-generation/current-run/recovery-current predicate invalidated; no specific race or baseline replay is claimed.The native evidence for this exact attempt verifies the real merge object and tree, ordered parents, unchanged relevant inputs in the actual tested merge, exhaustive three-root/aggregate accounting, and hashed artifacts. The main dependency updates are compared against the actual merge, not incorrectly against the older PR branch manifest. All PR-caused failures were repaired; no security requirement is waived.