Skip to content

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

Merged
thymikee merged 2 commits into
mainfrom
refactor/replay-colocation-renames
Oct 15, 2026
Merged

thymikee merged 2 commits into
mainfrom
refactor/replay-colocation-renames

Conversation

@thymikee

@thymikee thymikee commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

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.

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

View guided diff Turn on auto-fix

thymikee and others added 2 commits October 15, 2026 13:08
Pure renames; each test keeps its content.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
session-journal's event-log-lines, event-log-window and event-request, and
replay-port's session-test-infrastructure, are imported only by relative path
inside their own package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 10 files

View guided diff | Turn on auto-fix | Re-trigger cubic

@thymikee

Copy link
Copy Markdown
Member Author

The code in 80c70af looks good to me. The change renames eight tests and drops four unused exports, with no behavior change, and I found no remaining references to a renamed test or a removed specifier.

CI had not finished when I looked, so I cannot yet say whether Typecheck, Repo Guards and Coverage pass. I did not check that each new test name matches the module it covers, or whether any entry in fallow-baselines is keyed to a renamed test path. There are no conflicts.

Next step: wait for Repo Guards, Typecheck & Package and Coverage to go green.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.25 MB 5.25 MB 0 B
Package (unpacked) 5.25 MB 5.25 MB 0 B
Package (download) 1.58 MB 1.58 MB +11 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 27.1 ms 26.4 ms -0.8 ms
CLI --help 76.9 ms 79.2 ms +2.2 ms

@thymikee
thymikee merged commit 6709cc1 into main Oct 15, 2026
21 of 22 checks passed
@thymikee
thymikee deleted the refactor/replay-colocation-renames branch October 15, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant