Skip to content

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

Merged
thymikee merged 2 commits into
mainfrom
refactor/colocate-root-guards-2
Oct 15, 2026
Merged

thymikee merged 2 commits into
mainfrom
refactor/colocate-root-guards-2

Conversation

@thymikee

@thymikee thymikee commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

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

View guided diff Turn on auto-fix

thymikee and others added 2 commits October 15, 2026 16:21
… to test/repo-guards (pure git mv)

Path fixes follow in the next commit.

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

Root-relative paths, the check:command-docs script path, and path samples in gate tests and a workflow comment.

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

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 7 files

View guided diff | Turn on auto-fix | Re-trigger cubic

@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callstack.github.io/agent-device/pr-preview/pr-3680/

Built to branch gh-pages at 2026-10-15 15:35 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.24 MB 5.24 MB +3 B
Package (unpacked) 5.24 MB 5.24 MB +3 B
Package (download) 1.57 MB 1.57 MB +8 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 26.9 ms 27.3 ms +0.4 ms
CLI --help 76.7 ms 77.6 ms +0.8 ms

@thymikee

Copy link
Copy Markdown
Member Author

This PR is ready at fa2f289. The moved guards and the updated command-docs-gate path and unit-core include look correct.

Not blocking: the comments in test/integration/interaction-contract/index.ts and coverage-manifest.ts name src/tests/contracts/interaction-contract-coverage.test.ts, which this PR does not touch, so you can take or leave that.

I did not run the moved tests or pnpm check:command-docs locally. This is from reading the diff, the vitest config and git grep. The checks (Repo Guards, command-docs-gate, Typecheck & Package) are queued with none failed, and I see no overlap between the changed paths and a likely failure. No conflicts. Once those checks pass, it can merge.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 15, 2026
@thymikee
thymikee merged commit 2d177eb into main Oct 15, 2026
26 checks passed
@thymikee
thymikee deleted the refactor/colocate-root-guards-2 branch October 15, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant