Repository navigation
Runtime map: make the composed runtime discoverable and type-safe - #428
Conversation
The auth-ui deletion (c747a61) left references to a workspace that no longer exists. Remove the dead paths and correct the docs that pointed at them: - changesets: drop the @everything-dev/auth-plugin entry (16 files carried it; a workspace-member check fails the release workflow) — 4 deleted as auth-plugin-only, 11 reflowed to their local bumps - ui/src/styles.css: drop a Tailwind @source pointing at the deleted dir - docs: rewrite better-auth-referral.md (auth is remote; upstream pointers), add dated banners to the pre-break-off walkthroughs, fix the README "fork exists in this repo" claim - SECURITY.md / ui/README.md / ui/DESIGN.md / ui/public/skill.md / ui/package.json: pnpm not bun; drop the dead generate-metadata script - regression: add a frozen-snapshot provenance header to fixtures/auth/schema, fix dead-path comments in csr-compose/member-seed/auth-test-instance - docker-compose: note the auth DB's DDL owner is the remote plugin Verified: pnpm run lint, pnpm run typecheck, pnpm run test:regression:unit.
scripts/gen-runtime-map.mjs reads the resolved config, loads local and remote ui manifests (remote route manifests live at <ui.production>/manifest.gen.json), applies the host's core-wins precedence statically, and emits .bos/generated/runtime-map.json plus ui/src/lib/runtime-map.gen.ts (REMOTE_ROUTES / RemotePath / sources / mounts / shadowed / UNRESOLVED_SOURCES). - wired into types:gen; loud on an unresolved remote fetch (BOS_MAP_ALLOW_UNRESOLVED=1 escapes for offline work) - verify-runtime-map.mjs cross-checks the static model against the real constructTree engine (46/46 paths, identical mountCounts) - deterministic unit tests wired as test:runtime-map and into pnpm test Spike verdict (posted to everything-dev#345): native `to` typing needs full regeneration in the upstream typegen — FileRoutesByPath augmentation cannot widen RoutePaths, which reads the tree's baked-in fileRouteTypes. No interim cast shipped (everything-dev#346). Verified: pnpm run lint, pnpm --dir ui run typecheck, pnpm run test:runtime-map, pnpm run verify:runtime-map.
FOCUSED_PREFIXES and the settings-section labels now derive from the generated REMOTE_ROUTES union, so an upstream route rename fails typecheck instead of silently mismatching: - _public.tsx: FOCUSED_PREFIXES satisfies readonly RemotePath[] - breadcrumbs.ts: settings section keys satisfy Partial<Record<RemoteSettingsSection, string>>, derived from RemotePath Navigational breadcrumb paths stay widened strings until the composed tree is registered (ticket 04 / everything-dev#346). Verified: pnpm run lint, pnpm --dir ui run typecheck, negative typo test.
…DRs) AGENTS.md is the first interface every agent crosses and it described the pre-break-off fork. Correct it and add the authored runtime map: - docs/runtime-map.md: sources (core ui local, auth remote, plugins local), mounts + core-wins precedence, the three ways to change a screen, the upstream PR → release → pin-bump loop, pluginPath boundary, known limits - AGENTS.md: local vs remote plugins; Runtime map section; mount-based auth sample (the /_layout sample did not exist); primitives vs colocated feature components; runtime-map.gen.ts in Generated Types - docs/adr/README.md: resolve cited ADR numbers to upstream URLs - GLOSSARY.md: pointer to CONTEXT.md; docs/agents/domain.md updated to the real child-runtime layout - everything-dev-app skill: bos.app.ts, bos deploy, pnpm dlx, composition skill pointer Verified: pnpm run lint, pnpm run typecheck.
The <30s loop existed but was undocumented, and dev:csr was implemented in regression-env.mjs yet reachable by no script. - tests/README.md: which-harness table, fast suites (in-process PGlite, no docker), Playwright commands (one spec + --grep), prerequisites, the 5-min webServer budget / no-reuse / stall watchdog, non-gating CI, the Stack x Variant reconciliation, coverage map, auth-fixture drift note - playwright.config.mjs: project name is the active REGRESSION_MODE, so --project=dev:csr is valid - scripts: regression:dev:csr, test:regression:browser:dev:csr, test:regression:browser:all Verified: pnpm run lint, pnpm run test:regression:unit, and REGRESSION_MODE=dev:csr playwright --list (53 tests).
|
Retro follow-up just opened as #431 (stacked PR, branch Heads-up on a merge conflict: #416 ( Upstream pairing for this PR's sync-owned edits (root |
# Conflicts: # tests/regression/fixtures/auth/schema.ts
Why
Agents (and humans) working in this child runtime can't answer the two questions that decide every change: who owns this screen? and where does this change belong? The mechanisms are sound — core-wins route claiming, in-process plugin clients, manifest composition — but none of it was discoverable from the repo, and the auth-ui break-off (
c747a6195) left a wake of references to a workspace that no longer exists.This PR makes the composition surface generated, not guessed, and corrects the docs that taught the old shape.
What changed (5 commits)
chore: sweep post-break-off stale references— deadplugins/authdocs, 16 changesets referencing the absent@everything-dev/auth-plugin(stripped 11, deleted 5 auth-only), a Tailwind@sourcepointing at the deleted dir, bun→pnpm in SECURITY/ui docs, deadgenerate-metadatascript, frozen-snapshot provenance header on the auth fixture schema.feat(runtime-map): generate the composed route inventory—scripts/gen-runtime-map.mjsreads the resolved config, loads local + remote ui manifests (remote route manifests live at<ui.production>/manifest.gen.json), applies core-wins statically, and emits.bos/generated/runtime-map.json+ui/src/lib/runtime-map.gen.ts(REMOTE_ROUTES,RemotePath, sources, mounts, shadowed, unresolved). Loud on a failed remote fetch (BOS_MAP_ALLOW_UNRESOLVED=1escapes offline). Wired intotypes:gen.feat(ui): type non-navigational plugin paths against the runtime map—FOCUSED_PREFIXESand settings-section keys derive fromRemotePath; an upstream rename now fails typecheck.docs: make the composition story discoverable— newdocs/runtime-map.md(sources, mounts, core-wins, three change routes, upstream loop,pluginPathboundary, known limits), AGENTS.md truth pass (local vs remote plugins, mount-based auth sample, component placement),docs/adr/README.mdindex,GLOSSARY.md→CONTEXT.md,everything-dev-appskill fixes.docs(tests): document the harnesses and wire the dev:csr suite—tests/README.md(which-harness table, fast loops, Playwright prerequisites/cost, coverage map), anddev:csris now reachable (--project=dev:csr, 53 tests).Verification
pnpm run lint— greenpnpm run typecheck— green (all workspaces; regenerates the map)pnpm run test— green (api, ui, plugins, runtime-map)pnpm run verify:runtime-map— static model vs the realconstructTree: 46/46 paths, identical mount countsREGRESSION_MODE=dev:csr … playwright --list— 53 tests under[dev:csr]Upstream
toneeds full regeneration in the upstream typegen;FileRoutesByPathaugmentation cannot widenRoutePaths)Not included
Native
tofor plugin paths (ticket 04) is blocked on everything-dev#346 ("no interim casts"). A local type widening would be a fiction; the generator + verdict are the upstream-ready reference instead.pluginPathremains the documented boundary.