Two tuning knobs that were leaving most of the host idle:
1) vitest.config.ts pool=threads with maxThreads ≈ cores/2.
Default left this 64-core workstation at ~10% CPU during
\`pnpm test:run\`. Threads pool uses the box: same 152-file/2050-test
suite now runs at ~700% CPU instead of ~150%. Wall time gain is
modest (workload is dominated by a handful of slow individual files
that one thread must run serially), but the parallel headroom is
there for when the suite grows. Cap = max(2, cores/2) keeps laptops
reasonable; override with \`VITEST_MAX_THREADS=N\` in the env.
2) Dockerfile.mcpd uses BuildKit cache mounts on both pnpm install
steps. Adds \`# syntax=docker/dockerfile:1.6\` and a
\`--mount=type=cache,target=/root/.local/share/pnpm/store\` so
pnpm's content-addressed store survives across image rebuilds.
Cold rebuilds where the lockfile changed are unaffected; warm
rebuilds where only source changed drop the install step from
~60s to <5s. fulldeploy.sh's mcpd image rebuild gets that back
minus the docker push hash mismatch.
Test parity: 2050/2050 across 152 files; per-package mcpd 837/837.
Both unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The workspace-level \`pnpm test:run\` (which fulldeploy.sh runs as a
gate) was failing with \`localStorage is not defined\` on the new
src/web tests. Two intertwined causes:
1. vitest 4 deprecated \`vitest.workspace.ts\`. The file was being
silently ignored, so per-package configs (cli, mcpd, mcplocal)
weren't being honored under workspace mode either — the root
config was being used for all of them.
2. With the root config in charge, src/web/tests ran with the default
Node environment, no \`localStorage\` global, so the api wrapper's
test setup blew up.
Fix:
- Move workspace projects into the root \`vitest.config.ts\` under the
new \`projects\` array (the vitest 4 replacement).
- Add a proper \`src/web/vitest.config.ts\` (vitest 4 doesn't auto-pick
up vite.config.ts as a test config in workspace mode, even though
per-package \`pnpm --filter\` does).
- Exclude \`src/web/tests/**\` from the root-level include so we don't
double-run them under the wrong env.
After: \`pnpm test:run\` runs 1999/1999 across 149 files (was 1992/1996
with 4 web failures). Per-package runs unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Exclude src/db/tests from workspace vitest config (needs test DB)
- Make global-setup.ts gracefully skip when test DB unavailable
- Fix exactOptionalPropertyTypes issues in proxymodel-endpoint.ts
- Use proper ProxyModelPlugin type for getPluginHooks function
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add warmup() to LlmProvider interface for eager subprocess startup
- ManagedVllmProvider.warmup() starts vLLM in background on project load
- ProviderRegistry.warmupAll() triggers all managed providers
- NamedProvider proxies warmup() to inner provider
- paginate stage generates LLM-powered descriptive page titles when
available, cached by content hash, falls back to generic "Page N"
- project-mcp-endpoint calls warmupAll() on router creation so vLLM
is loading while the session initializes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>