Skip to content

test: split the interaction test monolith along source topology #1110

Description

@thymikee

src/commands/interaction/__tests__/interactions.test.ts (and siblings aggregating many source modules into one file) bound unit-suite wall clock: measured 2026-07 that total wall = slowest single file (Amdahl at file granularity), and the interaction monolith is among the largest. The repo already did this exact operation for args tests: PR #1102 "test: split the args.test.ts aggregation along source topology" — use it as the template.

Task: split the interaction test aggregation so each test file mirrors exactly one source module (the test-mirror rule in AGENTS.md), preserving every test's name and assertions verbatim — this is a MOVE refactor, not a rewrite. Shared fixtures/helpers go to a local __tests__/test-utils module rather than being duplicated.

Constraints:

  • Zero behavior change: same test count before/after (npx vitest run src/commands/interaction — compare totals), no .skip, no merged/renamed tests.
  • Respect the slow-test ratchet (scripts/vitest-slow-test-reporter.ts): if a moved test is in PINNED_SLOW_UNIT_TESTS, update its pin key to the new file path in the same PR (pin keys are <relative path> :: <test name>).
  • Full gate incl. layering check before push; fallow must stay clean (no dead helper exports left behind).

Acceptance: identical test totals, measurably reduced slowest-file time for the interaction area (paste before/after --reporter=verbose durations), all gates green.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions