refactor(move): move the interaction-guarantee and command-doc guards to test/repo-guards

Merged
TH
13h ago
+8-8

Summary

Class i, two more artifact guards move from src/__tests__ to test/repo-guards/ (already selected by the test/repo-guards/*.test.ts entry from #3663), keeping their names:

  • contracts/interaction-guarantees (+ its helper runner-source-assertions.ts): the ADR 0011 matrix gate asserts that every via symbol exists in the referenced module or Swift runner source and every waiver carries a reason. It reads repo files, not one contracts module.
  • command-doc-coverage: pins PUBLIC_COMMANDS against website/docs/docs/commands.md in both directions. It is the check:command-docs gate, so its callers move with it.

Commit 1 is a pure git mv (0 content lines). Commit 2 fixes the repo-root path in the helper, the two schema imports, the check:command-docs script path in package.json, path samples in scripts/gate/model.test.ts and scripts/check-affected/device-lanes.test.ts, and the pr-preview.yml comment that names the file. No new vitest project, exports, barrel or fixture change.

Validation

Head fa2f28987: check:quick, check:layering, check:fallow, check:gate-manifest, check:affected --run (full set, because package.json and a workflow changed) and pnpm format pass.

  • Parity: 21 before, 21 after: interaction-guarantees 9, command-doc-coverage 12.
  • Selection: both run under unit-core; pnpm check:command-docs still runs the moved file (12 passed); the check:affected:test suite (66) and scripts/gate/model.test.ts (7) pass with the edited samples.
  • Still guards: pointing the helper's repo root one level too high makes interaction-guarantees fail 2 of 9 (runner source not found); restored.
  • vi.mock: none.
  • Orphans: 57 on main now, 55 on this branch.

🤖 Generated with Claude Code