Repository navigation
Labels
area: architectureArchitecture, design debt, major refactors, or maintainabilityarea: ciCI workflows, checks, release automation, or GitHub Actions
Description
Objective
Add an exception-free repository check that rejects accidental Vitest test registration from helper and other non-suite modules.
Prerequisite cleanup
Current accidental registrations must move before the guard lands:
- Make six rebuild-flow case modules ordinary Vitest suites #8354 moves six rebuild registrars into ordinary
*.test.tssuites. - Move MCP lifecycle-lock classifier properties into the source-local suite #8356 moves MCP lifecycle-lock properties into their source-local suite.
Do not add a temporary or per-file allowlist.
Scope
- Add a TypeScript-AST scan across repository JavaScript and TypeScript.
- Resolve bindings imported from
vitest. - Flag registration through
describe,it,test, andsuite, including modifier chains such aseach,only,skip,skipIf,runIf, andconcurrent. - Permit discoverable
*.test.*and*.spec.*files and explicitly named*-suite.*shared registrars. - Do not flag Vitest imports alone or fixture extension such as
base.extend(...). - Add scanner tests for registration, modifiers, aliases, comments and strings, fixtures, ordinary tests, and intentional suite files.
- Wire the check into
scripts/checks/run.mtsbeside existing test-boundary checks.
Intentional shared suites include test/local-credential-helper-suite.ts and test/openclaw-integrity-pin-suite.ts. Fixture modules such as test/helpers/owned-test-resources.ts and test/e2e/fixtures/*e2e-test.ts must remain valid.
Relationships
- Parent Epic: Consolidate test support and enforce test-suite boundaries #8345
- Blocked by:
- Make six rebuild-flow case modules ordinary Vitest suites #8354 — removes the six rebuild registrar violations.
- Move MCP lifecycle-lock classifier properties into the source-local suite #8356 — removes the MCP helper violation.
- Blocks: None.
- Start condition: Do not start until GitHub shows zero active blockers.
This is not a good first issue: it adds a repository-wide AST policy and must control false positives without an allowlist.
Acceptance criteria
- The completed repository has zero violations.
- Synthetic helper registrations and modifier chains fail.
- Intentional suite modules, ordinary test files, and fixture extension pass.
- Diagnostics include file, line, and remediation.
npm run checks:repositoryruns the check.
Validation
npx vitest run --project integration test/test-registration-boundary.test.ts
npm run checks:repository
npm run test:projects:checkMetadata
Metadata
Assignees
Labels
area: architectureArchitecture, design debt, major refactors, or maintainabilityarea: ciCI workflows, checks, release automation, or GitHub Actions
Activity
ci(checks): reject Vitest test registration outside test files (NVIDI…