Repository navigation
perf(sessions): keep cleanup responsive and reuse workers - #140897
Conversation
|
🦞👀 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. Reviewed September 13, 2026, 7:45 AM ET / 11:45 UTC (Revision 29). ClawSweeper reviewWhat this changesSession cleanup reuses bounded background workers, avoids redundant metadata processing, and moves startup integrity scans off the Gateway thread while preserving archive and deletion ordering. Merge readiness⛔ Blocked before merge - 5 items remain Keep open: this remains useful, maintainer-backed work that current main does not replace. The updated MASSIVE evidence resolves the previous performance blocker, and source review found no blocking correctness defect. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s session storage handles cleanup and deletion requests against per-agent SQLite databases. It protects retained conversations, archives eligible transcripts, commits removals, and publishes results back to Gateway and CLI callers. flowchart TD
A[Cleanup or deletion request] --> B[Check current session protections]
B --> C[Scoped archive worker]
C --> D[Retained deletion worker]
D --> E[Recheck authority and commit]
E --> F[Publish durable results]
D --> G[Drain on retirement or shutdown]
C --> G
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep bounded reuse within the existing storage owner, with published-updater compatibility established before landing and the measured memory tradeoff retained in the evidence. Do we have a high-confidence way to reproduce the issue? Yes for repeated worker startup: current main visibly creates a worker for each reclamation, and the supplied paired workloads exercise that path. Exact latency on fetched main was not reproduced in this read-only review. Is this the best way to solve the issue? Yes: the patch extends the existing archive and reclamation owners, preserves per-victim transactions and live guards, and supplies current-build performance evidence; updater acceptance remains outstanding. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against abd7a44d0724. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (28 earlier review cycles; latest 8 shown)
|
42994d7 to
9b4f7e8
Compare
Refresh the disk-pressure cleanup optimization in #140897 against current SQLite ownership. Keep per-victim retained claims, authorization and publication ordering while reusing one Worker per sweep. Bind each request to its own async context and preserve the original authority error during cleanup. Focused owner, archive and combined regression tests, classified checks, full build and independent P0 review passed. Full stress acceptance remains blocked by missing original harness inputs; this commit does not claim landing readiness.
dc3e79e to
e1294ec
Compare
Refresh the disk-pressure cleanup optimization in #140897 against current SQLite ownership. Keep per-victim retained claims, authorization and publication ordering while reusing one Worker per sweep. Bind each request to its own async context and preserve the original authority error during cleanup. Focused owner, archive and combined regression tests, classified checks, full build and independent P0 review passed. Full stress acceptance remains blocked by missing original harness inputs; this commit does not claim landing readiness.
b4f42e2 to
f895cb1
Compare
Integrate the disk-pressure performance follow-up #140897 with cold storage from #145172. Share request admission and authorization while keeping cold mutations one-shot through cleanup and native exit, and retaining one validated reclamation Worker per sweep. Keep restore preparation, synchronous commit checks, publication ordering and final physical accounting intact. Remove inherited dead UI exports and obsolete styles, exercise configuration through its real menu entrypoint, reuse picker test setup, and consolidate duplicate lifecycle notification construction. Preserve the 720-root and file-size limits without suppressions. Focused cold/reclamation/Gateway tests, reset and UI coverage, classified checks, full build and independent P0 review passed. Full stress acceptance remains pending the separately reviewed replacement rig.
|
Merged via squash.
|
* commit '4aff70f27016f9acf62d0acc19c8bd3592993e4c': (1537 commits) test: align plugin fixtures with current runtime contracts (#147000) refactor(browser): separate session tab tracking from cleanup (#146973) fix(tests): make systemd clock fixtures private (#146990) fix(linux): retire sleep guards when logind disconnects (#146046) refactor(matrix): share draft fallback delivery (#144840) fix(sessions): preserve cross-agent replies after reload (#146799) test(models): cover quota recovery during catalog discovery (#146708) fix(macos): recover browser sign-in when no browser opens (#146787) fix(process): prevent one-shot agents exiting while polling (#144268) fix(status): label the session inventory as stored (#146979) fix: avoid repeated background reads while loading chat (#146953) refactor(ui): narrow Skill Workshop proposal context (#146977) perf(sessions): keep cleanup responsive and reuse workers (#140897) fix(sessions): prevent stranded writers after abort and restart (#146792) refactor: reuse deferred owners in Gateway and infra fixtures (#146809) fix: prevent queued conversation replies from switching storage (#146984) test(ui): preserve nested failure summaries in CI logs (#146864) fix(test): respect process memory limits in local scheduling (#146298) fix: validate large media data URLs without regexp stack exhaustion (#146972) fix(ui): label model usage contributions as messages (#146735) ...
Related: #112423.
What Problem This Solves
Session cleanup repeatedly starts Workers and decodes metadata for unrelated sessions, delaying cleanup and other Gateway work.
User Impact
Cleanup and multi-generation deletion reuse bounded Workers while preserving transcript bytes, current references, retention protections and per-victim archive durability. There are no configuration, schema, protocol, dependency, retention-policy or data-conversion changes. The retained reclamation Worker retires after 60 idle seconds or explicit drainage. Source-runtime measurements show higher immediate process RSS; the observed tradeoff and measurement limits are below.
The measured immediate RSS tradeoff is accepted within the bounded Worker lifecycle described here; sustained memory use on smaller hosts remains uncharacterized, and no broader memory guarantee is claimed. The complete 101-file change list was inspected: there is no new configuration/default, schema, or storage-format surface requiring migration. The completed published 2026.9.4 driver-to-candidate proof supplies the upgrade and restart evidence, including state preservation and lease drainage.
Why This Change Was Made
The existing reclamation owner retains one validated Worker and agent connection per process. Each request still obtains a fresh parent claim and numbered writer admission, rechecks current authority, joins transaction settlement and publishes committed removals before releasing admission. Main's shared worker reservation covers both retained reclamation and one-shot cold mutations, preventing inherited foreground callbacks from borrowing a native Worker's write permit. Main's Gateway-lifetime integrity-verification policy remains with its existing owner; warm replies cannot revive invalidated proof.
Pressure sweeps and explicit deletion reuse one archive Worker within their operation scope. Each archive request closes its fresh read-only database and file handles before reporting completion. At most one archive Worker stays warm across competing scopes, and completion, failures and retirement join native exit. Cold preparation and mutations retain their one-shot lifetime. Single-candidate reference checks narrow JavaScript hydration while preserving fresh SQL reads, canonical parsing and unsafe-text fallback. Startup integrity runs in the existing child against its private snapshot, with asynchronous snapshot cleanup fully awaited.
CPU profiling of the previous candidate exposed redundant store loading and metadata rewriting during cleanup. This three-file repair skips
applyStoreunlessfixMissingorfixDmScoperequires it, yields immediately before and after lifecycle application outside the transaction, and reuses the canonical previous entry already read inside the maintenance transaction while copying archive fields. Transaction atomicity and the existing authority, configuration, schema and retention contracts are unchanged. Canonical built SMOKE, SCALE, MASSIVE, and the actual published-updater handoff all pass.Evidence
Published head:
d49a43e01bf8db330560b7a2f1258bcf733b68c5, tree5c1c8add91580002311d739b58e0368aa1ce13b5, parent81c77fe8ea8c511ac17d05198a552f971a8af138. All required current-source proof is complete. Fresh CI 34749371482 and the normal Linux build/package passed. Independent build verification matches all 41,983 source files and 11,795 build outputs (packagea59a532f8ecd2cc31300a235f843a9a2a09a1e9595181bc07d2861d33386d20c; build digestfb5c26cbf1b24142c8806771ef688702a483ef52983664bee171664cde588d7f). The bounded CPU diagnostic and canonical SMOKE/SCALE/MASSIVE are complete. The actual published 2026.9.4 updater handoff independently passed on the identical accepted build. The canceled first dispatch remains recorded below. The separate labeling job passed on retry after a recorded GitHub 502 response. One CodeQL matrix job stopped during result upload without a source finding in its log; its second attempt passed. Both complete current-head check sets passed or were skipped by their owning workflow, including the platform-ref recovery rerun described below.The three-file repair passes 66 existing tests across 10 files, including metadata preservation, and all final selected static checks. Independent P0–P2 review is clean. An initial fixture typecheck rejected
publicShareon the publicSessionEntrytype; the fixture was corrected to its actualInternalSessionEntrycontract. Typechecking now passes; the runtime test body was unchanged.The same bounded large-fixture diagnostic recorded a 497.454773 ms maximum gap on
d49a43e, compared with 829.190834 ms on81c77fe. All 512 reads and both load rounds completed; no diagnostic journal gap reached 500 ms. The 2.545227 ms instrumented margin is narrow, and profiling changes overhead, so this is evidence of improvement rather than canonical acceptance. All 57 artifact files are independently bound; CPU profile3bdf8043ac78d4ebd80be5977c1c777dbbd4aac6967ba885810e7cfda94010a5was saved before the bounded diagnostic SIGKILL. Archive:180fac2a7c8bf6bb77a847ff6c05467c85bc39cc16a9cf8937db9bd1ac57ecf5. Canonical SMOKE independently passed in 6.689141049 seconds, with a 402.658848 ms maximum whole-lifetime gap. All 48 archives and protected 52 nodes/54 generations/162 events and identities/68,424 bytes were verified, along with 106 mutation operations, 96 settled archive operations and eight reads per method. Native Worker/Gateway exits, archive exit before cleanup reply, WAL-aware root integrity and zero agent leases pass. SMOKE archive:ddcf733ff1abce02f1c44f66d96618642fa7f9813d4faabb02304349efa4ec69. SCALE independently passed in 934.63459773 seconds (15m34.635s), with a 392.896274 ms maximum whole-lifetime gap. All 9,998 archives, 20,996 mutation operations, 19,996 settled archive operations, 5,002 protected nodes/5,004 generations/15,012 events and identities/6,335,124 bytes, and 128 reads per method were verified. Native exits, archive exit before cleanup reply, root integrity and zero agent leases pass. Archive:5d2b9536d0fb401cacaa6091290c8482d25a8ff5cd320fd57f45235fbe7d66d9. MASSIVE used a fresh runner with the exact same build because completing capture and verification could not preserve 75 minutes on the original runner. The full transfer included all root outputs, 294 links, and 119 AI workspace outputs; all source/build/package bindings and 16 imports passed independent verification. No workload or lease limit was increased.MASSIVE independently passed in 3,381.89529259 seconds (56m21.895s), with a 477.837972 ms maximum gap across the complete Gateway lifetime, including native shutdown. All 41,996 mutation operations, 19,998 archives, 10,002 protected nodes/10,004 generations/30,012 events and identities/12,685,132 bytes, and 256 successful reads per method were verified. The archive actor settled 39,996 operations and exited before cleanup replied. Native exits were clean, WAL-aware root integrity passed, and no agent database leases remained. All 46 canonical evidence files bind to archive
5ce9c0bf938f23372b59b733fb94c37ce2c6b77be9463f69b28073d3c8deb110; root verification independently rehashed the complete 54,729,061-byte archive. MASSIVE runner.Supplemental Linux memory sampling recorded 3,380 samples, a peak sampled RSS of 1,093,352 KiB (about 1.04 GiB), and maximum observed kernel high-water of 1,094,600 KiB. These process values include Worker threads and exclude child processes; samples can miss peaks. The last sample was 360.518 ms before Gateway exit and 311.919 ms before the last Worker exit, so no post-retirement memory claim is made. The accepted MASSIVE runner is stopped. The prepared updater runner was canceled at 10:53:51 UTC for an unknown reason, before the attempted updater dispatch. The provider rejected that dispatch before execution (
commandMs: 0); no updater ran. Its failed receipt is preserved. The fresh recovery runner restored the identical accepted build/package/workspace outputs and completed the unchanged fixture. All proof runners are now stopped.The actual published 2026.9.4 updater handoff independently passed. The original published helper (
5d0df7810f699574ece5f211fef43bc7a4858d68bb38cc8ce79d516b593e05a7) consumed the successful update receipt and selected the updateddist/index.js, invokinggateway restart --preserve-definition --json. Two settled reclamation operations and two archive payloads were verified, including one scoped archive actor. The retained Worker was still live when SIGTERM arrived, then settled close, Worker exit, and Gateway exit occurred in order; the last result-to-close interval was 4,312.923069 ms, before idle retirement. Native complete-survivor, main/ops table-hash conservation, lease absence, and configuration-restoration assertions passed. Raw SQLite files were not exported for this updater cell, so its data proof combines native assertions with independent journal/hash verification rather than independent DB recomputation. All 132 artifact files and the unchanged 41,983-source/11,795-build inventories bind to the 7,014,814-byte archivec6504809d034ae97f0666b59d32cb079bc26995f4d0d06cbf2d06b243e4e9e98, which root independently rehashed.At 10:26 UTC, one bounded close/reopen attempted to refresh a stale GitHub pull-head projection. The named branch and PR metadata remained
d49a43e; GitHub still served81c77featrefs/pull/140897/head, while its merge preview used the correct candidate. The PR is open, the source is unchanged, and CI 34751839082 passed. Its preflight log records the same mergefc0ad0fa1c85e8b9d32bd142511d55cf5126e12aofd49a43einto main7ad2d15f9468f77817525f3663cc2e607e97df9a; it does not establish a newer main baseline. No native guard is bypassed. The acquisition-owner repair #146950 landed as8d04044ab328588fbc3af3e1909f8f05ef686298. Its trusted wrapper successfully acquired the exactd49a43ecommit and passed the native review guard while GitHub still served81c77feat the pull-head ref. The accepted storage candidate remains unchanged. This separately grouped PR event did not interrupt the runtime proof.Current
d49a43elocal source-runtime comparison against the unchanged pinned55f3ebaseline:Only the four new candidate cells were run; the verified baseline evidence is reused unchanged. All within-run archive bytes, survivors and native drainage pass. These are single Node 26.8.2/macOS source-runtime measurements with sampled peaks and no forced GC. Higher candidate RSS remains explicit; these timings neither measure packaged Gateway latency nor establish sustained memory cost or a leak. Earlier measurements remain identified below.
Required sequence: fresh normal build → the same bounded CPU probe to verify the gap repair → canonical SMOKE → SCALE → MASSIVE → actual published 2026.9.4 updater after accepted MASSIVE. The 500 ms whole-Gateway-lifetime bound and 4/30/60-minute workload budgets remain unchanged. Keep the sequence on the same lease when at least 75 minutes remain before MASSIVE, and capture/preserve the complete same-build bytes, including workspace AI outputs; any subsequent lease must use those bytes. Earlier passes, ongoing failed-run forensics and the forced-stop diagnostic below do not establish acceptance of this source.
Historical 81c77fe build/SMOKE/SCALE and local comparison; failed MASSIVE and separate CPU diagnostic
Historical head
81c77fe8ea8c511ac17d05198a552f971a8af138, tree7a085bd4d6edabc52fe9b04a1f37a6f84b59ec70, normally merged main55f3e3428a89ee82ccd4992b77895d61405d774dand was verified MERGEABLE. Its normal build/package, SMOKE, SCALE and local source-runtime comparison passed. Its canonical MASSIVE run failed the strict 500 ms responsiveness bound; it completed in 55m51.590s with independently verified conservation and native exits, while retaining its timing failure. The actual published 2026.9.4 updater handoff remained unrun. These earlier-source passes do not establish acceptance ofd49a43e.The fresh Linux build and package checks passed on Node 24.19.0/libuv 1.52.1. First CI 34746247683 tested merge
c0870d9a21e8c34f8ecf1729227b841f2f588a6dinto main65c8b06f2e42f4788d45da3b5573a761ddaf58fdand failed three main-owned fixtures: two UI tests imported removeddeferred, andagents-otherhad 702 roots against 700. This PR changed neither UI nor shard classification and added no agent test roots; #146803 and #146862 supplied the main repairs. Follow-up CI 34748192644 recorded zero-step failures inlarge-6,large-10andsmall-10; their logs returned 404. These are not code findings, and that run's final outcome remained pending at this checkpoint. Neither CI failure is represented as passing evidence. The source-runtime timing/RSS/conservation comparison against pinned main55f3e3428a89ee82ccd4992b77895d61405d774dpassed as recorded below.81c77fepassed 177 affected integration tests across 15 files, plus 11 admission tests across two files. Selected changed checks—including types, production/full-tree export scans, lint and guards—passed. Full-candidate P0–P2 review and the final review of main's admission-hook integration were clean. That conflict resolution preserved both main's schema-only Worker and this change's startup integrity snapshot Worker. Main's regression was migrated off the retired one-shot hook while retaining the same data and publication assertions.Historical
81c77feindependent proof: all 41,983 source files matched the frozen checkout; 11,796 build outputs were sealed (build digest466ef83e57e78af18cbb9e3e9d0549165f22f58228ae88f5ececaef507780570, packagee2bf8a54d37ab2aa49904fc3ed3e8b425776acd138e5eb8dd52f9271126aded9). SMOKE passed in 6.560913732 seconds with a 403.812984 ms maximum whole-lifetime gap. Both independent verifiers confirmed 48 archives, 106 mutation operations, 96 settled archive operations, 52 protected nodes/54 generations/162 events and identities/68,424 transcript bytes, and eight reads per method. All five Workers exited cleanly; the archive actor exited before cleanup returned. WAL-aware root integrity passed with zero agent database leases. SMOKE archive:5aff1ea049a1aec981b8e3e48a34ac7dba353f7a29856062834d7ec0454591bd.SCALE also passed both independent verifiers: 929.492709877 seconds (15m29.493s), 406.799081 ms maximum gap including native shutdown, 20,996 mutation operations and all 9,998 archives verified. It preserved 5,002 nodes, 5,004 generations, 15,012 events and identities, and 6,335,124 protected bytes, with 128 successful reads per method. The archive actor completed 19,996 settled operations and exited before cleanup returned; native Gateway exit was 0. WAL-aware root integrity passed with zero agent database leases. Archive SHA-256:
5d264fc220ceabf629b9330e1beab89a228957b2c44897d51553647337954960. A nonfatal wrapper portal-sync warning remains preserved separately; the actual workload/native exit and complete archived evidence passed verification.Historical
81c77feversus pinned main55f3e, Node 26.8.2/macOS source runtime, one measured cell per operation:All eight measurement/conservation cells passed. Separate untimed cells verified each run's own original archive bytes and survivors; all Workers and fixtures closed after native drainage. The
81c77fecandidate kept one reclamation Worker at API return and had higher observed RSS in both workloads. No forced GC was used: immediate RSS does not isolate retained-connection cost or establish a leak. An external native sampler includes Worker threads; peaks are sampled. These single source-loader-inclusive local measurements do not replace packaged Gateway latency or Linux stress acceptance. Historical measurements remain unchanged below.81c77fecanonical MASSIVE failed strict responsiveness: the heartbeat stream records a 664.790468 ms gap at 9.584885–10.249676 seconds, above the unchanged 500 ms whole-Gateway limit. The run completed in 3,351.589908575 seconds (55m51.590s) with 41,996 reclamation operations, all 19,998 archives verified, 10,002 protected nodes/10,004 generations/30,012 events and identities/12,685,132 bytes conserved, and 256 successful reads per method. The archive actor settled 39,996 operations and exited before cleanup returned; Gateway and Workers exited cleanly, WAL-aware root integrity passed, and no agent database leases remained. The sole native failure was the unchanged 500 ms responsiveness criterion. Archive153199711dc6d00a65769cad86a459fe15110c298c2a3984a223a9b80c6f5ac6binds the complete evidence and original live gap excerpt. Supplemental RSS had 3,349 samples, a sampled peak of 1,689,248 KiB and observed kernel high-water of 1,689,400 KiB (about 1.61 GiB). Its final sample was 505.663 ms before Gateway exit and 438.116 ms before the last Worker exit: no post-retirement memory claim is made. The old lease is stopped. The timing failure prevents acceptance. The updater handoff is held. This remains distinct from the preparation-only failures on older sources below.A separate bounded CPU diagnostic on
81c77fereproduced an 829.190834 ms gap at approximately 9.504–10.333 seconds. Inclusive timings were 403.485 ms in the transaction (including 322.705 ms inwriteSessionEntry), 188.964 ms loading the cleanup store, 96.713 ms in response handling (including 91.687 ms in WebSocket logging), and 33.4 ms in GC. These are inclusive profile observations; nested costs are not additive and do not form an exclusive decomposition of the gap. The profile was saved before the diagnostic SIGKILL. Its 55 files / 11,319 samples are preserved: archive SHA-2564dff7b30405908641533c2b8faf3896589da456be716f2e0d7ce2a6a21502c8a; profile SHA-256d92c36ceff325206a52f1b4f1931bec9ba6d72a52a3fbce1996f346aebbc02c7. This diagnostic is attribution evidence, not acceptance, and its forced stop is separate from the unchanged canonical MASSIVE run.Historical d1b3859 build/SMOKE/SCALE passes, unaccepted MASSIVE attempts and preceding checkpoints
Historical head
d1b3859216a4895f99224b263adb7da9f3b905c4, treeaf13c0b84e2ec5d932832565676c488800cd7225, passed CI, its normal Linux build, SMOKE and SCALE. Main then introduced a preflight import/type conflict; the replacement head above resolves the normal merge of55f3e3428a89ee82ccd4992b77895d61405d774d. Neither MASSIVE nor the actual published 2026.9.4 updater handoff was accepted ond1b3859. Its results remain exact-source historical evidence, with the 500 ms bound and 4/30/60-minute budgets unchanged.d1b3859preserved the retained-worker ancestry and added the write-owner classification to both mutation paths. A real borrowed-handle foreground write entered before cold Worker authorization without that classification; the regression failed there and passed with it. Main's trajectory regression was retained as covering evidence. The preceding8abaa5eaggregate passed 524 cases across 27 files, with one existing platform skip. Final test reorganization passed all 33 cold-storage/admission cases across three files; the moved regression and shared seed/snapshot bodies retained their assertions. All selected types, formatting, lint, schema/dependency/ownership guards passed, with zero runtime import cycles. Independent P0–P2 full-candidate and final test-layout reviews were clean. The initial static pass caught a test line limit and callback shadowing; both were repaired through fixture sharing and renaming, with no production or policy change.Historical
d1b3859built proof: the normal Linux build/package passed on Node 24.19.0/libuv 1.52.1. All 41,903 source hashes matched, and all 11,750 build outputs were sealed (build inventoryde050d1b5846149ee670e9a6515d9b50143b194f90d7a78491d0eedda75076d2; packageeec4317ed592da1b6a0616fe448f6b99c375554e0fb19b3087afafdce7848931). Testbox run. SMOKE passed both independent verifiers: 6.831475454 seconds, 416.257583 ms maximum whole-lifetime gap, 48 archives, five Workers and native exit 0. It preserved 52 nodes, 54 generations, 162 events/identities and 68,424 protected bytes, completed eight reads per method, and left no agent leases. The archive actor completed 96 contiguous settled operations and exited before cleanup returned. SMOKE archive SHA-256:06c5c9c4881750cf8f95fd431a67cfad98ab7d9eb9a6cea9ffcc6154bd59423f. The SCALE result and two unaccepted MASSIVE preparation attempts are recorded below; no updater acceptance followed on this source.SCALE also passed both independent verifiers: 920.582444176 seconds (15m21s), 409.851529 ms maximum gap, 20,996 reclamations and all 9,998 archives verified. It preserved 5,002 nodes, 5,004 generations, 15,012 events/identities and 6,335,124 protected bytes, with 128 successful reads per method. Five Workers were observed; the archive actor completed 19,996 contiguous settled operations and exited before cleanup returned. Native Gateway exit was 0, WAL-aware root integrity passed and no agent leases remained. Archive SHA-256:
430c603a88d780056750fc84083740cd2e12567b3093182715b01e7ce42e5c7c. The subsequent MASSIVE preparation used a fresh lease and a root-dist transfer; the omitted workspace-output failure is recorded below. The full 60-minute budget and updater margin were not relaxed.The first MASSIVE attempt on the transferred build stopped during preparation before Gateway spawn: the source checkout's workspace link resolved to missing
packages/ai/dist. It produced zero Gateway ticks and no Gateway timing result; failure archived5fa31ce8c5f661b01ed017961ade1b66b8887ba9d818a3b4f50162d429f2145is preserved. The complete rootdisttransfer had omitted this separate workspace output. The same sealed package contained all 119 AI runtime-output files. Those exact bytes were restored and all 16 runtime import checks passed independent verification, without rebuilding or changing source, canonical harness or budgets. The subsequent attempt did not produce accepted MASSIVE evidence, as recorded next.MASSIVE attempt 2 was deliberately interrupted during canonical SDK preparation when GitHub reported the new main conflict. One dispatcher SIGINT and then one exact runner-group SIGINT prevented delayed Gateway startup; no SIGKILL was used. It produced no Gateway journals/ticks or timing result, and the RSS supplement correctly records zero samples with null maxima. Archive
baba8c222df8a0760bb210142e90018ee53f3256e7b1a9aa0ca5e4a5ae80b917preserves all 31 regular evidence files, including the intermediate exit 1/runner -2 and final terminal 130/finalization-interruption record. This was an owner interruption, not a runtime failure or acceptance. All held proof leases for this source were stopped; MASSIVE and updater acceptance were not obtained. The replacement validation schedule is stated above.d1b3859passed 191 affected integration cases across 15 files, with one existing platform skip, all selected changed checks and the exact production/full-tree dependency scan. Independent full-candidate P0–P2 review was clean. The earlier8abaa5eCI finished with only an obsolete resource-registration re-export failure and its aggregate gate. Main's removal of an opaque startup namespace import exposed that otherwise test-only export;d1b3859included that main integration, deleted the obsolete export and imported its resource owner directly in the verifier test. No analyzer/configuration exemption was used.Historical
8abaa5ecompleted a normal Linux build and package verification (run https://github.com/openclaw/openclaw/actions/runs/34739344137), package SHA-256df3c0a66130491061a43020f1849256195ab3aa265cc3e8b43cfbb093168c17a, build evidence8dc110efb0a1a6e5cfae7d8db4f5952004935851d9fe2774daee3934b3c274ed. No Gateway profiles ran on that head before the export repair; its lease was stopped.The previous
676e760f15a48bacf1a124e587409a3ae193e61bcandidate independently passed its normal Linux build, SMOKE and SCALE on Node 24.19.0/libuv 1.52.1. SMOKE completed in 6.523137376 seconds, maximum whole-lifetime gap 394.895383 ms, with 48 verified archives. SCALE completed in 934.833658972 seconds (15m35s), maximum gap 412.042212 ms, with 20,996 reclamation operations and all 9,998 archives verified. It preserved 5,002 nodes, 5,004 generations, 15,012 events/identities and 6,335,124 protected bytes; both 64-client read rounds passed, five Workers exited cleanly, WAL-aware integrity passed and no agent leases remained. MASSIVE and updater did not run on that source; its lease was stopped. This remains historical exact-source evidence, not acceptance of the replacement.Historical build/profile run: https://github.com/openclaw/openclaw/actions/runs/34735652746. Build package SHA-256
d632499d17f1aa97405163f0c50417f5e4861dd00dbb57e4771db3e940e2f511; SMOKE archivee1e26ecea2d271ac8a8650c5f52bf7cf3b96ae72836ca9000365f21ae3283adf; SCALE archive4fba2112330341026f140f3adabbd1b8ecb4661db99fd1dd8c3d738d52435292.Historical
d1b3859versus pinned main3dfa9b2(which includes Gateway-lifetime integrity reuse), Node 26.8.2/macOS source runtime, one measured cell per operation:In this
d1b3859comparison, the candidate was faster with higher observed RSS. One reclamation Worker remained at API return; all Workers closed after native drain. No forced GC was used, so these immediate snapshots do not establish a leak or isolate the retained connection's memory cost. An external native sampler measures process RSS, including Worker threads, without relying on the target event loop; peaks are sampled. These source-loader-inclusive runs are not packaged Gateway latency or Linux stress acceptance. Separate untimed conservation cells validate all 20/21 archives against each run's own original transcript bytes, preserve survivors and clean fixtures. Independent fixtures contain different generated IDs/timestamps; cross-variant byte identity is not claimed.Earlier CI ran against a stale merge and exposed unrelated main type/lint failures, followed by a manual run with unrelated UI/tooling failures. Refreshing the PR merge subsequently exposed the preflight import/type conflict resolved in the replacement head above. No failed or incomplete run is counted as acceptance. Earlier failed performance observations and their verified partial conservation remain preserved below.
Historical
9b7e8da642c9b809c09a9e19af6affaf7dbbccf7passed its normal Linux build and SMOKE in 6.994026408 seconds with a 421.062912 ms maximum gap, five Workers and 48 verified archives, but CI found a type-only import cycle and an eviction/retirement fixture mismatch. Those were repaired in676e760; SCALE did not run on9b7e8da. Its SMOKE archive is4aaf6666b97eeb32d5392a338758c61a09b3a412aacdb5cb5bd3316a5884dec9, run https://github.com/openclaw/openclaw/actions/runs/34734220480. The676e760normal CI run https://github.com/openclaw/openclaw/actions/runs/34735597357 used stale mergedd5c00a69ef919dbb6ffa52bc5317eef605f0bfc; its type/lint failures came from an unrelated main import subsequently fixed by #146689. Manual run https://github.com/openclaw/openclaw/actions/runs/34736316447 also used stale comparisons in some jobs and reported dashboard iframe, SDK heap and upgrade-survivor baseline failures. These are recorded failures, not passing proof for any replacement.Historical acceptance runs, failures and immutable evidence
Results apply only to their named sources, never the current candidate. Required limits remain 500 ms over the complete Gateway lifetime and 4/30/60 minutes for SMOKE/SCALE/MASSIVE. Canonical archived/fresh/active-target counts are 50/60/50, 10,000/6,000/5,000, 20,000/12,000/10,000, with 4/64/128 clients, two rounds. Current-source acceptance still requires the actual published 2026.9.4 updater restart handoff, independently verified conservation/lifetimes. None of the older checkpoints in this block ran MASSIVE.
Context: #112423; accepted design; integrity owner #146512; merged retention #136639 and offline CLI cleanup #144232. No closure of saturation report #127970 is claimed. Exact seals are listed below.
Canonical
ccdd7bbandb9380a4: SMOKE passed; SCALE failedLinux Node 24.19.0/libuv 1.52.1; unchanged source/build inventories. Both SMOKEs completed cleanup/no-op repeat, 106 reclamations on one retained Worker, 48 verified archives, orderly Worker close and native Gateway exit 0. Both preserved 52 nodes / 54 generations / 162 events and identities / 68,424 transcript bytes, with eight successful reads per method, no observer/evaluator errors and zero captured WAL.
ccdd7bbad85f71b5219b5ee11a5176cf5dd221c1; tree10f184497d123d200e56016c6e1a0741e62039acb9380a4e811c1e773beb9c5c5c7bb5e0f6775620; tree011e699008132711011bcae3b4da6a71708a05b7; main throughd569fcd22957cfb748759441033c39669147938ac10d143; Windows/Docker CI passedccdd7bbSCALE: deadline failure, 1,800.054594531 s / 463.565112-ms maximum gap. Both 64-client rounds passed; 6,135 reclamations/payloads, 12,273 Workers observed. Watchdog SIGKILL interrupted first cleanup; repeat cleanup/orderly shutdown did not pass. Independent reconciliation: 16,000 nodes / 19,865 generations / 59,595 events and identities; 78,000 = 18,405 archived/pruned + 59,595 remaining events. All payloads and materialize→commit→publish ordering, protected 5,002 nodes / 5,004 transcript metadata records, remaining history hashes and SQLite integrity passed. Two root leases remained after SIGKILL: partial conservation only.Its archive interval spent 1,148.17/1,791.28 s in materialization/publication Worker lifetimes (bootstrap plus SQL/file work, not bootstrap self-time). Medians: 93.43/90.26 ms, reclamation admission→settlement 54.16 ms, inter-victim 48.06 ms; measured before scoped archive execution/reference narrowing.
b9380a4SCALE: timing failure; stopped at 710.062 s. Gaps ~674/560/1,230/876 ms at relative 1,466.931–2,141.129, 2,636.101–3,195.752, 6,806.101–8,035.853, 8,068.089–8,944.391 ms; readiness 6,043.428 ms, first retained admission 9,684.550 ms (after all four). Both read rounds completed. SIGTERM closed admission but cleanup persisted; exact-PID SIGKILL ended it. DB/WAL/journals/both signal receipts survived. Forensics verified 1,890 archives, protected 5,002 nodes / 5,004 metadata sets, surviving hashes and SQLite/FK integrity. Remaining: 16,000 nodes / 24,110 generations / 72,330 events and identities; 78,000 = 5,670 reclaimed + 72,330 remaining. No completed cleanup/graceful shutdown; updater revalidation pending, MASSIVE blocked.Separate
b9380a416,000-session CPU diagnostic reproduced four stalls: bootstrap integrity/FK ~280/261 ms; cleanuplstat/realpath~875/801 ms. Profile saved before bounded forced diagnostic stop; not acceptance. Separate stale-temp-only source microbenchmark: 3.556 s→0.746 ms, not Gateway lifetime/completed cleanup.7ccf361b: published update passed; canonical SMOKE timing failedSource
7ccf361b, tree2e43ab0ca8127d32f5b6076e9473274ea62d2dff: normal Linux build/package passed, Node 24.19.0/libuv 1.52.1, 41,762 source hashes / 11,714 outputs, unchanged inventories.Published 2026.9.4→
7ccf361restart handoff passed. Unchanged SHA-verifiedrunUpdatedInstallGatewayCommandconsumed the real successful receipt/result.root; passive observation confirmed updateddist/index.js gateway restart --preserve-definition --json. Preserved 4,800 sessions / 23,890 events / 2,200 cron jobs; checked eight conversations/two agents and independently decoded/hashed both historical archives. A retained Worker completed operations 1/2, remained live at SIGTERM, then settled close→Worker exit 0→Gateway exit 0. Close 4,529 ms after last result preceded 60-second idle retirement. Native complete-row node/window/event hashes, leases, survivors and config/service-environment restoration passed. Raw DBs were not exported: native assertions plus independent journal/hash checks, not forensic DB recomputation.Earlier attempts were not passes: old CLI against new
agent-runtimesplugin metadata failed validation; corrected fixture used actual updater delegation, no schema workaround. Earlier service-home, zero-Worker, evidence-directory fixture failures and interrupted build remain incomplete/diagnostic; no separate identities/hashes were supplied for them.Corrected canonical SMOKE: functional completion, startup timing failure. SDK-writer seed 110 nodes / 160 windows / 480 events and identities passed validity/classification/identity/projection with no pending validation/rebuild. Both rounds/cleanup/no-op repeat completed; one Worker/106 operations, orderly retirement. Final 52 nodes / 54 windows / 162 events and identities / 54 generations / 108 active and FTS rows, integrity OK. Lifetime 19.142479177 s, gap 512.451462 ms at 4,596.416–5,108.867 ms, before readiness 5,119.435 ms and cleanup 5,163.668 ms. No rebuild; no established reclamation-latency attribution. Separate CPU diagnostic: 563.446-ms pre-ready gap, ESM compilation/linking through shutdown/core imports. Evaluator's initial rejection of another Worker's legitimate null ack was fixed and replayed against the same immutable artifacts; original timing failure remained, no acceptance rerun/exclusion. SCALE/MASSIVE did not advance.
997baafd: development measurements and invalid canonical fixturesSource
997baafd, treed918f6fc59a9e37f234f0cb32871c853eddebf07. Four sequential reclamations on the same 126,939,136-byte synthetic DB (macOS/Node 26.8.2 source loader): baseline→retained Workers/full scans 4/4→1/1, total 10.028→3.374 s, later operations 2.46–2.77 s→5.65–7.62 ms, 10-ms-sampled peak RSS 1,061,978,112→1,124,204,544 B, post-op RSS 743,243,776→1,126,088,704 B, sampled main-loop delay 96.73→50.59 ms. Both preserved 512 survivor events and joined Workers. Memory-tradeoff evidence, not capacity/whole-Gateway latency.Canonical-writer audit found missing transcript identities/header-parent/leaf IDs, group/chat type, mutation/observation clocks, delivery metadata and entry projections/validation state. Recorded raw results remain diagnostic only; validation flags cannot legitimize unchecked state. This fresh fixture was not reconstructed historical V3.4; that original rig archive remained unrecovered.
f8d32e: reconstructed SMOKE failed; bounded resource probe passedSource
f8d32e0302d7cc59cc3ee9f6571204e1a71d185b, tree1c17340e30abf03e224ec7b1253d22ff684b90e9, basebf630269dbf8c0821885a46c0a58ca33aba1d1a0: CI including Windows passed. Conflict-only refresh preserved 24 task source surfaces; product review P0-only, not performance approval.Rig: 9/13 original files recovered exactly; maintainer approved the four-file fixture/live-flow/UI-flow/TS reconstruction, reviewed P2. New equivalent, not recovered V2. Bounded identity/post-ack-validation/failed-scope/native-exit census repairs retained unique terminal records, cold-operation-0 exclusion, original files, workload, timing and immediate-crash ordering. Bounded rig checks were not stress acceptance.
Reconstructed SMOKE failed timing, run 34679133549: attested install/build/typecheck/lifetime selftests, Linux Node 24.19.0/libuv 1.52.1, pnpm 12.3.4/original browser inventory. Flow 46.077 s, cleanup 21.617 s; 67 generations + 19 cap archives, protected 30 nodes / 60 generations / 300 events, exact conservation/integrity/no-op repeat/restoration/reply/restart/immediate crash recovery passed; reclamation census settled. Four valid journals: five >500-ms gaps—3,624.425617 ms (Control UI), 921.734262, 866.691791, 875.581039, 888.160148 ms; native 3,626 ms. Bootstrap-first-tick 368–387 ms does not excuse later stalls. Natural exit 1, failed timing/cleanup fields preserved; no larger advance. 27,957,393-byte archive verified before lease retirement. Seven screenshots/every frame of 8.88-s video inspected but withheld for visible Discord invitation card; future captures require canonical dismissal.
V34 resource probe failed: expected helpers gone before fixture exit; historical PIDs remain unidentified. V35 used bounded executable/start identity (no argv/env) and existing post-exit supervisor; lingering-descendant regression failed despite leader exit 0. No new thresholds: 120,000-ms case bound; 5,000/5,000/25-ms cleanup defaults.
V35 passed, run 34690272957, same
f8d32esource/tree, Linux Node 24.19.0/libuv 1.52.1/pnpm 12.3.4; carrier1efadc9ffc50e77131602e5067aedb7e08c9f48e. Source bytes/modes unchanged throughout install/probe. 22 victims / 11 Workers / three strict joins; two victims per retained Worker, globally serialized. Second-wave samples:After cleanup all measured resources were zero, shared connection closed, fixtures exit 0/no signal and supervised termination needed no forced-success cleanup; authority/settlement/retirement assertions passed. Limits: empty transcripts/source Workers, not Gateway/pressure/archives/throughput/peak memory/capacity; RSS includes loader/compiler/observer. Worker connection/claim counts 1/2/8 are source-derived, not enumerated; FDs are handles. Observed helpers were esbuild; later observations partly unavailable; zombie-only groups mean terminated, not reaped. 220,990 B / 44 files + manifest verified before lease stop; status
completed. Gateway timing still failed.September 7 and earlier failures
September 7
dc3e79e789748f29a4bfd6212ddbf8a3ae49e2bf, maine136a5cc1c03c3e1148291520f9dfaacb667ca27: Linux x64 Node 24.19.0/libuv 1.52.1; original pinned binaries, entrypoint/probes/workloads/crash ordering/limits unchanged.cleanupComplete=falseretained.cleanupComplete=falsepreserved. Disposable copy: 63 nodes / 93 generations / 467 events, integrity OK/FKs zero; 1,251 files / 38,951,695 B verified. Faster cleanup is same-source observation, not caused by later teardown.cleanupComplete=falsepreserved; terminal owner refused destructive retirement. Groups/census empty after settlement, but lease ended before stopped-store inspection: no remaining-victim or post-timeout DB claim. Actions job canceled, cause unestablished.Original SMOKE omitted terminal
cleanup(), leaving an idle TCP reservation: a sufficient exit blocker, not proven sole handle or timing cause. V2 preserved/verified evidence before cleanup, scrubbed both config locations; normal archives omit raw config. Per run: both archives/stable source-build-dependency-runtime inventories verified; seven screenshots/SMOKE, nine/SCALE (50-row windows not full counts); videos uninspected/unpublished. Leases closed; no SCALE/MASSIVE/Windows acceptance or landing approval at that checkpoint.Earlier unprofiled, unchanged-workload SMOKEs all failed timing despite the same 67/19 reclamations, protected 30/60/300 conservation/integrity/restoration/reply:
c3123cb8259cbaseline42994d79a445sweep Worker6e2383b8569aimport boundaryLast source: no-op repeat, nine pre-ready violations; higher startup cause unestablished.
42994d79a445SCALE completed cap/high-water/128 messages, archive lookup beyond first 50 rows, restoration/restart/immediate crash recovery, but cleanup >30 minutes; no completed sweep/final conservation. Valid generations 1–3: 11 post-ready gaps / 1,205.864853 ms; generation 4 invalid after unbracketed deadline SIGKILL; strict validation/cleanupComplete=falseretained. Archives/journals/stable inventories/empty groups independently verified; all historical Testboxes closed. Inspected before-restoration and restored-history/new-reply images belong to42994d79a445; video uninspected/unpublished.Historical build/CI failures, not waived gates
9b4f7e8c614: missing Worker-ID regression failed then passed. First build rejected evidence in compiler namespace; moving evidence only allowed normal build 7m31.4s. Archive bootstrap 128 chunks excluded reclamation/lifecycle/entry-store/orchestration but retained owner-backed Zod; P0 review was not performance approval.119e789d62e2, Node 22.23.2/one worker/two-case concurrency; Azure allocation failed/released, no diagnostic tests ran. Not dismissed as unrelated or given more time.f8d32e: thinking test 1,006/1,000 lines fixed by canonical #145632; two obsoleteworkerData.plan.databaseOptionsfixtures failed then passed. Speech timeout absent in three bounded local runs and later CI: no speculative patch/time increase. Upstream Windows consolidation kept 120 s. Native reviewNEEDS WORK; resources later completed, stress failed; noprepare-run/merge-runor gate bypass.997baafdCI: HOME removed before lease drainage. Async ownership repair: Zalo 10 failed/466 passed + 28 reset errors→476 passed/55 files, Feishu 6 failed/7 passed→13 passed, 17-case Codex cleanup passed. Successor CI: upstream TLS array-after-variadic refactor: consolidate plugin reload ownership and startup overlays #146275 repaired by fix(gateway): register TLS renewal with sidecar owner #146412. Later narrow repairs covered local shadowing, tsdown 0.23.0build()shape, Windows premature archive removal and Gateway fixture ENOENT before coordinator drainage. Startup MessagePort, archive-boundary, artifact-preparation, startup-integrity, competing-parent validation, retirement/quarantine/commit-close/queue regressions failed before repair; dependency/fixture-type/line-cap failures received no exemptions. Assertions, timeouts, public error identity and complete shutdown graph remained intact.Immutable identities and seals
All following values are SHA-256; “source/build” identifies the inventories, not a new runtime pass. Missing hashes for other runs were not supplied in the original record and are not invented here.
ccdd7bbpackage06fd7bc50582ca175cbff2fab17cb28f3be6a11d0a1323c5e1963ccfa66fdb70ccdd7bbsource inventory23de350d0d0203c686d0ed26c272fdb2677d9d3ff5dc32781d2fc01e0c3a10e4ccdd7bbbuild inventoryf80a4ea3ac3c2a29b076712913817d16911490673da2e076bb9e1945fe767814ccdd7bbSMOKE archive00d4e3720ceef97591f41c7e3c630725e824738cd8841304868269d6e68d6bcbccdd7bbfailed SCALE archive6432a30fe5643c239043990fda9f76b8e14d791398564c673de57f53f06a0a13b9380a4CPU diagnostic archived2110602fd93a1fd89f79e3b97d0deae747e6a70247de028907b26f8d5471709b9380a4package6a3a6248d9ea92fd210755dece5e894f5eb3d68278b0206fb6510c85fb57fd8db9380a4source inventory071a26665d798d799ee207d804028404bcb04fc17247b25ef5872a8e69b0b73ab9380a4build inventory7739846d4f79fc74f99b3833f6ba728a17cefe1ab4f62a441ccb3fd000a54f17b9380a4SMOKE archive5cae96bad2e949337e2c45fd8fad7bbb21f76fe101a1119e78db721cfa2dc87a7ccf361bpackage47ac5f5376a493927cdde5c94e973aca558688d621ed81e4349c5a80635c78987ccf361published-update archived7096c29ef4047c036f66852104914dab4a460142683379746a91a181f9c94e4997baafdraw-fixture SMOKE archive6b980efc23e448035f6f6481943718f2fa7bc7708735f4f44a49b1d2cb92b316f8d32ereconstructed-rig archive2e4d5967082c7f58f1def35de93b684ce52e1f2ed66cadcad78fc586aaedf6b0f8d32ereconstructed-rig manifesta8a6e9468c4aaa7b7a93d90691d719585c407a8c866ce0f0900153109bae24d8f8d32efailed SMOKE private archive043d2897981f1f48e23c0f9f6824789eec242775083d37b7d848a1d7e0798ff9f8d32eV35 resource archive7a97be0928c04a682aac1b184e678afd1ec8fd81d5acea18088b3541850d63335c2c427fd4e4e35f0ab84379c3d0182bba6dffaeae69c983d6bfce72b0d192e2e976efab79fd50cd9d4c058a1340d722490a862261ec967bbd30c24f82620036