Skip to content

test: preset-owned contract ids, evals per module, a probe through settings - #2

Merged
lroy-stack merged 2 commits into
mainfrom
feat/m4d3-preset-fixtures
Nov 5, 2026
Merged

lroy-stack merged 2 commits into
mainfrom
feat/m4d3-preset-fixtures

Conversation

@lroy-stack

Copy link
Copy Markdown
Owner

Plan 006 M4d-3 (ADR 0017 §7): modules know no preset, and the scripts stay with the kernel and degrade when a module is removed.

What

  • Each preset owns contractIds by module, beside leakTerms; the adapter-contract testkit reads them on demand (idOf, minuteOf); bookings.test.ts no longer repeats them; a contract case refuses ids for a module the preset does not enable.
  • Golden tasks move to evals/mcp/tasks/<module>.json and transcripts to evals/mcp/fixtures/<module>/, each module-owned; eval-mcp.ts merges the installed modules' task files (from MODULES); the eval tests split per module and the kernel's cases derive from the installed files.
  • probe-consistency writes through the kernel: the trade name on the Settings page (web, consent), and a held settings_values_update read back with approvals_get (mcp). Guides updated.

How verified

  • tsc, npm run check, npm run build, generate:modules (no changes), docs/mcp/reference.md unchanged.
  • npm test: 5905 tests before the rebase. On the rebased tree the machine was at load 40+ and four unrelated cases timed out; they pass in isolation (56 + 476). This PR's CI is the authoritative run.
  • The probe needs a live deployment and was not run; its Settings labels match the screen's dictionary and the settings e2e.

🤖 Generated with Claude Code

lroy-stack and others added 2 commits November 5, 2026 15:10
…ttings

ADR 0017 §7, plan 006 M4d-3: modules know no preset, and the scripts stay
with the kernel and degrade when a module is removed.

- Each preset owns `contractIds`, by module (a late booking, a free
  resource and minute, the first customer and party), beside `leakTerms`.
  The adapter-contract testkit reads them on demand through `idOf` and
  `minuteOf`, so an input needs only its own module's ids; the bookings
  test no longer repeats them; a contract case refuses ids for a module the
  preset does not enable, so a removal names the preset line to edit.
- The MCP golden tasks move into `evals/mcp/tasks/<module>.json` and their
  transcripts into `evals/mcp/fixtures/<module>/`, each owned by its module;
  `golden.json` keeps the version and the system prompt. `eval-mcp.ts`
  merges the task files of the installed modules (from `MODULES`), so a
  removed module's tasks are simply absent. The tests split per module;
  the kernel's cases derive from the installed task files.
- `probe-consistency` writes through the kernel: the web and consent modes
  change the trade name on the Settings page, and the mcp mode holds a
  `settings_values_update` and reads it back with `approvals_get`. The
  guides say so. The probe needs a live deployment and was not run here.

5905 tests pass; nothing is deleted. The golden tasks now run in module id
order (bookings before customers).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lroy-stack
lroy-stack merged commit ecbdf04 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