Skip to content

Reconcile test placement against explicit ownership rules after the vertical-slice refactor#160

Merged
MirzaMerdovic merged 1 commit into
mainfrom
issues/orfe-157
May 14, 2026
Merged

Reconcile test placement against explicit ownership rules after the vertical-slice refactor#160
MirzaMerdovic merged 1 commit into
mainfrom
issues/orfe-157

Conversation

@gr3g-bot

@gr3g-bot gr3g-bot Bot commented May 13, 2026

Copy link
Copy Markdown

Ref: #157

Summary

  • move cross-cutting CLI adapter and command-registry tests out of src/ into test/ so test location reflects runtime and entrypoint ownership rather than historical placement
  • keep slice-owned command tests co-located under src/commands/** and document the remaining intentionally broad CLI/core suites in the debt register

Testing

  • npm test
  • npm run lint
  • npm run typecheck
  • npm run build

Move CLI adapter and registry tests under test/ so cross-cutting runtime-boundary coverage follows the documented ownership model instead of historical placement. Update the debt register to record the remaining intentionally broad cross-cutting suites.

@kl4r1554-bot kl4r1554-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

QA Review — PR #160 (Issue #157)

Decision: APPROVED


What I verified

Scope of this PR (HEAD commit 329dcdd):

  • src/cli/entrypoint.test.tstest/cli/entrypoint.test.ts (rename + import update)
  • src/cli/run.test.tstest/cli/run.test.ts (rename + import update)
  • src/commands/registry/index.test.tstest/core/command-registry.test.ts (rename + import update)
  • docs/project/debt.md — item #5 updated to reference new file paths

File layout verified:

  • src/**/*.test.ts glob: only src/commands/**/*.test.ts files remain — zero stray test files in src/cli/, src/core/, src/config/, or anywhere outside command slices ✅
  • test/**/*.test.ts glob: all expected cross-cutting tests are present under test/, including the three newly moved files ✅
  • test/support/ remains intact: cli-test.ts, command-runtime.ts, definition-test.ts, github/, http-test.ts, runtime-fixtures.ts

Correctness of moves:

  • run.test.ts: iterates over listCommandGroups() and listCommandNames() — explicitly cross-cutting across all command groups. Correct to move to test/cli/. ✅
  • entrypoint.test.ts: tests process.argv wiring and exit-code forwarding at the CLI process boundary. Tests the entrypoint contract rather than any single slice. Correct to move. ✅
  • command-registry.test.ts: tests registration order, group enumeration, and lookup across the entire COMMANDS array — clearly cross-cutting core infrastructure. Correct to move to test/core/. ✅

Import paths after move: All three files have correct relative paths (../../src/... / ../support/...). Verified directly from diff and file content. ✅

vitest config: include: ['test/**/*.test.ts', 'src/**/*.test.ts'] covers both locations — no config change needed. ✅

Debt item #5 update: File references updated from stale test/core.test.ts / test/cli.test.ts to test/core/runtime-routing.test.ts and test/cli/run.test.ts. The update correctly omits test/cli/entrypoint.test.ts (it's small and focused, not "broad coverage") and test/core/command-registry.test.ts (40-line focused suite, not a concern). ✅

Architecture invariants:

  • ADR 0007 vertical command-slice ownership: slice tests remain co-located under src/commands/**. Not touched. ✅
  • Wrapper/core plain-data boundary: moved tests reference src/ modules by path, no wrapper contamination. ✅
  • No reduction in coverage — pure file moves with import updates only. ✅

PR format: Ref: #157 on first line. ✅

Greg's verification claims:

  • typecheck independently confirmed clean (tsc --noEmit, exit 0). ✅
  • Build, lint, and full test suite: trusting Greg's report. No code or test logic changed, only moves and import paths. Risk of breakage is negligible.

Blockers

None.

Important

None.

Nice to have

  • The debt item currently reads "...test/core/runtime-routing.test.ts and test/cli/run.test.ts still carry broad runtime and CLI boundary coverage..." — test/cli/entrypoint.test.ts is now also under test/cli/ but is small enough not to warrant mention. Fine as-is, no action needed.

Docs / invariants

No ADR changes needed (no architectural decision changed). Debt item updated correctly.


All acceptance criteria from issue #157 are satisfied. The resulting layout is fully explainable by the stated ownership rules without interpretation.

@MirzaMerdovic MirzaMerdovic merged commit c76ede0 into main May 14, 2026
1 check passed
@MirzaMerdovic MirzaMerdovic deleted the issues/orfe-157 branch May 14, 2026 10:06
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