Skip to content

fix(host): restore lazy listen for Bun equal-arm lean floor (~142–150 MB) - #1397

Merged
cursor[bot] merged 7 commits into
mainfrom
cursor/bun-density-peer-climb-a621
Oct 23, 2026
Merged

cursor[bot] merged 7 commits into
mainfrom
cursor/bun-density-peer-climb-a621

Conversation

@danielsmithdevelopment

@danielsmithdevelopment danielsmithdevelopment commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

Restore Oct-15 lazy HTTP listen (dynamic ensureClawqlApi + skip payments) so Bun --smol equal-arm lean floor stays ~130–150 MB Anonymous RSS after #1390, then climb toward peer band (~99–102 MB).

Host / Vitest fix

getClawqlApi() no longer sync-builds via the static composer + createRequire (that loaded CJS dist and broke Vitest with empty import.meta.url). Callers must await ensureClawqlApi() first (HTTP already did; tests/gRPC helpers boot after env/spec setup). Static ESM composer kept only for compose-horizontal-plugin-layers unit tests — not imported from adapters Ready path.

Evidence

  • Local vitest (previously failing suites): 74/74 then 48/48 green after ensure-boot + cuckoo vault cleanup retry
  • Memory plateau gate (prior push): pass

Next after merge

SQLite catalog OOP / further clawql-api lazy toward peer RSS.

Open in Web Open in Cursor 

cursoragent and others added 7 commits October 23, 2026 06:48
Eager clawql-payments + clawql-memory/pgvector (ONNX/sharp) at Ready made tip
Bun --smol plateau ~313 MB. Port skip-payments plugins, lazy vault-seed/dispose/
static composer, lazy WORM memory sink, and HTTP route lazy-loads. Tip lean
probe returns ~142 MB anon (idle ~83 MB, no onnx maps).

Co-authored-by: Daniel Smith <danielsmithdevelopment@gmail.com>
createMcpHttpApp now awaits ensureClawqlApi + wireOptionalToolDeps so
Vitest never hits createRequire() in the sync static composer (CJS
import.meta breakage when optional tiers are on). Keep local static
import of the composer module. Add heap-vs-anon lean remasure script +
CF fixtures; document tip lean ~142–150 MB after lazy listen.

Co-authored-by: Daniel Smith <danielsmithdevelopment@gmail.com>
GitHub Actions bot push left PR workflows in action_required; empty
commit from the PR author requeues CI without needing fork approval.

Co-authored-by: Daniel Smith <danielsmithdevelopment@gmail.com>
Drop the sync static-composer / createRequire fallback that broke Vitest
(CJS import.meta.url) when optional tiers loaded. Production and tests
must await ensureClawqlApi (dynamic composer); restore ESM static composer
for compose-horizontal unit tests only; boot API in gRPC parity helpers
and handler suites after env/spec setup.

Co-authored-by: Daniel Smith <danielsmithdevelopment@gmail.com>
Co-authored-by: Daniel Smith <danielsmithdevelopment@gmail.com>
@cursor
cursor Bot merged commit 5e7cd67 into main Oct 23, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants