refactor(dev): remove the minimal-registry escape hatch - #6163
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview Deletes Reviewed by Cursor Bugbot for commit 2c0c140. Configure here. |
2c0c140 to
55bba2d
Compare
55bba2d to
e7c6948
Compare
e7c6948 to
472e702
Compare
`dev:minimal` existed because the tool registry was 71-82% of every workspace route's module graph and aliasing it away was the only way to make dev bearable. The metadata work removed that reason, so the hatch now buys almost nothing: before this stack 31.7s -> 20.0s cold (-37%) after this stack 22.9s -> 20.7s cold (-10%) A 10% cold-compile win, on the run that happens once — restarts are ~4.2s either way — is not worth what it costs. `tools/registry.minimal.ts` and `blocks/registry-maps.minimal.ts` are 283 lines of hand-curated duplicates of the real registries that **nothing keeps in sync** (no lint, no CI check, no test); they are correct today only because someone remembered. And the mode is actively misleading: it silently drops ~250 services and ~280 blocks, so anything reproduced under it may not reproduce for real. Removes both files, the `SIM_DEV_MINIMAL_REGISTRY` branch from `next.config.ts` (including the whole `webpack()` hook, which existed only for this), and the `dev:minimal` / `dev:full:minimal-registry` scripts. Verified after removal: `tsc` clean, boundary + metadata + skills + monorepo gates pass, and `next dev` starts and serves the canvas at 22.6s cold / HTTP 200.
472e702 to
3096d3e
Compare
The setup wizard prompted for a dev server on machines under 16GB and **defaulted** to `dev:full:minimal-registry` — a script this stack deletes. Anyone running `bun run setup` on a low-RAM machine would have accepted the default and hit "Script not found", which is exactly the contributor the mode existed to help. Repointed at `dev:full:capped`, which still exists and caps Node at 4GB without dropping ~250 integrations — a strictly better answer to the same question. The hints were also stale: they warned the full registry "can use 4-5GB+ on its own", which was true when a dev server sat at 11.5GB. It now sits at ~4GB, so they say that instead. Missed by an earlier sweep because the pattern searched for `dev:minimal` and `registry.minimal`, and this string is `dev:full:minimal-registry` — the two halves reversed. Re-swept across every file type for all spellings: zero references remain. Also audited every script value the wizard can return, so the class of bug is checked, not just this instance.
Why it can go now
dev:minimalexisted because the tool registry was 71–82% of every workspace route's module graph, and aliasing it away was the only way to make dev bearable. The metadata work removed that reason. Measured on the canvas:dev:minimalcold winA 10% win on the run that happens once — restarts are ~4.2s either way — is not worth what it costs.
What it cost
tools/registry.minimal.ts+blocks/registry-maps.minimal.tsare 283 lines of hand-curated duplicates of the real registries that nothing keeps in sync — no lint, no CI check, no test. I verified they're correct today (84 entries, 0 stale), but only because someone remembered.webpack()hook innext.config.tsexisted solely for this and goes with it.Removed
tools/registry.minimal.ts,blocks/registry-maps.minimal.ts, theSIM_DEV_MINIMAL_REGISTRYbranch andwebpack()hook innext.config.ts, and thedev:minimal/dev:full:minimal-registryscripts. No references remain anywhere in the repo.Verified after removal
tsc --noEmitcleancheck:tool-registry-boundary,tool-metadata:check,skills:check,check:boundariesall passpackage.jsonfiles still parsenext devstarts (Ready in 256ms) and serves the canvas: 22.6s cold, HTTP 200