Repository navigation
improve(sessions): reuse compiled transcript metadata queries - #148773
Conversation
Prepare presence and mutation queries per native database handle while keeping fresh bindings and SQLite transaction visibility. Add focused real-SQLite compilation, mutation, snapshot, and handle-lifetime regressions.
|
🦞👀 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 15, 2026, 7:08 AM ET / 11:08 UTC (Revision 12). ClawSweeper reviewWhat this changesReuse compiled SQLite queries for transcript presence and freshness checks, with regression coverage for current bindings, transaction visibility, and database-handle lifetimes. Merge readiness✅ Ready for maintainer review This remains a useful, focused optimization that current main does not implement. No blocking correctness or security defect was found, and the recorded performance tradeoff has already been accepted. Priority: P2 Review scores
Verification
How this fits togetherSession metadata readers supply transcript-presence and mutation timestamps to recovery, cron, and session-completion checks. They resolve the session’s database and read authoritative SQLite state before those callers decide whether to reuse or refresh a session. flowchart TD
A[Session recovery and completion checks] --> B[Resolve session and database]
B --> C{Compiled query available?}
C -->|No| D[Compile query for database handle]
C -->|Yes| E[Bind current session ID]
D --> E
E --> F[Read current SQLite snapshot]
F --> G[Return presence or mutation timestamps]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +41, Tests +209. Total +250 across 3 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep compilation reuse within the existing readers while preserving fresh SQLite execution and the explicitly accepted workload-specific performance tradeoff. Do we have a high-confidence way to reproduce the issue? Not applicable to a functional bug: this is a performance optimization, and current source plus the recorded native comparison establish repeated query compilation. Is this the best way to solve the issue? Yes. Reusing the existing prepared-query helper avoids a competing metadata cache and preserves current bindings, snapshots, and native statement ownership. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d872aaba81a7. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (11 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review Please review exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Please review exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
* commit '0945dabbe487213e95e84a72ad1aae3659e0e000': (115 commits) fix: omit automation service aliases from squash coauthors (#148883) test: restore services typecheck shard headroom (#148885) perf(trajectory): avoid native probes for truncation records (#148870) improve(gateway): load cron only when reload requests it (#143500) fix: resolve issue #146088 — [Bug]: The most recent Linux AppImage does not ship with the correct versions of libs needed to run (#148174) refactor(theme): share nonvirtual ANSI color lookup (#148717) perf(gateway): scope exact session row topology reads (#148836) improve(memory): reduce vector replacement overhead (#148201) fix(i18n): keep HTTP headers out of native translations (#147119) refactor(plugins): share source-root display formatting (#148646) fix(cron): reject blank script paths before mutations (#148787) refactor(config): share audit positional scanning (#148643) fix(test): restore infrastructure typecheck shard headroom (#148861) fix(release): harden package validation fallbacks (#148729) refactor(config): share leaf and descendant unset pruning (#148216) test: reuse prepared runtime for pristine preflight (#148858) fix(ui): settle global model drafts across agent switches (#148843) fix(queue): avoid repeated scans when cancelling backlogs (#148754) fix(logging): orphaned \\\\?\\ path markers corrupt redacted Windows diagnostics (#147542) refactor(hooks): share optional reply metadata projection (#148641) ...
|
Merged via squash.
|
* commit '84114b5a2711764e2ca333e327e808fd88316063': (40 commits) improve(sessions): reuse compiled transcript metadata queries (#148773) fix(ci): repair Copilot contracts and config failure diagnostics (#149001) test: align model auth and setup fixtures with current behavior (#149023) refactor: reuse web search request context (#148949) fix(ci): remove duplicate Copilot auth metadata (#149016) test(agents): align auth fixtures with runtime store reads (#149004) improve: reduce data fetched during reminder maintenance (#148996) fix(cron): skip availability checks when session pruning is idle (#148920) fix(auth): guard GitHub Copilot device flow authority (#148999) fix(agents): prevent early recovery aborts of foreground exec (#148959) fix(github-copilot): remove retired Raptor mini (#116505) improve(feishu): reduce preparation work for documents with tables (#148997) improve: reduce database work when recording participants (#148841) test: accept Bun error labels in plugin assertions (#148955) fix(models): clarify saved account health and catalog status (#148987) test(plugins): align Copilot auth-choice registry expectations (#148981) fix(channels): reject blank integer channel add options (#145534) fix(ui): preserve archive undo after chat navigation (#148831) feat: show cited source previews in macOS and iOS chat (#148906) fix: avoid redundant tab updates while chats stream (#148865) ...
…aw#148773) * improve(sessions): reuse compiled transcript metadata queries Prepare presence and mutation queries per native database handle while keeping fresh bindings and SQLite transaction visibility. Add focused real-SQLite compilation, mutation, snapshot, and handle-lifetime regressions. * test(sessions): correct prepared metadata reader fixtures * fix(sessions): avoid shadowing the prepared query binding
* refactor(agents): centralize tool description exclusions * Merge main into refactor/tool-description-exclusions-20260915 * commit '84114b5a2711764e2ca333e327e808fd88316063': (40 commits) improve(sessions): reuse compiled transcript metadata queries (#148773) fix(ci): repair Copilot contracts and config failure diagnostics (#149001) test: align model auth and setup fixtures with current behavior (#149023) refactor: reuse web search request context (#148949) fix(ci): remove duplicate Copilot auth metadata (#149016) test(agents): align auth fixtures with runtime store reads (#149004) improve: reduce data fetched during reminder maintenance (#148996) fix(cron): skip availability checks when session pruning is idle (#148920) fix(auth): guard GitHub Copilot device flow authority (#148999) fix(agents): prevent early recovery aborts of foreground exec (#148959) fix(github-copilot): remove retired Raptor mini (#116505) improve(feishu): reduce preparation work for documents with tables (#148997) improve: reduce database work when recording participants (#148841) test: accept Bun error labels in plugin assertions (#148955) fix(models): clarify saved account health and catalog status (#148987) test(plugins): align Copilot auth-choice registry expectations (#148981) fix(channels): reject blank integer channel add options (#145534) fix(ui): preserve archive undo after chat navigation (#148831) feat: show cited source previews in macOS and iOS chat (#148906) fix: avoid redundant tab updates while chats stream (#148865) ... * refactor(agents): consolidate tool description exclusions * chore: merge main for tool summary validation * commit '926bb1e1d75c6b102bcbf93114c690312c23cf18': (1903 commits) refactor(matrix): reuse startup verification account key (#157310) perf(config): avoid repeated environment scans during publication (#156457) chore(i18n): refresh native locales (#157495) fix(update): show quiet step progress and date recorded outcomes (#153407) feat(gateway): preserve browser sign-in requirements before connecting (#157454) test(scripts): await CLI admission fixture lifetimes (#157424) fix(ci): preserve consumer selection across core type stripes (#157373) fix(wizard): preserve typed plugin enum values (#127577) (#138090) fix(qa): title mock Code Mode fixture calls refactor: simplify SQLite worker lifecycle and test fixtures (#157458) test: prebuild run-node signal fixture (#157478) refactor(exec): reuse approval policy rule keys (#157198) fix(ci): reuse prepared runtime for changed-target E2E shards (#157365) fix(config): apply Gateway writes without waiting for file events (#157372) fix: count recorded nested tool operations once (#157438) fix(telegram): stop leaking raw file:// markdown links in messages (#137810) refactor(claws): share resource capability changes (#154680) improve(channels): reduce redundant preparation for button messages (#157050) fix(build): package preparation fails on unrelated test types (#157318) refactor(claws): share bounded document reading (#157436) ... Co-authored-by: Vincent Koc <[email protected]>
…8966) * refactor(agents): centralize tool description exclusions * Merge main into refactor/tool-description-exclusions-20260915 * commit '4a994031abb1b54d51b76755a55ac8f6e918162d': (40 commits) improve(sessions): reuse compiled transcript metadata queries (openclaw#148773) fix(ci): repair Copilot contracts and config failure diagnostics (openclaw#149001) test: align model auth and setup fixtures with current behavior (openclaw#149023) refactor: reuse web search request context (openclaw#148949) fix(ci): remove duplicate Copilot auth metadata (openclaw#149016) test(agents): align auth fixtures with runtime store reads (openclaw#149004) improve: reduce data fetched during reminder maintenance (openclaw#148996) fix(cron): skip availability checks when session pruning is idle (openclaw#148920) fix(auth): guard GitHub Copilot device flow authority (openclaw#148999) fix(agents): prevent early recovery aborts of foreground exec (openclaw#148959) fix(github-copilot): remove retired Raptor mini (openclaw#116505) improve(feishu): reduce preparation work for documents with tables (openclaw#148997) improve: reduce database work when recording participants (openclaw#148841) test: accept Bun error labels in plugin assertions (openclaw#148955) fix(models): clarify saved account health and catalog status (openclaw#148987) test(plugins): align Copilot auth-choice registry expectations (openclaw#148981) fix(channels): reject blank integer channel add options (openclaw#145534) fix(ui): preserve archive undo after chat navigation (openclaw#148831) feat: show cited source previews in macOS and iOS chat (openclaw#148906) fix: avoid redundant tab updates while chats stream (openclaw#148865) ... * refactor(agents): consolidate tool description exclusions * chore: merge main for tool summary validation * commit 'e0f58a77476acbe382bff5e55cd520e9d228d478': (1903 commits) refactor(matrix): reuse startup verification account key (openclaw#157310) perf(config): avoid repeated environment scans during publication (openclaw#156457) chore(i18n): refresh native locales (openclaw#157495) fix(update): show quiet step progress and date recorded outcomes (openclaw#153407) feat(gateway): preserve browser sign-in requirements before connecting (openclaw#157454) test(scripts): await CLI admission fixture lifetimes (openclaw#157424) fix(ci): preserve consumer selection across core type stripes (openclaw#157373) fix(wizard): preserve typed plugin enum values (openclaw#127577) (openclaw#138090) fix(qa): title mock Code Mode fixture calls refactor: simplify SQLite worker lifecycle and test fixtures (openclaw#157458) test: prebuild run-node signal fixture (openclaw#157478) refactor(exec): reuse approval policy rule keys (openclaw#157198) fix(ci): reuse prepared runtime for changed-target E2E shards (openclaw#157365) fix(config): apply Gateway writes without waiting for file events (openclaw#157372) fix: count recorded nested tool operations once (openclaw#157438) fix(telegram): stop leaking raw file:// markdown links in messages (openclaw#137810) refactor(claws): share resource capability changes (openclaw#154680) improve(channels): reduce redundant preparation for button messages (openclaw#157050) fix(build): package preparation fails on unrelated test types (openclaw#157318) refactor(claws): share bounded document reading (openclaw#157436) ... Co-authored-by: Vincent Koc <[email protected]>
Related: #148725
What Problem This Solves
Session-start and completion checks repeatedly rebuild the same SQLite queries, adding avoidable work after the transcript scan reduction in #148725.
User Impact
No user-visible behavior change is intended. Presence and freshness checks still read current SQLite state. There are no schema changes, migrations, configuration changes, or required user actions. At current head
7183dc46e6be6d771d29a6d9bf1cb8d62a3bce2f, the independently reviewed fixed workload has a median paired whole-workload process-CPU reduction of 29.36% across 10 AB/BA pairs, with lower CPU in 10/10 pairs. Short-window CPU regressions remain documented below; this is not a universal per-read or production-weighted claim.Why This Change Was Made
Prepare each fixed query once per physical database handle through the existing synchronous first-row helper. Each call still binds the current session ID and executes against SQLite; rows and native statements are not retained by these caches. The hot/cold presence query stays one statement, and mutation reads keep their existing transaction boundaries.
The two existing owners gain 41 production lines for bounded, connection-owned compiled queries; five real-SQLite regression cases add 209 test lines. This follows the existing prepared-read ownership pattern without a shared framework or new API.
Current head qualification
Current head:
7183dc46e6be6d771d29a6d9bf1cb8d62a3bce2f, treea0984ca32a41f63382aafc7527a0ca2ab19100c4. A signed additive merge includes frozen main0945dabbe487213e95e84a72ad1aae3659e0e000, whose parent is the landed CI repair #148885. All three PR files remain byte-for-byte unchanged from the reviewed3a7f88dhead; the PR still adds 41 production lines and 209 test lines.The refresh is necessary because GitHub retained the old merge ref after the one draft-to-ready cycle: CI 34945152541 checked out
cb7ae7cedb72eba301e2e182927a4ad9199c506f(3a7 into old main 5a826), despite the repaired main. That unusable run was cancelled, and its checkout/cancellation receipts are retained. No rebase or original-commit rewrite was used.Independent source review of the composed head found no interaction defect. All 43 current-head tests passed in one runtime shard and the requested order: 5 metadata, 4 prepared-read, 23 cold-read and 11 provenance cases. Fresh canonical P2 review was scoped clean. ClawSweeper Revision 12 reviewed this exact head with no correctness/security finding, no remaining Before merge item and no rank-up move. The one composed-head diagnostic completed and passed independent raw-result audit.
Hosted and targeted UI qualification passed: PR CI 34954423716, attempt 1, finished successfully with 123 successful and 16 skipped jobs, including
openclaw/ci-gate. Its preflight physically checked out the pre-verified integration18d65eadc9fc1f5e008e095db327439459c97384, tree4dee44c2abcb3cbc59620e2e60c8b657c30507ed, with parents0cd944c01416c4f9c1f6dc9d1dea9670c5b99caband7183dc46e6be6d771d29a6d9bf1cb8d62a3bce2f; workflow and checkout identities agree. This composition contains the corrected shard assignment and landed UI fixture. Native preparation selected successful exact-head Workflow Sanity 34954423706, attempt 1, alongside that successful CI run.Ordinary PR CI omits the real-Gateway UI lane. A separate native Blacksmith run on that exact
18d65eadintegration completed the private QA build and the complete existing automation-management file: 1 file, 1 case passed, with no unhandled test error and successful joined teardown. It used Linux x64 Node 24.20.0, pnpm 12.3.4, Vitest 5.0.0, Playwright 1.63.0 and the admitted system Chromium 144.0.7559.0. The real isolated Gateway used the real Telegram plugin with synthetic transport and a deterministic local Responses provider. Configured-owner list/get, true nonowner capability absence and unchanged job/run/audit state, and all five browser-admin actions passed, with seven management audits. Physical checkout, all 237 source/install pins, artifact-root binding and five build identities remained valid; the owned Testbox stopped after collection. Independent integrity/resource and full-file semantic reviews passed. Raw-result SHA256:cee433b1a529e0a1f6f5be528fddc39302d8d20b0dc1170d9970f0f34a9ad108; complete archive SHA256:05e0d67c2a289692e5fb0ee298aad04ff99667bb51708fc1fb29393cace84242.The UI raw log retains one nonfatal
chat.metadataUNAVAILABLE response after the seventh audit: “Session changed while preparing its metadata. Retry the request.” The existing response-currentness guard emits that message when its captured scope is superseded; this run does not identify which predicate changed. The automation assertions and teardown passed. Controllererrors: []does not mean the Gateway log contains zero errors. Post-error metadata recovery was not exercised.The earlier native exact-head CI 34950545836, attempt 1, remains failed historical evidence: 192 successful, 6 skipped and 3 failed jobs (the two test failures below plus the aggregate gate). Source and performance proof is bound to
7183dc46; integration CI and targeted UI proof is bound to18d65ead. Subsequentcb246e917d2014608de9ebfd556293cbd7637d89composition received a separate source-compatibility review, including the changed committed-reader disposal lifecycle; it does not acquire the earlier runtime measurements by inheritance. Native preparation passed with hosted exact-head gates, preserving the head and skipping a redundant push. The original main-side holds are resolved by the landed six-deletion Copilot syntax correction #149016 (ba441dd2d14e1d02dca72dd341cff28c360acaa2), auth correction #149004 (d872aaba81a769d76eabb1bec0b7ec4b8fc83354), and canonical fixture correction #149023 (1226eecf4ff909de172a6837422cfa64723fade8). Their ancestry in subsequently observed main is verified. Separate newer main follow-ups remain separately owned; this does not claim zero failures on every later main composition. Normal native merge guards remain mandatory.Preserved failed-job evidence: spawn production-boundary job 104320667187 failed the first of ten cases: the admitted descendant did not call the embedded runner within the existing 15-second assertion window. The other nine cases passed. A separate, single Linux x64 Node 24.20 diagnostic at this unchanged head passed all ten cases in their original order with the same assertion window and normal compiled-worker runner. It recorded 52 paired startup spans, no unmatched spans or timeline-write warnings, and completed Testbox cleanup. The successful instrumented run does not establish the cause of the earlier CI timeout or replace hosted qualification. Independent raw-integrity, resource-cleanup and semantic reviews passed for this successful run only. No timeout, assertion, production source or CI retry changed. Raw-result SHA256:
d624a83327d3ae54c2f61dc190b0a4981596b513ec265caf9d9d1799d96a2ce3.The real-Gateway UI job 104320661041 passed 58 of 59 cases. Its automation-management fixture configures both Telegram callers as owners but expects the second owner to be denied. The configured-owner policy from #148790 is already in this frozen head; the corresponding fixture correction from #148830 landed later and is present in the corrected canonical merge. Independent source review traced the management grant separately from the transcript query caches and confirmed this fixture/policy mismatch. The landed fixture covers configured-owner access, a true non-owner's absent capability and unchanged job/run state, and all five Control UI actions. The targeted proof above executed that corrected composition. No production permission change is proposed here.
The earlier CI 34946044907, attempt 1, checked merge
c8230d71969b4b4ac64ef68c923e51e6bd85a372into maina4b601e02ddbb9c740297e935fa293f2f7fc259b. Both additional-boundaries and compact-small-30 failed because main assigned the same 83 secrets tests to agents-tools and state-logging. Canonical #148826 has now landed as0cd944c01416c4f9c1f6dc9d1dea9670c5b99cab; the corrected merge's shard blobs are verified. One authorized close/reopen produced CI 34949964661, but its actual workflow/checkout still selected stalec8230d7despite the updated live merge ref. Both unusable runs were cancelled, and their exact logs, source identities and cancellation receipts remain preserved. No benchmark rerun, second toggle or head rewrite was used for the native dispatch route.Current complete-workload diagnostic and maintainer decision
The median paired process-CPU reduction is 29.364%, and paired wall-time reduction is 24.636%, each lower in 10/10 adjacent AB/BA pairs. These paired results differ from the ratios of independent medians below. All samples are retained.
The current run uses frozen main
0945dabbe487213e95e84a72ad1aae3659e0e000as A and composed7183dc46e6be6d771d29a6d9bf1cb8d62a3bce2fas B, with the same fixture, process order, warmups, measured calls and diagnostic instrumentation as the prior diagnostic. It retains 640 ordered batch measurements and 20 complete-workload envelopes, each covering 3,232 reader calls plus assertions and bookkeeping. Baseline/candidate warm compiler counts remain 8/0 for each owner, semantic checks passed, and source/input attestations remained unchanged.Current diagnostic measured-window medians per call (10 samples per variant/cell, 100 calls per sample):
Accepted costs and limits: ten-event freshness still increases 160.165% wall time / 132.597% process CPU in the measured window; 4096-event presence CPU increases 23.616%. The third warmup batch for one-event presence increases from 18.185 to 31.005 µs CPU per call (70.498%). Median peak RSS increases 4.957 MiB, from 372.180 to 377.137 MiB, with overlapping ranges (363.996–380.918 versus 365.789–380.578 MiB); this is not retained-memory proof. The complete workload captures the fixed workload's net CPU cost; it does not make every individual read faster.
Short-window thread attribution remains unreliable: 329/640 batches report zero current-thread CPU, and thread residuals exceed corresponding wall-time gaps. Raw process-minus-thread system components include negative estimates (−17 µs in an A batch, −8 µs in an A envelope, and −323 µs in a B envelope); these non-atomic estimates are retained without clamping. No kernel, GC or JIT cause is asserted.
Current maintainer decision: retain both existing-owner compiled-query caches for the independently verified fixed-workload benefit, explicitly accepting the costs above. Source, focused proof, canonical review, ClawSweeper and current measurement are qualified. Current integration CI and the targeted corrected UI proof have passed independent qualification. Native preparation has passed at the unchanged head, and the original main-side holds above are resolved. The prepared optimization is admitted to the normal native merge checks with its stated proof boundaries. No universal per-read, production-weighted, first-use, cold-archive, retained-memory or whole-Gateway benefit is claimed.
Controller SHA256:
0109d47d32b400542ab850e05cf8738db7ea9f3576810f988e17bb83ff1626ec; complete raw-result SHA256:79bfa3a7a856d36313314b3434cd3486dcc563226f86b533d858a1b934a49ecd. Native execution exited 0 and the exact Testbox lease is completed. All three earlier studies below remain separate historical evidence; none is relabeled as a measurement of the current head.Historical evidence
3a7f88d547d886dbb6b6a3e44890a07b8234d1c7: fresh bindings and rows without warm recompilation, strict fence advances and rollback, WAL snapshots, and distinct/closed/reopened handles.no-shadow. The original run exposed two test defects, now corrected: an empty session entry records its initial observation timestamp, and the identity assertion must avoid Vitest inspecting a closed SQLite handle. Null and lifecycle assertions remain intact.git diff --checkpassed. All three prior canonical P2 reviews were scoped clean, including signed head3a7f88d. Its ClawSweeper review found no correctness or security defect and requested resolution of the measured performance tradeoff. The completed diagnostic and maintainer decision below address that request on the unchanged head. CI run 34942170879, attempt 1, failed the services typecheck-root headroom test: the integration main tree already contains 702 roots against the 700-root limit. None of this PR's paths belongs to that shard. The failure is retained; unchanged CI has not been retried.8b37f332784420bbfb6677495c1069583a3aea90against narrow-reader baseline6563535db1d377e6c82cc55103dd8f5d1d36530e. Both owners compiled 8 queries for 8 warm reads on the baseline and 0 on the candidate. All semantic checks passed. Seven timing cells improved, but ten-event freshness regressed by 114% wall time and 166% process CPU at the median. That result is retained and unexplained; it is not treated as noise. The historical3a7f88drepeat used the identical workload and schedule. Its eight wall-time medians were lower; seven process-CPU medians were lower, but 4096-event presence CPU increased 21.7%. The first adverse cell did not repeat in the final uninstrumented run, but remains evidence. Neither result is attributed to GC, JIT, or noise. The separate diagnostic below measures the complete ordered workload and retains the short-window regressions.Historical first-run medians per call (10 samples per variant/cell, 100 calls per sample):
Historical final-repeat medians at
3a7f88d547d886dbb6b6a3e44890a07b8234d1c7(same baseline, 10 samples per variant/cell, 100 calls per sample):Both native runs completed with semantic parity, baseline 8/candidate 0 warm compiler calls per owner, all 160 timing samples, unchanged source/input attestations, and completed lease cleanup. No samples were dropped or retuned. First raw-result SHA256:
94bf3cc293821edaf4d24f99cc3101ce973afe15091f126fae18579b96baf72a; final:f297d700c88de498fcd11c91a1f04b395f4d24f1bd645d4609c407e9cab5e419. Final controller SHA256:f9bc6fac30cbc5fba8d4f3397ba9750d138b27ce9dfd790f5a7c42d3377d97d8.Historical complete-workload diagnostic and maintainer decision
The median paired process-CPU reduction is 23.70% across 10 adjacent AB/BA pairs, lower in 9/10 pairs; one pair increased 1.33%. Median paired wall-time reduction is 19.18%, lower in 8/10 pairs. These paired results are distinct from ratios of the independent medians below.
This separately instrumented diagnostic retains all 640 ordered batch measurements and 20 complete-workload envelopes. Each envelope spans the same 3,232 reader calls: 2,400 warmup calls, 800 measured calls, and 32 existing semantic-validation reads, plus assertions and intervening bookkeeping. Imports, fixture creation, compiler guards, output, and cleanup are outside that envelope. Both guards and all semantic checks passed; source and input hashes remained unchanged.
The distributions overlap. Diagnostic measured-window CPU still increased 29.81% for ten-event freshness and 14.27% for 4096-event presence. Current-thread counters are unsuitable for precise short-window attribution here: 314 of 640 batches report zero thread CPU, and thread residuals exceed the corresponding wall-time gaps. Process-wide complete-workload CPU includes the work omitted by isolated windows. No kernel, GC, or JIT cause is claimed. Instrumented results do not replace either retained uninstrumented study.
Historical 3a maintainer decision: retain both existing-owner compiled-query caches for the demonstrated fixed-workload reduction, explicitly accepting the documented short-window CPU costs and variance. This resolves the unchanged-head ClawSweeper rank-up request through complete measurement and an accepted tradeoff. No universal per-read, production-weighted, retained-memory, or whole-Gateway benefit is claimed. Fresh integration CI remains a landing requirement.
Diagnostic source:
3a7f88d547d886dbb6b6a3e44890a07b8234d1c7, same baseline6563535db1d377e6c82cc55103dd8f5d1d36530e. Controller SHA256:ee74b7189fb984d3a66a3dd3e9bd4b8713f0608c323f75e934114f26c22ed870; complete raw-result SHA256:56224714f5da446e6fa9dbcd7089830d0bb09397084512fe3747df3a97b76b01. The native run exited successfully and stopped its one-shot Testbox lease.Method: Node 24.19.0, Linux x64, Kysely 0.29.5; 20 balanced fresh timing processes, 8 cases each, 3 batches of 100 warmup calls per case. Compiler instrumentation runs in two separate untimed processes. This measures warm public reads on one canonical four-session SQLite database; it does not establish first-use, cold-archive restoration, retained-memory, or whole-Gateway improvement.