Skip to content

refactor(dev): remove the minimal-registry escape hatch - #6163

Merged
waleedlatif1 merged 2 commits into
perf/tool-registry-boundary-guardfrom
perf/drop-minimal-registry
Aug 1, 2026
Merged

refactor(dev): remove the minimal-registry escape hatch#6163
waleedlatif1 merged 2 commits into
perf/tool-registry-boundary-guardfrom
perf/drop-minimal-registry

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Layer 6 of stack #6162. Pure deletion — 327 lines removed, 0 added.

Why it can go now

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. Measured on the canvas:

dev:minimal cold win
before this stack 31.7s → 20.0s (−37%)
after this stack 22.9s → 20.7s (−10%)

A 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.ts are 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.
  • It required alias config in both bundler branches — the entire webpack() hook in next.config.ts existed solely for this and goes with it.
  • It is actively misleading: the mode silently drops ~250 services and ~280 blocks, so a bug reproduced (or not reproduced) under it may not hold for real.

Removed

tools/registry.minimal.ts, blocks/registry-maps.minimal.ts, the SIM_DEV_MINIMAL_REGISTRY branch and webpack() hook in next.config.ts, and the dev:minimal / dev:full:minimal-registry scripts. No references remain anywhere in the repo.

Verified after removal

  • tsc --noEmit clean
  • check:tool-registry-boundary, tool-metadata:check, skills:check, check:boundaries all pass
  • Both package.json files still parse
  • next dev starts (Ready in 256ms) and serves the canvas: 22.6s cold, HTTP 200
  • biome clean

@waleedlatif1
waleedlatif1 requested a review from a team as a code owner August 1, 2026 17:25
@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 1, 2026 6:22pm

Request Review

@cursor

cursor Bot commented Aug 1, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Pure deletion of dev-only aliases and duplicate registries with no production path changes; only risk is developers on constrained machines losing a faster-but-incomplete dev mode (~10% cold-start win per the PR).

Overview
Removes the SIM_DEV_MINIMAL_REGISTRY dev escape hatch that aliased @/tools/registry and @/blocks/registry-maps to hand-curated minimal files so Turbopack/webpack compiled a smaller integration graph.

Deletes tools/registry.minimal.ts and blocks/registry-maps.minimal.ts, strips the Turbopack resolveAlias entries and the webpack hook that only served those aliases from next.config.ts, and drops dev:minimal and dev:full:minimal-registry from the root and apps/sim package scripts. Local dev always uses the full registries; production behavior is unchanged because minimal mode was never enabled outside dev.

Reviewed by Cursor Bugbot for commit 2c0c140. Configure here.

`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.
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.
@waleedlatif1
waleedlatif1 merged commit 03649e9 into staging Aug 1, 2026
27 checks passed
@waleedlatif1
waleedlatif1 deleted the perf/drop-minimal-registry branch August 2, 2026 00:00
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.

1 participant