refactor(replay): colocate eight package tests and drop four unused exports

Merged
TH
9h ago
+0-16

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

  1. refactor(replay): name eight package tests for the module they test — eight git mv, zero content change.
  2. chore(gates): drop package exports nothing imports — package.json exports 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.

OldNewModule
ad-script backend-vocabulary.test.tsformat-backend-vocabulary.test.tsformat.ts
maestro run-script.test.tsrun-script-execution.test.tsrun-script-execution.ts
maestro export-label-projection.test.tsexport-flow-label-projection.test.tsexport-flow.ts
maestro facade-failure-suggestions.test.tsfacade-execution-failure-suggestions.test.tsfacade-execution.ts (collectMaestroFailureSuggestions)
maestro runtime-port.test.tsruntime-port-commands.test.tsruntime-port-commands.ts (its createMaestroRuntimePort is a test-local wrapper around executeMaestroRuntimeCommand)
maestro runtime-port-gestures.test.tsruntime-port-commands-gestures.test.tssame
maestro scroll-container-classification.test.tsruntime-port-geometry-scroll-container.test.tsruntime-port-geometry.ts (resolveMaestroScrollableGesture)
replay-port session-replay-builtin-vars.test.tssession-replay-vars.test.tssession-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)BeforeAfter
format-backend-vocabulary7/07/0
run-script-execution5/05/0
export-flow-label-projection3/03/0
facade-execution-failure-suggestions17/017/0
runtime-port-commands-gestures9/09/0
runtime-port-commands14/014/0
runtime-port-geometry-scroll-container43/043/0
session-replay-vars2/02/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)

PackageDroppedExports before → after
replay-port./session-test-infrastructure33 → 32
session-journal./session-event-log-lines, ./session-event-log-window, ./session-event-request7 → 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