Skip to content

test: split module tests by owner, with pins a removal walk leaves standing - #1

Merged
lroy-stack merged 5 commits into
mainfrom
feat/m4d2-split-by-owner
Nov 5, 2026
Merged

lroy-stack merged 5 commits into
mainfrom
feat/m4d2-split-by-owner

Conversation

@lroy-stack

Copy link
Copy Markdown
Owner

Plan 006 M4d-2 (ADR 0017 §7): a path has one owner, and removing a module must break no test outside its own paths.

What

  • Approvals: the kernel's mechanism cases run on a settings change; module cases move to approvals.{bookings,customers,notifications}.test.ts with a shared testkit.
  • MCP server: the kernel keeps generic cases, logs, refusals and instruction checks derived from the installed modules; each module's PINNED rows (unchanged, including spec 012 R4's staff rows) move to mcp.server.<module>.test.ts, and itPinsToolsOf requires an owner's rows to name exactly its tools.
  • mcp-manifest type cases on kernel ids; bookings/customers cases into module files.
  • Fixtures derived from the installed modules; the generator test compares the census for installed modules only.
  • e2e: route sweeps visit installed routes; the bookings pills case moves to bookings-touch.spec.ts; the settings case opens the menu from the default dashboard; dead-click exceptions skip deleted routes.

How verified

  • tsc, npm test (5767 tests, none deleted), npm run check, npm run build; docs/mcp/reference.md unchanged.
  • A catalog removal walk on a copied tree leaves failures only in the presets and plan 006's exclusions.
  • Mutations: swapping id sources between labels, or dropping the "and" from the noun list, fails the instruction checks; dropping a PINNED row or an owns line fails a test.
  • e2e not run locally (no memory for a browser on the shared machine): this PR's CI runs the smoke.

🤖 Generated with Claude Code

lroy-stack and others added 5 commits November 5, 2026 06:50
…anding

ADR 0017 §7, plan 006 M4d-2: a path has one owner, and removing a module
must break no test outside its own paths.

- Approvals: the kernel's mechanism cases (hold then approve, expiry,
  conflicts, who may decide, the queue, the same tick) run on a settings
  change; the module cases move to approvals.{bookings,customers,
  notifications}.test.ts, sharing approvals.testkit.ts. A harmless write
  and the keyed replay have no kernel equivalent and stay with bookings
  and customers.
- The MCP server tests: the kernel keeps the generic cases, the logs, the
  refusals and instruction checks derived from the installed modules (the
  nouns in order, each id source under its own label, the keyed tools);
  each module's PINNED rows, unchanged, move to mcp.server.<module>.test.ts,
  and `itPinsToolsOf` requires an owner's rows to name exactly its tools.
- mcp-manifest's type cases use kernel ids; its bookings and customers
  cases, and the composition without customers, move to module files.
- Settings and bookings.create cases move to bookings.test.ts; the
  optional-references, contracts and nav-model fixtures derive from the
  installed modules and the salon's nav; the generator test compares the
  census for installed modules and derives each refusal from the graph.
- e2e: the touch and hydration sweeps visit installed routes only, the
  bookings pills case moves to bookings-touch.spec.ts, the settings case
  opens the menu from the default dashboard, and dead-click exceptions
  skip deleted routes.
- Every new module file is in its module's `owns`.

5629 tests, none deleted. A catalog removal walk leaves failures only in
the presets and plan 006's exclusions. Swapping id sources between labels,
or dropping the "and" from the noun list, now fails the instruction checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…product views)

The tree equals feat/m4d2-split-by-owner-v2: M4d-2 rebased on main 6043a74,
with the parties and inventory PINNED rows and parties' held write in their
own module files, and the client-map pins derived from the installed
modules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	src/config/approvals.test.ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	src/config/approvals.test.ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	src/config/mcp.server.test.ts
@lroy-stack
lroy-stack merged commit 38db1b6 into main Nov 5, 2026
14 checks passed
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