dashboard: composition-hygiene — no silent fake defaults, fakes out of the shipped tree #215

Closed
opened 2026-07-30 23:20:47 +00:00 by ben · 1 comment
Owner

Parent

Shell spec #22. Gap audit 2026-07-30 (post #191–#195 sweep). Not on #183's journey — hardening filed alongside the blocker set, confirmed by Ben.

What's true today

  • The production composition spreads the all-fakes default deps first and overrides every slot after — inert today, but any slot added to the deps type tomorrow silently defaults to a fake instead of failing to compile. The exact failure mode ADR 0100 exists to prevent, one field-addition away.
  • Roughly forty fake classes live in the shipped source tree (not the test tree), constructed on every production boot via that spread and bundled with any future build.

What to build

Drop the spread: every production slot explicit, so a new slot is a compile error until wired real or deliberately fail-loud. Relocate the fakes to test-side homes (keeping the seam-test fakes importable — they are contract artifacts, just not shippable ones). No behavior change to any live surface.

Acceptance criteria

  • Given a new slot added to the deps type, When the production composition compiles, Then it fails until the slot is explicitly wired — never a silent fake default
  • Given the production entry's import graph, Then no fake class is reachable from it
  • Given the test suites, Then green and unchanged — the fakes still serve the seams from their new homes

Task manifest

task: dashboard:composition-hygiene
implements_seam: "ADR 0100 enforced by construction in the dashboard composition"
interface: "the production deps value, fake-free by type"
seam: "the existing suites + a compile-level guarantee (explicit slots)"
acceptance:
  - given: the refactor; when: suites run and the production graph is traced; then: green, and no fake reachable from the production entry
depends_on: []
out_of_scope: [any behavior change, the app-side composition (already dev/prod split by build tags)]
needs_human_decision: []

Blocks

None — prefactoring that keeps the blocker set honest as it lands.

## Parent Shell spec #22. Gap audit 2026-07-30 (post #191–#195 sweep). Not on #183's journey — hardening filed alongside the blocker set, confirmed by Ben. ## What's true today - The production composition spreads the all-fakes default deps first and overrides every slot after — inert today, but any slot added to the deps type tomorrow silently defaults to a fake instead of failing to compile. The exact failure mode ADR 0100 exists to prevent, one field-addition away. - Roughly forty fake classes live in the shipped source tree (not the test tree), constructed on every production boot via that spread and bundled with any future build. ## What to build Drop the spread: every production slot explicit, so a new slot is a compile error until wired real or deliberately fail-loud. Relocate the fakes to test-side homes (keeping the seam-test fakes importable — they are contract artifacts, just not shippable ones). No behavior change to any live surface. ## Acceptance criteria - [ ] Given a new slot added to the deps type, When the production composition compiles, Then it fails until the slot is explicitly wired — never a silent fake default - [ ] Given the production entry's import graph, Then no fake class is reachable from it - [ ] Given the test suites, Then green and unchanged — the fakes still serve the seams from their new homes ## Task manifest ```yaml task: dashboard:composition-hygiene implements_seam: "ADR 0100 enforced by construction in the dashboard composition" interface: "the production deps value, fake-free by type" seam: "the existing suites + a compile-level guarantee (explicit slots)" acceptance: - given: the refactor; when: suites run and the production graph is traced; then: green, and no fake reachable from the production entry depends_on: [] out_of_scope: [any behavior change, the app-side composition (already dev/prod split by build tags)] needs_human_decision: [] ``` ## Blocks None — prefactoring that keeps the blocker set honest as it lands.
Author
Owner

Landed in edbefe9 on main.

What shipped: the dashboard production composition is fake-free by construction (ADR 0100).

  • AC1 (compile guarantee): dropped the ...defaultDashboardDeps() all-fakes spread; productionDashboardDeps now wires every slot explicitly against an annotated DashboardDeps literal. Proven: adding an unwired required slot to DashboardDeps fails vue-tsc with TS2741 — never a silent fake default.
  • AC2 (no fake reachable): mountRegistry.ts imports only types from the feature libs; all ~33 Fake… classes relocated out of dashboard/src/lib into dashboard/tests/fakes/<m>.ts, and the fake-backed composition to dashboard/tests/support/defaultDashboardDeps.ts. Only reachability.tss FakeReachabilitySource remains in src (a chrome slot outside the deps value — #214s territory). bootstrapDashboard fail-louds rather than fabricate a fake-backed frame when given neither deps nor transport.
  • AC3 (suites green from new homes): vitest green — 687 tests, 66 files, unchanged.

Seam/evidence: dashboard/tests/unit/compositionHygiene.test.ts — a runtime check (the production deps value carries no Fake… instance) and a static import-graph trace from mountRegistry.ts (reaches no export class Fake). Dashboard vue-tsc + repo eslint clean. No behaviour change to any live surface. STATUS.md updated in the same commit.

Landed in `edbefe9` on main. **What shipped:** the dashboard production composition is fake-free by construction (ADR 0100). - **AC1 (compile guarantee):** dropped the `...defaultDashboardDeps()` all-fakes spread; `productionDashboardDeps` now wires every slot explicitly against an annotated `DashboardDeps` literal. Proven: adding an unwired required slot to `DashboardDeps` fails `vue-tsc` with `TS2741` — never a silent fake default. - **AC2 (no fake reachable):** `mountRegistry.ts` imports only *types* from the feature libs; all ~33 `Fake…` classes relocated out of `dashboard/src/lib` into `dashboard/tests/fakes/<m>.ts`, and the fake-backed composition to `dashboard/tests/support/defaultDashboardDeps.ts`. Only `reachability.ts`s `FakeReachabilitySource` remains in `src` (a chrome slot outside the deps value — #214s territory). `bootstrapDashboard` fail-louds rather than fabricate a fake-backed frame when given neither `deps` nor `transport`. - **AC3 (suites green from new homes):** vitest green — 687 tests, 66 files, unchanged. **Seam/evidence:** `dashboard/tests/unit/compositionHygiene.test.ts` — a runtime check (the production deps value carries no `Fake…` instance) and a static import-graph trace from `mountRegistry.ts` (reaches no `export class Fake`). Dashboard `vue-tsc` + repo `eslint` clean. No behaviour change to any live surface. STATUS.md updated in the same commit.
ben closed this issue 2026-07-31 00:15:45 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#215
No description provided.