Repository navigation
perf(gateway): avoid chat stalls during WAL maintenance - #158570
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: needs maintainer review before merge. Reviewed September 26, 2026, 5:48 AM ET / 09:48 UTC (Revision 13). ClawSweeper reviewWhat this changesMoves periodic agent and shared-state SQLite checkpoints and page reclamation into existing writer workers, with lifecycle tests and worker-access documentation. Merge readiness✅ Ready for maintainer review Current main still performs periodic WAL maintenance on the Gateway thread. The PR remains useful, and this review found no concrete defect in the current head. Priority: P1 Review scores
Verification
How this fits togetherThe Gateway maintains SQLite databases used for agent and shared state. Periodic timer results feed database health reporting while the Gateway serves chats and other requests. flowchart LR
A[Database timer] --> B[Linux sidecar check]
B --> C[Owner and identity admission]
C --> D[SQLite writer worker]
D --> E[Checkpoint and page reclamation]
E --> F[Database health status]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +318, Tests +162, Docs +11, Other +1. Total +492 across 51 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Complete the normal exact-head merge gates and retain the registered-timer, replacement, and Linux containment regressions alongside the worker-backed maintenance path. Do we have a high-confidence way to reproduce the issue? Yes. Current main retains the caller-thread maintenance path, and the PR supplies a registered-timer before/after workload. I did not execute that workload during this read-only review. Is this the best way to solve the issue? Yes. Dispatching through the existing SQLite writer owners preserves the timer, database identity, health, and close responsibilities without adding another scheduler. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6be19d76682d. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (12 earlier review cycles; latest 8 shown)
|
Share context capture behind explicit lifecycle admission so WAL registration does not import its owning cache. Preserve synchronous schema and maintenance authority capture. Validation: import-cycle guard, targeted lint, 41 lifecycle and schema-policy tests, and independent Codex review passed. Initial test compilation overlapped SDK declaration generation; the sequential run passed after generation settled.
Distinguish admission-injected context helpers from the canonical cache-backed facade. Remove the MCP reconstruction fixture session-key mock so shared storage cleanup can consume the real routing exports. Validation: full architecture checks and independent Codex review passed. Original Gateway shard reproduced all 11 MCP failures; the repaired focused suite passed all 11 in 18.39 seconds.
Keep the materialized native PR wrapper complete after extracting the shared-state worker context capture module. The missing import prevented provisioner private-store injection. Validation: reproduced the missing-module error before the fix; provisioning, extracted dependency closure and wrapper lease bootstrap passed afterward (3 tests, 92.08s wall). Independent Codex review passed.
The Control UI file-read cutover moved ControlUiRootState to server-control-ui-root but left the retained-assets E2E fixture importing the old module. This broke the UI E2E type graph on main and PR merge refs. Validation: reproduced TS2459, then the exact core-test-ui-e2e graph passed after correcting the erased type import. Formatting, diff checks and independent Codex review passed. Follow-up to #158464; observed while landing #158570.
Incorporate the main Control UI E2E type-import repair da8149b and current worker lifecycle context. The merge preserves the WAL cutover and resolved without conflicts. Validation: focused WAL, state coordinator/error, broker and lifecycle cleanup suites passed; independent integrated Codex review found no actionable issues through P2.
Move settlement-order observations from the parent connection SQL spy to real worker transaction and commit admission. Retain authorization, rejected reclamation, page budget, original owner and reclamation-worker shutdown assertions; require zero parent vacuum calls. Validation: reproduced both old fixture failures; all 13 reclamation and agent WAL admission tests passed (137.90s wall), targeted lint and independent Codex review passed.
Remove redundant pure-helper mocks in device and lease fixtures so shared storage cleanup can use real coordinator errors. Preserve worker metadata in the broker cleanup fixture while continuing to forbid native worker and channel construction. Validation: reproduced all missing-export failures, then 42 tests across five fixtures passed in 20.92 seconds; targeted lint, formatting and independent Codex review passed. No assertions or native-access fences were relaxed.
Keep the original Linux sidecar tripwire at timer entry before physical identity admission can refuse worker dispatch. The existing synchronous scan preserves fatal no-cleanup ordering; checkpoint, vacuum and file-size work remain in workers. Extend the existing process fixture through registered agent and shared-state owners with replaced main files and sidecars. Both cases fail on the original production path; all 83 Linux WAL/admission/coordinator tests pass after the fix with source hashes verified. Typecheck, lint and independent Codex review passed.
Preserve real worker-thread and OS metadata while retaining the existing fake workers, forbidden constructors and two-worker pool limit. This keeps shared storage teardown from failing on incomplete built-in mocks. Validation: all 41 existing tests across five affected fixtures passed in 17.89 seconds after reproducing the missing-export failures; lint, formatting and independent Codex review passed. No assertions or native-access fences were relaxed.
Use native reflective invocation for the unchanged callback and argument list, avoiding the Node timer generic tuple mismatch without casts or relaxed checks. Validation: reproduced TS2345 in the production core graph, then the graph, targeted lint, formatting and independent Codex review passed.
Resolve the main integration by retaining prepared read-source behavior in its existing owner and carrying the new schema admission/lifetime checks through the extracted context capture implementation. Keep the WAL lifecycle callback and cycle-free dependency boundary. Validation: 64 focused lifecycle, schema-policy, coordinator and agent WAL admission tests passed; production core types, targeted lint, import cycles and independent integrated review passed. Merge main without rebasing contributor history.
Place agent WAL registration with the database publisher instead of the lightweight writer queue. Preserve the registration body and shared queue owner while removing eager lifecycle and compiled-worker imports from queue-only callers. The unchanged report-owner shard previously timed out during cold worker preparation. After the move, the focused child emits no worker-build output and all 83 tests pass under the same deadline. WAL publication/admission (26 tests), extracted wrapper closure, core types, lint, import-cycle checks and independent review passed.
|
Merged via squash.
|
The Control UI file-read cutover moved ControlUiRootState to server-control-ui-root but left the retained-assets E2E fixture importing the old module. This broke the UI E2E type graph on main and PR merge refs. Validation: reproduced TS2459, then the exact core-test-ui-e2e graph passed after correcting the erased type import. Formatting, diff checks and independent Codex review passed. Follow-up to openclaw#158464; observed while landing openclaw#158570.
) * perf(sqlite): move periodic WAL maintenance off the Gateway thread * test(sqlite): verify WAL identity refusal and release test observers * test(sqlite): await asynchronous periodic containment * style(sqlite): make WAL failure types and cancellation returns explicit * style(sqlite): align the maintenance cancellation return * fix(sqlite): break WAL worker context import cycle Share context capture behind explicit lifecycle admission so WAL registration does not import its owning cache. Preserve synchronous schema and maintenance authority capture. Validation: import-cycle guard, targeted lint, 41 lifecycle and schema-policy tests, and independent Codex review passed. Initial test compilation overlapped SDK declaration generation; the sequential run passed after generation settled. * fix(sqlite): satisfy worker context and fixture contracts Distinguish admission-injected context helpers from the canonical cache-backed facade. Remove the MCP reconstruction fixture session-key mock so shared storage cleanup can consume the real routing exports. Validation: full architecture checks and independent Codex review passed. Original Gateway shard reproduced all 11 MCP failures; the repaired focused suite passed all 11 in 18.39 seconds. * fix(maintainer): include WAL context capture in wrapper Keep the materialized native PR wrapper complete after extracting the shared-state worker context capture module. The missing import prevented provisioner private-store injection. Validation: reproduced the missing-module error before the fix; provisioning, extracted dependency closure and wrapper lease bootstrap passed afterward (3 tests, 92.08s wall). Independent Codex review passed. * test(sqlite): observe periodic reclamation in its worker Move settlement-order observations from the parent connection SQL spy to real worker transaction and commit admission. Retain authorization, rejected reclamation, page budget, original owner and reclamation-worker shutdown assertions; require zero parent vacuum calls. Validation: reproduced both old fixture failures; all 13 reclamation and agent WAL admission tests passed (137.90s wall), targeted lint and independent Codex review passed. * test(sqlite): preserve real coordinator error exports Remove redundant pure-helper mocks in device and lease fixtures so shared storage cleanup can use real coordinator errors. Preserve worker metadata in the broker cleanup fixture while continuing to forbid native worker and channel construction. Validation: reproduced all missing-export failures, then 42 tests across five fixtures passed in 20.92 seconds; targeted lint, formatting and independent Codex review passed. No assertions or native-access fences were relaxed. * test(sqlite): expect periodic vacuum in the worker Keep the publication-order fixture aligned with periodic maintenance execution placement. Assert no parent vacuum after settlement while retaining real freelist reduction, page budget and committed-row proof. Validation: both original failures reproduced; all 20 worker-store tests passed in 50.76 seconds. Formatting, diff checks and independent Codex review passed. * fix(sqlite): preserve published-handle sidecar containment Keep the original Linux sidecar tripwire at timer entry before physical identity admission can refuse worker dispatch. The existing synchronous scan preserves fatal no-cleanup ordering; checkpoint, vacuum and file-size work remain in workers. Extend the existing process fixture through registered agent and shared-state owners with replaced main files and sidecars. Both cases fail on the original production path; all 83 Linux WAL/admission/coordinator tests pass after the fix with source hashes verified. Typecheck, lint and independent Codex review passed. * test(sqlite): retain native metadata in worker mocks Preserve real worker-thread and OS metadata while retaining the existing fake workers, forbidden constructors and two-worker pool limit. This keeps shared storage teardown from failing on incomplete built-in mocks. Validation: all 41 existing tests across five affected fixtures passed in 17.89 seconds after reproducing the missing-export failures; lint, formatting and independent Codex review passed. No assertions or native-access fences were relaxed. * test(sqlite): forward captured timer arguments safely Use native reflective invocation for the unchanged callback and argument list, avoiding the Node timer generic tuple mismatch without casts or relaxed checks. Validation: reproduced TS2345 in the production core graph, then the graph, targeted lint, formatting and independent Codex review passed. * fix(sqlite): keep writer admission free of database startup Place agent WAL registration with the database publisher instead of the lightweight writer queue. Preserve the registration body and shared queue owner while removing eager lifecycle and compiled-worker imports from queue-only callers. The unchanged report-owner shard previously timed out during cold worker preparation. After the move, the focused child emits no worker-build output and all 83 tests pass under the same deadline. WAL publication/admission (26 tests), extracted wrapper closure, core types, lint, import-cycle checks and independent review passed. * fix(state): preserve sealed private binding publication * test(state): consume published identity in pending close fixture
What Problem This Solves
Periodic WAL maintenance can stall every Control UI connection while one Gateway checkpoints an agent or shared-state database.
User Impact
Periodic checkpoints, bounded page reclamation, and file-size diagnostics now run through the existing SQLite workers. Linux sidecar containment retains its original synchronous timer-entry scan before identity admission or native cleanup. The 30-minute cadence, 512-page pass budget, FIFO release between units, physical identity checks, durability settings, and synchronous offline/close contracts remain unchanged. No configuration, protocol, schema, retention, or update migration changes.
Why This Change Was Made
Async admission previously invoked native maintenance on the Gateway thread. The existing timer now dispatches each unit through the canonical agent/shared-state writer and adopts its ordered checkpoint snapshot into the original host health owner. Shared-state maintenance retains its 350 ms coordinator wait, bounded polling, and blocking-owner diagnostics across worker transport. Admitted work retains native settlement custody; canceled queued agent work does not prevent a replacement connection from opening.
Existing worker-local timers retain their current paths; this adds no scheduler. The old shared-state adapter's manual coordinator ownership is removed. Agent WAL registration stays with database publication so the shared writer queue remains independent of database startup.
Evidence
The WAL workload appends 600 × 4 KiB values per pass through the actual registered timer and database owners. Source runs used Node 26.9.0 on the saturated macOS/arm64 campaign host, in before/after/before/after order for each database. Each version has 12 warm samples plus two separately reported cold samples.
Completion includes worker execution and reply delivery. Cold source-worker startup took 5.81–6.03 s for agent storage and 1.83–7.10 s for shared state; cold maximum host scheduling gaps were 67.49–180.35 ms and 7.40–22.47 ms respectively. Shared-host timing is noisy; the invariant result is zero host checkpoint calls. These are component measurements, not an end-to-end capacity guarantee.
Focused tests ran with
node scripts/run-vitest.mjs <file> --maxWorkers=1on the same Blacksmith Testbox (Node 24.19.0, Linux). Wall times include runner/compiler preparation:sqlite-wal.agent-admission.test.tssqlite-wal-checkpoint.test.tsopenclaw-state-db.coordinator.test.tsopenclaw-state-worker-error.test.tssqlite-wal.test.tsThe existing reclamation, broker, and lifecycle-cleanup siblings added 21 passing tests. Their grouped run took 36.35 s including the WAL suite before its four synchronous mock-abort expectations were updated; the final standalone WAL run above passed all 57. The real Linux main/worker containment cases passed in both runs. These existing process-based cases protect fatal containment and native cleanup behavior.
The new agent owner regression failed on the original production code with seven host
incremental_vacuumcalls (21.20 s wall); candidate production was restored and every changed file hash was rechecked afterward. Shared-state replacement remains byte-for-byte unchanged when either the pathname or physical-file fence refuses admission.node scripts/check-changed.mjs --base 31a5754546a0854ca85abf44bf57134e182d5b20 -- <changed files>ran for 1,485.75 s. All 25 core-test typecheck graphs, core typechecking, formatting, docs, boundary, ratchet, and dead-export gates passed. The final lint stage reported a missingunknowncatch annotation and an implicit async cancellation return; both are corrected in the final head. The targeted lint/core-typecheck rerun could not connect because the single Testbox had expired. That rerun remains unverified; hosted CI is authoritative. The final edits do not change runtime behavior.Provider:
blacksmith-testbox; lease:tbx_01m3dk4s6je5vamt9kz89q5f27; lease workflow. After native sync timed out and wrapper preparation stalled on the saturated host, validation used a separate checkout on this same lease, pinned to the original base with the tracked candidate patch and SHA-256 verification of every changed file. The lease expired after the long gate, andcrabbox stopcompleted without error. Local dependency installation took 20m28s; local focused attempts were interrupted during repeated compiled-subprocess preparation. No full build or swarm run was needed for this execution-placement change. Hosted PR CI timing is not yet available.The production growth carries explicit worker requests/results, ordered health adoption, agent operation drainage, and the existing WAL coordinator budget/diagnostics through the common broker. Removing the manual state coordinator adapter and its superseded cleanup fixture offsets part of that cost; a neutral count would require dropping those contracts or unrelated cleanup.
Independent Codex autoreview: scoped clean through P2; no accepted/actionable findings. Diff-scoped deslop and
git diff --checkpassed.Overlap review: #158465 adds separate agent execution commands; #158486 and #158120 add unrelated shared-state commands; #158202 fixes another worker lifecycle branch. #158450, #158559, and #157972 overlap the worker-access documentation. Their relevant diffs do not implement this WAL cutover and were reconciled as disjoint changes.
Landing repair: exact-head CI run 36212594007 exposed a runtime import cycle from the shared-state cache through its WAL adapter and worker context back to the cache. Commit
6374cdadc744ea66602451f2eb50657f0ad932d3moves context construction behind the existing lifecycle admission callback, preserving synchronous capture and the same state owner. The existing import-cycle guard now reports zero cycles; targeted lint and independent Codex review through P2 passed. The coordinator and schema-policy suites passed all 41 tests (66.24 s Vitest duration; 191.00 s including worker compilation). An initial local attempt stopped before assertions because concurrent SDK declaration generation changed compiler inputs; the sequential retry passed after generation completed. No CI rerun was requested.The next exact-head run 36213846476 confirmed both cycle guards passed, then exposed same-name wrapper shadowing and a deterministic MCP reconstruction fixture failure. Commit
8b7135217c8a716b88912041b866d1dd735c5507distinguishes admission-injected helper names and removes the unnecessary session-key mock; no assertions changed. The original Gateway selector reproduced all 11 MCP failures (634 other tests passed), and the repaired focused file passed all 11 tests in 18.39 s wall / 12.78 s Vitest duration. Fullpnpm check:architecture, formatting,git diff --check, and fresh independent Codex review through P2 passed. CI cancelled sibling jobs after the originating failure; no blind reruns were requested.Run 36215210429 exposed a missing materialized-wrapper manifest entry for the extracted context module. The provisioning test reported failed private-store injection; inspecting its child stderr proved
ERR_MODULE_NOT_FOUNDwas the underlying cause. Commit4aba91745739dff87302d3940e404a159529eeb7adds the single missing entry. Provisioning, wrapper lease bootstrap, and extracted dependency closure then passed (3 selected tests across 2 files, 92.08 s wall); independent Codex review passed. The matching main CI shard was green, so this was repaired as a task-related packaging defect. No CI rerun was requested.Run 36216322050 was blocked by a new main regression from #158464: the retained-assets UI fixture still imported
ControlUiRootStatefrom its former owner. The exact UI E2E type graph reproduced TS2459 on a fresh main checkout. Main repairda8149b8ba7d88d76dbe7979986e307a4542e6f0corrects only that erased type import; the same graph, formatting, and independent review passed. One main push raced a concurrent commit and was refreshed before successful publication. Main was merged, not rebased, into this PR asf1d411af16508db2e9052055fd2033684d34cffa, without conflicts. The integrated candidate passed 179 tests across seven focused WAL/coordinator/error/broker/cleanup files (8 existing skips; 380.49 s including compiler preparation), and a fresh review of the complete integrated PR delta was clean through P2.Run 36218224869 reached two old reclamation fixtures that still required parent-thread vacuum calls. Both failures reproduced locally. Commit
d0ee3a1cdc6fc30c07bd25bf76d52b16be41dee3observes real worker transaction/commit admission after reclamation authorization and native settlement, requires zero host vacuum calls, and retains rejected-reclamation, freelist-budget, original-owner, and reclamation-worker shutdown checks. All 7 reclamation and 6 agent WAL admission tests passed (137.90 s wall), targeted lint and fresh independent review passed. No production change was needed. GitHub archive log downloads failed at the transport layer; the direct job-log endpoint supplied the diagnostic.Run 36219795900 exposed a device-identity fixture whose full coordinator mock hid the real error class. A bounded census reproduced the same problem in three lease fixtures and missing worker metadata in the broker-cleanup control. Commit
00205dbf88bea0156efcedcdf1435167420babaeremoves four unnecessary pure-helper mocks and preserves real worker metadata while keeping worker/channel construction forbidden. All existing assertions and native-access fences remain intact. All 42 tests across these five fixtures passed in 20.92 s; targeted lint, formatting, and independent review passed.Run 36220925835 found two publication-order fixtures still expecting host-thread vacuum after settlement. Commit
283e9f52c28b459e3a3d1074b2b6e25c0dcf3a4dchanges that one expectation to zero host vacuum while preserving the real periodic tick, FIFO/publication barrier, freelist reduction and 512-page bound, and committed-row checks. Both old failures reproduced; all 20 worker-store tests passed in 50.76 s, with formatting and independent review clean. A source census found no other runtime-agent periodic assertion requiring host SQL.Run 36222049404 was blocked by a later main change introducing a chained type assertion in progress-snapshot number coercion. Upstream fixed it in
66b812f26e725cd709e08860d2cb46ba496cd308while a matching repair was being validated. The executable correction passed the full boundary-lint command, all 45 progress-state tests, 12 native conversion probes, and independent review. No duplicate main commit was published. Conflict-free mergea890852452a0a2f783d9c29dbf110dcd2c2f7597incorporates that fix; full boundary lint passed again on the merged tree. The only overlapping code change relocates a type import, so prior WAL behavior proof remains valid.ClawSweeper's Linux containment finding is addressed by
6aacde4140bb: the existing sidecar scan again runs at timer entry, before a replaced published database can fail identity admission. This deliberately retains the existing Linux/procscan once per maintenance interval; checkpoint/vacuum and file-size work remain off the Gateway thread. It preserves synchronous close custody without adding another worker or an asynchronous preflight gap.Real Linux proof used
blacksmith-testboxleasetbx_01m3e75wcejgp57b8pc57f8kfb, workflow 36224536736. The new registered agent/shared timer cases replace the main inode and sidecars, require one fatal diagnostic and SIGKILL before a survival acknowledgment or stale cleanup, and verify replacement WAL data/integrity on reopen. Both cases failed on the original production source in 16.60 s for the intended reason. Restoring the fixed source produced 83 passing WAL/agent/shared tests in 30.03 s, with all four selected source hashes reverified. New agent/shared containment cases took 421 ms / 362 ms. The standalone local WAL command passed 49 tests with 10 platform skips in 10.21 s; Linux proof covers those platform cases directly. Lint, the infrastructure type graph, formatting, and final independent review passed. The lease was stopped successfully; a portal telemetry-sync timeout did not affect command success or proof.The last prior-head CI run 36223360422 exposed another incomplete worker metadata mock. A bounded census reproduced the same defect in four related fixtures and a same-file OS mock. Commit
d37274a45382f67318a653ff2038f85b7b9b3e1apreserves real metadata while retaining every original fake worker, forbidden constructor, and two-worker limit. All 41 existing fixture tests passed in 17.89 s; no assertions or native-access fences changed.Run 36225001097 caught TS2345 in the subprocess fixture: Node timer optional generic arguments could not be spread into the captured generic callback in the production type graph. Commit
5f79c67ef601bc767acf236d3bef3a18ad076b96forwards the same callback, receiver, and arguments throughReflect.apply, without casts or changed assertions. The exact core production graph reproduced the error and then passed; targeted lint, formatting, and independent review passed. ClawSweeper confirmed the Linux containment finding is addressed and identified no remaining patch defect; its remaining blocker was this now-repaired typecheck.While run 36225683891 was active, main #158627 introduced prepared state readers and conflicted with this branch’s cycle-free context extraction. Merge
9bceadfaadfa39fc7e38416af889b1c9c53dcef4preserves main’s prepared-reader API, live identity getter, schema admission and captured-scope checks in the extracted implementation. No rebase was used. Production types, targeted lint, zero-cycle guard, and 64 lifecycle/schema/coordinator/agent-admission tests passed (69.52 s including runner preparation), with independent integrated review clean. The superseded run also reported a nested report-owner fixture cancelled by SIGTERM during cold preparation; the source-backed cause and owning repair are documented below. Fresh exact-head CI is required for this conflict resolution.The report-owner failure repeated in 36226673738. Its owning cause was the new WAL registration’s eager database-lifecycle imports in the lightweight writer-queue module, which common runtime cleanup always loads. Commit
d88015a476d84f796206a1958a93d999c51fe3ebmoves the unchanged registration body to the agent database WAL owner and restores the queue module to main’s lightweight implementation. The exact 83-case shard reproduced 82 passes / 1 deadline failure before the change (342.21 s local wall), then passed 83/83 afterward (85.20 s; real-home case 4.42 s). The focused after-case’s complete child stderr contains no compiled-worker preparation, versus a 24.075 s worker build in the failing hosted case. No deadline, concurrency, assertion, or retry changed. The 26 WAL publication/admission tests, extracted-wrapper dependency closure, production types, lint, zero-cycle guard, and independent review also passed. Exact-head CI remains required on the new head.Run 36229740142 exposed eager ordinary-read admission during legitimate private source binding under file exclusion. Both short binding cases reproduced before the fix (18.58 s wall); the async timeout had the same premature-open cause. Publication now returns its generation-bound admission facts to the WAL owner without opening the read seal. Actual maintenance still checks the seal, generation, native owner, physical identity, and captured scope before dispatch and commit. The opening environment is passed through publication rather than recaptured from ambient process state.
All 63 focused binding, asynchronous lifecycle, alias/read-admission, coordinator, and unpublished-open tests passed (250.99 s grouped wall, including runner preparation). Existing main-thread binding cases now invoke their real registered timer and await its refused result while exclusion remains held, require zero host SQL from that tick, and preserve durable-row and private-handle closure checks. The two changed cases took 2.654 s and 2.072 s; no test count, sleeps, deadlines, retries, or production test seams were added. A first assertion was placed in the unit worker suite, where native worker maintenance is intentional; that fixture mistake was corrected by moving the assertion to the existing main-thread binding owner. Production types and independent review through P2 passed. A test variable shadowing the maintenance lease was caught by lint and renamed before publication. Exact-head hosted CI remains the landing gate.
The final standalone binding run passed all 4 cases in 87.15 s wall (21.70 s Vitest duration; changed cases 1.529 s / 1.239 s), and final targeted lint passed. Published repair:
e22ce5f85d7e.After that repair, the watcher detected a conflict with main #158655. Merge
7accc4c4ee75preserves main's lightweight read-worker context API and environment capture in this PR's existing admission-injected context module, avoiding a renewed cache/WAL/context import cycle. All 101 reader, signal/error mapping, binding, coordinator, and schema-policy tests passed in 166.76 s wall. Production types, targeted lint, import-cycle guard, formatting, and a fresh independent review of the complete integrated delta passed. No rebase was used.Run 36233045084 found one missed test caller of the publication result: the pending-close fixture still accessed
.keyrather than the returned identity. Commit114688c6b4abdestructures that identity without changing the assertion. The exactstate-loggingtype graph passed, both pending-close tests passed in 6.33 s wall (2.17 s Vitest), and independent review was clean. The remaining lifecycle publication callers were checked. No unchanged CI rerun was requested.Final landing validation
Exact-head CI 36233506753 passed for
114688c6b4ab888c6938247c73ddf1f362d184b7;watch-pr-ciexited 0 withGREENand GitHubSUCCESS. This supersedes the earlier pending or unavailable gate notes above. Native exact-head review artifacts validated with zero findings, and GitHub-gated preparation completed without changing the reviewed head. All CI retries in this history followed a diagnosed repair or required main merge; no unchanged run was retried merely to get green.