Skip to content

feat(inference): thin clawql-inference/keys so Ready skips full barrel - #1400

Merged
cursor[bot] merged 7 commits into
mainfrom
cursor/inference-keys-ready-lazy-a621
Oct 23, 2026
Merged

cursor[bot] merged 7 commits into
mainfrom
cursor/inference-keys-ready-lazy-a621

Conversation

@danielsmithdevelopment

@danielsmithdevelopment danielsmithdevelopment commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

MCP HTTP Ready path imported clawql-inference (full barrel) via gateway-auth only for validateVirtualKey. This PR adds a dedicated clawql-inference/keys export and switches the host import so listen does not evaluate routing / payments / openai / cache.

Also clears tip OSV: drop unused ignore GHSA-vfj7-8cjw-p6xm, bump zod to 4.6.7 (GHSA-mrhx-c7xc-m3w5).

Changes

  • New packages/clawql-inference/src/keys/index.ts + package export ./keys + tsup entry
  • Split pure isBudgetExceeded into budget-check.ts (validate stays free of pricing)
  • src/composition/gateway-auth.ts → import … from "clawql-inference/keys"
  • zod@4.6.7 + overrides across host/packages/apps/infra/pulumi

Remasure (Bun --smol, equal-arm, N=2k)

Arm Anon median
Post-#1398 catalog-on ~138.4 MB
This PR keys + catalog-on ~136.2 MB (~2 MB)

Follow-up stacked PR: #1401 (~128 MB after clawql-api defer).

Test plan

  • npm run build -w clawql-inference
  • npm run test -w clawql-inference -- src/keys/ (12 passed)
  • Local osv-scanner exit 0 after zod bump
  • BUN_RUNTIME=1 BUN_SMOL=1 N=2000 npm run benchmark:heap-vs-anon-plateau
Open in Web Open in Cursor 

cursoragent and others added 3 commits October 23, 2026 18:58
Export validateVirtualKey via a dedicated package entry so mcp-http
listen does not evaluate the full inference barrel (routing, payments,
openai, cache). Split isBudgetExceeded into budget-check.ts so validate
stays free of pricing/gateway imports.

Co-authored-by: Daniel Smith <danielsmithdevelopment@gmail.com>
Equal-arm N=2k: keys+catalog-on ~136.2 MB anon median vs post-#1398
~138.4 MB (~2 MB). Publish JSON; next lever is clawql-api grpc/swagger
off the Ready graph (~34–37 MB peer gap remains).

Co-authored-by: Daniel Smith <danielsmithdevelopment@gmail.com>
cursoragent and others added 4 commits October 23, 2026 19:15
Co-authored-by: Daniel Smith <danielsmithdevelopment@gmail.com>
osv-scanner:latest hard-fails on unused IgnoredVulns; braces DoS now
surfaces as GHSA-q4gf-8mx6-v5v3 / CVE-2026-93687 (still in .trivyignore).

Co-authored-by: Daniel Smith <danielsmithdevelopment@gmail.com>
OSV tip now flags zod <4.6.6 (memory exhaustion on oversized arrays).
Pin/override 4.6.7 across host packages, apps locks, and infra/pulumi.

Co-authored-by: Daniel Smith <danielsmithdevelopment@gmail.com>
Parallel vitest forks contended on shared ~/.clawql/auth-audit.db
(database is locked) and failed Node 22/24/25 CI.

Co-authored-by: Daniel Smith <danielsmithdevelopment@gmail.com>
@cursor
cursor Bot merged commit a648804 into main Oct 23, 2026
35 of 36 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