Skip to content

fix: keep conversation list reads from blocking the gateway - #149971

Merged
steipete merged 19 commits into
mainfrom
codex/async-session-metadata-ylwzwjhe
Sep 17, 2026
Merged

steipete merged 19 commits into
mainfrom
codex/async-session-metadata-ylwzwjhe

Conversation

@steipete

@steipete steipete commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Related: #149118

What Problem This Solves

Conversation-list reads scan and parse complete session inventories on the Gateway event loop, delaying other requests and streaming events. Repeated reads also lose reusable metadata when no writable database handle remains open.

User Impact

Inventory and selected-page reads use the existing SQLite broker, keeping the Gateway responsive while preserving complete ordered results and current access checks. Up to four independent inventories load concurrently. Cached and concurrent reads improve substantially in the qualified workload; first-use, reopen, and memory costs remain explicit below.

Implementation

The existing entry-cache owner retains reusable metadata and fences publication by generation. Admitted requests retain their snapshot through consumption; later callers cannot adopt a stale generation. Physical database identity, membership, caller identity, and configuration are checked again after awaited work. Filtering, sentinel lineage, and inherited-model behavior remain with their existing owners.

All started inventory reads settle before errors propagate, preserving target order and earlier admission-error precedence. Idle resources remain bounded to 64 observers and eight backends, while active reads and borrowed handles retain their claims until consumption and joined retirement finish. Bun retains its native metadata-read path.

Successful SQLite replies transfer their serialized buffers through the shared Git/SQLite owned-byte helper. Partial, shared, pooled, or marked storage is copied to an exact owned buffer first; framing, credits, error replies, and joined cleanup retain their existing contracts.

TypeBox remains native in ordinary Node builds so extension registrations and the external tool-dispatch validator share one Format/Settings registry. All canonical virtual extension subpaths remain supported. The earlier forced TypeBox bundle and the test-build exception it required are removed. Sealed builds retain their existing static-import bundling behavior.

Verification

Integrated public head: bdf730055946b55e83ee1ff60fdcb42eba1ccc8c.

  • Original concurrency regressions fail on the serial implementation. The concurrent implementation passes reversed completion, target/model order, admission, error precedence, and joining cases.

  • Reply-transfer proof covers complete Unicode/NUL/large payloads, bounded frames, sender ownership, and native Node/Bun cleanup. The original defect fails all 16 sender-ownership assertions without weakening data assertions.

  • Main integration passed 114 focused and sibling tests, the full build, selected checks, and fresh P2 review before the additional TypeBox repair.

  • The TypeBox repair passed 71 tests across six files, typed lint, formatting, the full build, and fresh P2 review. Its dependency-ownership regression fails before the fix. Real compiled extension loading, registered-tool wrapping, and agent-loop dispatch verify three valid controls execute and invalid format, missing-field, and exact-optional inputs are rejected before execution. The pre-fix built dispatcher demonstrably executed invalid custom-format input.

  • Integration against main de4cb3de1cad16023ff2d9becb537e3b500239b2 passed 157 focused tests across 16 files, with two existing Linux-only skips on macOS, and a fresh P2 review. All production feature files matched the qualified native-TypeBox candidate.

  • Integration against main 3421c79364b44384a11ef441f1f5434c7429cd0e preserves its independent maintenance-age owner and shared 30-minute recheck deadline. The async cache fences remain byte-identical to the previously qualified candidate. It passed 67 focused maintenance, async-read, admission and worker-lifecycle tests, with two existing Linux-only skips on macOS, core type checking, targeted typed lint, formatting, and a fresh P2 review.

  • Final integration against main c4987966826340590b00b6fa973684172d12300e retains its CPU diagnostics while awaiting inventories outside the synchronous CPU sample. The existing diagnostics test injects unrelated CPU during the asynchronous wait and keeps its original CPU, error, visibility and cache assertions. All 71 focused tests across five files passed, along with core and affected test types, typed lint, formatting, and fresh P2 review. The previously qualified cache, maintenance, TypeBox, concurrency and transport owners are unchanged.

  • Hosted CI exposed a missing shared-byte helper in the native PR wrapper source inventory. The unchanged cold-start tests reproduced both missing-module failures locally. Adding the helper to the canonical inventory passed 23 selected cold-start, materialized-wrapper and source-closure cases, with unchanged assertions and deadlines, plus fresh P2 review. Application runtime files are unchanged. Full CI 35192192827 passed on the reviewed head. Merged as 9ab47386778b, with native source verification and cleanup complete.

Performance and Tradeoffs

Linux comparison 35158442915 compared baseline 9e6026a90e9fdc084c21a9115b9d43775c32385d with the earlier 4eba963b1ee420fc8606a0939d21f8dbcca76e0c candidate: six stores, 5,000 rich rows each, four fresh processes in ABBA order, and 48 complete responses. It measured cached reads at 534 → 147 ms and four concurrent requests at 503 → 117 ms. Cached maximum timer gaps fell from 448 → 91 ms. First use was 1,214 → 1,298 ms and reopen 538 → 628 ms. These are small-cohort medians, not percentiles, and predate the native TypeBox repair.

The repair's separate macOS Node 24.21 comparison used the preserved bundled root runtime and repaired native root runtime with one identical pinned set of current external package outputs. Four fresh ABBA processes returned 32 identical complete responses with verified order, compiled import graphs, and joined cleanup. This isolates the local repair's marginal effect; it is not a preserved complete original build or replacement Linux qualification.

Local marginal comparison Bundled control Native TypeBox
First use 1,232 ms 1,619 ms
Cached 135 ms 138 ms
Reopened 786 ms 961 ms
Four concurrent requests 128 ms 128 ms

Restoring validation preserves warm responsiveness and adds cold/reopen cost. Response timestamps were validated against each row's snapshot time before normalizing only those exact fields; every other field and row order remained equal. No memory or CPU profiling ran in this comparison.

The earlier Linux candidate used approximately 1.74–1.75 GiB peak Node RSS versus 1.10–1.12 GiB baseline. Diagnostic run 35170787354 independently verified 1,035 artifact hashes, 96 complete responses, 96 heap checkpoints, seven observer smoke cases, and all final closures. The candidate adds three concurrently live broker threads in this fixture. Metadata workers showed natural heap declines and retired at reader release; the shared state worker survived until final lifecycle close. No worker remained after cleanup. The measured working-set cost is accepted alongside the responsiveness gains, but neither a long-term memory plateau, exact native-RSS attribution, nor a leak verdict is established. These historical memory measurements are not new-head memory measurements.

All owned Testboxes were stopped and verified completed. Failed/partial evidence and raw responses remain private; public evidence contains derived metrics and source/run identities. The workload contains metadata without transcript messages. Ordinary page-load acceptance on a deployed candidate remains unverified.

@clawsweeper

clawsweeper Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime size: XL maintainer Maintainer-authored PR labels Sep 16, 2026
@steipete
steipete marked this pull request as ready for review September 16, 2026 10:16
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 16, 2026
@clawsweeper

clawsweeper Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 17, 2026, 3:05 AM ET / 07:05 UTC (Revision 28).

ClawSweeper review

What this changes

Moves conversation-list database reads into bounded workers, preserves current access checks, transfers reply buffers, and keeps extension validation on shared TypeBox registries.

Merge readiness

⛔ Blocked before merge - 2 items remain

This remains useful work: current main still reads inventories synchronously. No blocking defect remains identified, the earlier TypeBox finding is addressed, and the PR explicitly accepts the measured memory tradeoff.

Priority: P2
Reviewed head: bdf730055946b55e83ee1ff60fdcb42eba1ccc8c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, well-supported performance work with no identified blocking defect and an explicitly accepted resource tradeoff.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The captured body records complete responses through the production Gateway/SQLite path on Linux and macOS, observed responsiveness gains, joined cleanup, and compiled extension-to-tool-dispatch rejection of invalid inputs. These qualified observations support the changed behavior; historical memory results are not current-head or sustained-load proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The captured body records complete responses through the production Gateway/SQLite path on Linux and macOS, observed responsiveness gains, joined cleanup, and compiled extension-to-tool-dispatch rejection of invalid inputs. These qualified observations support the changed behavior; historical memory results are not current-head or sustained-load proof.
Evidence reviewed 9 items Review continuity: Comparison against the immediately preceding reviewed head shows only the missing shared-byte helper added to the wrapper inventory; application runtime files are unchanged. The previous completed review recorded no findings.
Still necessary on current main: Fetched main still loops through durable targets using synchronous inventory reads. The merged #149118 improves exact metadata-cache reads but does not supply this asynchronous inventory path.
Bounded concurrency and lifecycle: Inventory preparation limits concurrency to four and joins started reads before ordered assembly. The runtime retains at most eight idle backends and 64 idle observers, pins active claims, checks admission after waits, and retains failed closes for joined recovery.
Findings None None.
Security None None.

How this fits together

The Gateway builds conversation lists from per-agent SQLite databases and returns filtered metadata to clients. This change moves inventory work off its event loop while retaining final visibility and membership checks.

flowchart TD
  A[Conversation list request] --> B[Resolve agent databases]
  B --> C[Bounded SQLite workers]
  C --> D[Metadata cache and ordered assembly]
  D --> E[Read selected page]
  E --> F[Recheck current access]
  F --> G[Filtered conversation response]
Loading

Before merge

  • Resolve merge risk (P1) - The accepted historical workload increased peak RSS by roughly 0.63 GiB; sustained current-head memory behavior on constrained hosts remains unmeasured.
  • Resolve merge risk (P1) - The native-TypeBox comparison preserves warm responsiveness but adds cold/reopen cost; ordinary deployed page-load performance remains unverified.
Agent review details

Security

None.

PR surface

Source +1193, Tests +1430, Docs +24, Other +3. Total +2650 across 48 files.

View PR surface stats
Area Files Added Removed Net
Source 22 1545 352 +1193
Tests 23 1574 144 +1430
Docs 1 26 2 +24
Config 0 0 0 0
Generated 0 0 0 0
Other 2 3 0 +3
Total 48 3148 498 +2650

Review metrics

Metric Value Why it matters
Production versus test growth Production/build net +1,195 lines; tests/support net +1,430 lines Production growth implements asynchronous reads and resource custody; the added coverage targets ordering, invalidation, access changes, and native cleanup.
Recorded responsiveness Cached reads 534→147 ms; maximum timer gap 448→91 ms The historical Linux comparison directly measures the event-loop responsiveness this PR aims to improve.

Merge-risk options

Maintainer options:

  1. Retain the documented tradeoff (recommended)
    Proceed under the memory tradeoff already accepted in the PR body, keeping the historical measurements and remaining limits visible.
  2. Qualify constrained-host capacity first
    Pause landing if supported deployment memory budgets require evidence beyond the recorded workload.

Technical review

Best possible solution:

Retain one metadata-cache owner and bounded worker lifecycle, with current access checks and the accepted memory and cold-start costs clearly documented.

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

Yes: current main synchronously scans complete inventories on the Gateway thread, and the recorded six-store workload demonstrates the resulting delays. This review inspected source without rerunning the workload.

Is this the best way to solve the issue?

Yes: the patch extends the existing SQLite broker and cache owner while preserving ordered results and final access checks; the measured resource tradeoff is explicitly accepted.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded Gateway performance improvement with a concrete large-inventory workload.
  • merge-risk: 🚨 availability: Additional concurrently live workers increased measured memory use, which can pressure constrained Gateway hosts despite improved responsiveness.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The captured body records complete responses through the production Gateway/SQLite path on Linux and macOS, observed responsiveness gains, joined cleanup, and compiled extension-to-tool-dispatch rejection of invalid inputs. These qualified observations support the changed behavior; historical memory results are not current-head or sustained-load proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured body records complete responses through the production Gateway/SQLite path on Linux and macOS, observed responsiveness gains, joined cleanup, and compiled extension-to-tool-dispatch rejection of invalid inputs. These qualified observations support the changed behavior; historical memory results are not current-head or sustained-load proof.

Evidence

What I checked:

  • Review continuity: Comparison against the immediately preceding reviewed head shows only the missing shared-byte helper added to the wrapper inventory; application runtime files are unchanged. The previous completed review recorded no findings. (scripts/pr-lib/wrapper-components.txt:710, bdf730055946)
  • Still necessary on current main: Fetched main still loops through durable targets using synchronous inventory reads. The merged fix(sessions): avoid saved-prompt reads when list metadata is current #149118 improves exact metadata-cache reads but does not supply this asynchronous inventory path. (src/config/sessions/combined-store-gateway.ts:613, 59f709f8f145)
  • Bounded concurrency and lifecycle: Inventory preparation limits concurrency to four and joins started reads before ordered assembly. The runtime retains at most eight idle backends and 64 idle observers, pins active claims, checks admission after waits, and retains failed closes for joined recovery. (src/config/sessions/session-accessor.sqlite-list-worker-runtime.ts:55, bdf730055946)
  • Final access checks: Selected-page consumption compares current configuration, access revision, profile and identity versions, membership identity, and database freshness. Changed facts trigger a bounded reread before visibility and permission decoration. Regression coverage exercises membership removal, external writes, identity changes, and configuration changes. (src/gateway/server-methods/sessions-read.ts:395, bdf730055946)
  • TypeBox finding addressed: The root build now externalizes TypeBox and its subpaths, matching the existing agent and validation package boundaries. The extension loader supplies all canonical TypeBox virtual subpaths; its physical-package-copy regression checks shared Format and Settings behavior. Tool argument validation resolves through OpenClaw's own agent-core, AI, and llm-core packages; this change does not depend on the Codex harness. (tsdown.config.ts:344, bdf730055946)
  • Dependency contract inspected: The npm metadata for TypeBox 1.3.30 verifies repository ownership. Reading its published archive in memory confirms that format validation consumes a module-local registry, unknown formats pass, and exact-optional validation consumes shared Settings. This supports preserving one native package instance. No dependency code was executed.

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (27 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-16T22:01:51.245Z sha e42ab0a :: blocked before merge. :: [P1] Preserve TypeBox registry identity through tool dispatch
  • reviewed 2026-09-16T22:32:35.281Z sha 4eba963 :: blocked before merge. :: [P1] Preserve TypeBox registry identity through tool dispatch
  • reviewed 2026-09-16T22:52:58.971Z sha 4eba963 :: blocked before merge. :: [P1] Preserve TypeBox registry identity through tool dispatch
  • reviewed 2026-09-16T23:07:53.311Z sha 4eba963 :: blocked before merge. :: [P1] Preserve TypeBox registry identity through tool dispatch
  • reviewed 2026-09-17T02:30:37.921Z sha 4eba963 :: blocked before merge. :: [P1] Preserve TypeBox registry identity through tool dispatch
  • reviewed 2026-09-17T05:49:33.678Z sha cacc081 :: blocked before merge. :: none
  • reviewed 2026-09-17T06:21:34.948Z sha d7ae001 :: blocked before merge. :: none
  • reviewed 2026-09-17T06:35:34.213Z sha 588778f :: blocked before merge. :: none

@steipete
steipete force-pushed the codex/async-session-metadata-ylwzwjhe branch from 9c5620b to e255752 Compare September 16, 2026 10:39
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 16, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 16, 2026
@steipete
steipete force-pushed the codex/async-session-metadata-ylwzwjhe branch from 154940c to 9479917 Compare September 16, 2026 13:26
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 16, 2026
Move cold Node session inventory and selected-page reads through the existing SQLite worker broker while preserving current final visibility and membership decisions. Bound idle worker references and reuse metadata without requiring a writable session handle.
Adopt the shared cache revision API and preserve the required worker module export. Synchronize the single-flight regression through loader-entry signals and settle requests before fixture cleanup.
Observe the current worker-store API across shared test module resets, await database resource drainage before durable reopen, and run native consumers in forked owners. Keep projection and target-preparation assertions at their actual owners without weakening physical admission or timeouts.
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts agents Agent runtime and tooling labels Sep 16, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 16, 2026
Prepare one target plan, preload at most four inventories, and assemble through the same ordered reader as synchronous callers. Join started reads before reporting failures and preserve earlier canonicalization and admission errors. The bounded candidate passes 65 focused cases and selected checks; latency and peak memory still require matched qualification.
Combine main 8dd36a0 with the
reviewed final-worker output drain from #150511 at
4ba658ce6c34443796e1d61a3f2230ba08de4041 for local integration proof.
Preserve the extracted model-source owner with the current reader
contract and keep final output drainage before owned reply transfer.

The public #149971 branch remains unchanged until its prerequisites land.
Validation: 114 focused tests passed; 2 existing Linux-only skips.
Full build, resolution formatting, and fresh independent P2 review passed.
Keep the extension loader and external tool-dispatch validator on the same
Format and Settings registries. Remove forced TypeBox bundling and the
legacy-finalizer exception it required; retain the canonical virtual
subpaths used by extensions and sealed builds.

The original compiled dispatcher executed custom-format-invalid arguments.
The repaired built flow rejects format, shape, and exact-optional failures
while preserving valid tool execution. Focused tests, full build, typed lint,
and independent review pass. A controlled local comparison preserves cached
and concurrent list latency, with additional first-use and reopen cost.
Preserve the reviewed metadata, model-source, and native TypeBox owners.
Keep final SQLite diagnostics drained before owned reply transfer and
retain current main's storage documentation and test inventory.

The full feature review and focused current-input integration tests pass.
@openclaw-barnacle openclaw-barnacle Bot removed the scripts Repository scripts label Sep 17, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 17, 2026
@steipete
steipete merged commit 9ab4738 into main Sep 17, 2026
210 of 212 checks passed
@steipete
steipete deleted the codex/async-session-metadata-ylwzwjhe branch September 17, 2026 09:06
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 18, 2026
…#149971)

* fix: keep conversation list reads from blocking the gateway

Move cold Node session inventory and selected-page reads through the existing SQLite worker broker while preserving current final visibility and membership decisions. Bound idle worker references and reuse metadata without requiring a writable session handle.

* fix: integrate session list workers with current cache ownership

Adopt the shared cache revision API and preserve the required worker module export. Synchronize the single-flight regression through loader-entry signals and settle requests before fixture cleanup.

* test: align session list consumers with worker ownership

Observe the current worker-store API across shared test module resets, await database resource drainage before durable reopen, and run native consumers in forked owners. Keep projection and target-preparation assertions at their actual owners without weakening physical admission or timeouts.

* fix: bound session-list observers through page consumption

* test: isolate model catalog read budget from background work

* perf(sessions): avoid host adapters in metadata workers

Keep grouped entry reads with the existing entry cache and membership queries in the sharing kernel. Use the existing Kysely facade directly for node-only queries so read workers avoid importing writable scope and lifecycle setup. Preserve canonical admission, cache, membership, and final page checks.

* test(voice-call): await routed bridge connections

* perf(build): bundle TypeBox with the shared runtime

* test: preserve native TypeBox imports in legacy finalizer

* perf: overlap independent session inventory reads

Prepare one target plan, preload at most four inventories, and assemble through the same ordered reader as synchronous callers. Join started reads before reporting failures and preserve earlier canonicalization and admission errors. The bounded candidate passes 65 focused cases and selected checks; latency and peak memory still require matched qualification.

* perf: transfer serialized SQLite worker replies

* fix(build): preserve native TypeBox validation registries

Keep the extension loader and external tool-dispatch validator on the same
Format and Settings registries. Remove forced TypeBox bundling and the
legacy-finalizer exception it required; retain the canonical virtual
subpaths used by extensions and sealed builds.

The original compiled dispatcher executed custom-format-invalid arguments.
The repaired built flow rejects format, shape, and exact-optional failures
while preserving valid tool execution. Focused tests, full build, typed lint,
and independent review pass. A controlled local comparison preserves cached
and concurrent list latency, with additional first-use and reopen cost.

* fix: include shared worker bytes in PR wrapper sources
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling channel: voice-call Channel integration: voice-call docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant