refactor(replay): colocate eight package tests and drop four unused exports
What
Part of the test-export / colocation sweep (coordinator: refactor/no-test-exports). Replay-package scope, first slice: names eight tests for the module they test, and drops four package exports no one imports. No fixture or test-kit work here.
Commits
refactor(replay): name eight package tests for the module they test— eightgit mv, zero content change.chore(gates): drop package exports nothing imports—package.jsonexports only.
git diff -M --stat a907a919a HEAD: all eight renames at 100% similarity, 0 insertions, 0 deletions.
Colocation (recomputed with a prefix-match scan over packages/{replay-port,ad-replay,ad-script,replay-test,maestro,session-journal,daemon-contracts})
Before 9 (maestro 6, ad-script 1, replay-port 1, session-journal 1, matches the coordinator's count). After 1.
| Old | New | Module |
|---|---|---|
ad-script backend-vocabulary.test.ts | format-backend-vocabulary.test.ts | format.ts |
maestro run-script.test.ts | run-script-execution.test.ts | run-script-execution.ts |
maestro export-label-projection.test.ts | export-flow-label-projection.test.ts | export-flow.ts |
maestro facade-failure-suggestions.test.ts | facade-execution-failure-suggestions.test.ts | facade-execution.ts (collectMaestroFailureSuggestions) |
maestro runtime-port.test.ts | runtime-port-commands.test.ts | runtime-port-commands.ts (its createMaestroRuntimePort is a test-local wrapper around executeMaestroRuntimeCommand) |
maestro runtime-port-gestures.test.ts | runtime-port-commands-gestures.test.ts | same |
maestro scroll-container-classification.test.ts | runtime-port-geometry-scroll-container.test.ts | runtime-port-geometry.ts (resolveMaestroScrollableGesture) |
replay-port session-replay-builtin-vars.test.ts | session-replay-vars.test.ts | session-replay-vars.ts |
Left alone, reported: session-journal/src/__tests__/journal-request-input.test.ts. It is a type-level test across session-event-log, session-event-request and session-event-action-presentation (one union of every request-shaped parameter the package accepts). It is an integration test of the package surface; splitting it would break the single union it asserts, and a made-up module name would game the rule.
Test-count parity (vitest run <files> --reporter=json, passed / failed)
Before = a907a919a at the old paths, after = this head at the new paths. 100/0 before, 100/0 after.
| File (new name) | Before | After |
|---|---|---|
| format-backend-vocabulary | 7/0 | 7/0 |
| run-script-execution | 5/0 | 5/0 |
| export-flow-label-projection | 3/0 | 3/0 |
| facade-execution-failure-suggestions | 17/0 | 17/0 |
| runtime-port-commands-gestures | 9/0 | 9/0 |
| runtime-port-commands | 14/0 | 14/0 |
| runtime-port-geometry-scroll-container | 43/0 | 43/0 |
| session-replay-vars | 2/0 | 2/0 |
Selection: all eight sit under packages/*/src/**/*.test.ts (unit-core include) and were collected by path; no config, baseline or gate manifest names any of the old paths (git grep clean); check:gate-manifest ok.
vi.mock: none of the eight uses vi.mock (the maestro vi hits are vi.fn).
Exports dropped (importer list was empty for each; relative imports inside the package are untouched)
| Package | Dropped | Exports before → after |
|---|---|---|
| replay-port | ./session-test-infrastructure | 33 → 32 |
| session-journal | ./session-event-log-lines, ./session-event-log-window, ./session-event-request | 7 → 4 |
No new subpath, barrel or export * anywhere. No other package's export count changes.
Gates (on 80c70afe1)
pnpm check:quick, check:layering, check:fallow, check:gate-manifest, pnpm format (repo-wide): clean. check:affected --run: 15477 tests pass, 1 fails — scripts/__tests__/eager-closure-budgets.test.ts > no APPROVED_OVER_CEILING row is stale names packages/daemon/src/index.ts. That is not from this change: the same file passes on a907a919a only because the stale-row check is deferred when merge-base equals head, and the daemon single-entry PR (#3633) left that approval row stale. Daemon thread: remove that row.
Sequencing
R83 and the colocation baseline are not on main yet, so there is nothing of mine to delete from them. This PR only shrinks what the seed will contain (9 → 1 colocation entries in these packages).
🤖 Generated with Claude Code