Repository navigation
refactor(replay): move four daemon tests of replay-port code into replay-port - #3650
Conversation
Size Report
Startup median (7 runs, lower is better):
|
…heir modules Pure git mv; specifiers are rewritten in the next commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Specifier rewrites only, plus the one request type: attachRemoteReplayTestArtifacts takes a DaemonWireRequest, which the daemon-private DaemonRequest only widened. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its only importer moved into the package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This looks good at 1162ede. The four tests now sit beside the replay-port code they cover, and the diff touches only tests and a replay-port export entry. I did not run the tests or the layering scan. Coverage fails only on the stale eager-closure-budgets row for packages/daemon/src/index.ts, and that row also fails at the merge-base, so this PR did not cause it. I did not read the Smoke Tests logs. The diff changes no device-facing code, so those failures look unrelated too. There are no conflicts. Nothing in this PR blocks merge. The Coverage failure only needs the stale APPROVED_OVER_CEILING row fixed. |
1162ede to
d9f07bd
Compare
|
Rebased onto main (80d5e22), which carries #3653's removal of the stale daemon approval row. On the new head: the five replay-port test files pass (18 moved + 3 existing) and |
|
This PR is ready at d9f07bd. The earlier review of 1162ede was clean, and the four daemon tests of replay-port code now live in replay-port. The diff touches 5 test files and removes one package.json export, with no production lines changed. A search of tracked files at this commit finds no importer of the removed subpath. Not blocking: the comment at packages/replay-test/src/internal/tests/session-test-runtime.test.ts:14 still names the old daemon path for the cancellation contract, and it can point to packages/replay-port/src/daemon-port/tests/test-command-cancellation.test.ts instead, but you can take or leave this. I ran no tests or gates, so the moved tests and the layering and eager-closure gates rest on your report and on CI. All 10 remaining checks are still queued, and none has failed. The merge now waits only for those checks to go green. There are no conflicts. |
What
Four daemon tests that only exercise
replay-portmodules move intoreplay-port, beside the module they test and importing it relatively. Their package export (./session-test-source-discovery) loses its last importer and is dropped. Second slice of the replay-package sweep (first: #3647, independent).Commits
refactor(replay): move four daemon tests of replay-port code beside their modules—git mvonly.git diff -M --stat: four renames, 0 insertions / 0 deletions.refactor(replay): import the moved tests relatively— specifier rewrites only, plus one type:attachRemoteReplayTestArtifactstakesDaemonWireRequest, which daemon-privateDaemonRequestonly widened, so the test'sreq()helper is typedDaemonWireRequestfrom@agent-device/contracts/command.chore(gates): drop the replay-port session-test-source-discovery export.Moves
packages/daemon/src/sessions/__tests__/replay-suite/)packages/replay-port/src/daemon-port/__tests__/)session-test-suite-command-cancellation.test.tstest-command-cancellation.test.tstest-command.ts(bindReplayTestAttemptCancellation)session-test-suite-command-nested-flags.test.tstest-command-nested-flags.test.tstest-command.ts(buildNestedReplayFlags)session-test-suite-command-remote-artifacts.test.tstest-command-remote-artifacts.test.tstest-command.ts(attachRemoteReplayTestArtifacts)session-test-source-discovery.test.tssession-test-source-discovery-inspection.test.tssession-test-source-discovery.tsThe last one takes an
-inspectionaspect suffix because replay-port already has a differentsession-test-source-discovery.test.ts(the lazy-backend-resolution cases). Both stay; the existing one is untouched.None of them uses
vi.mock.Fixture decision (these tests' fixture imports)
test-kit/tmp-dirmkdtempForTestSynctmp-dir.fixtures.ts(already there for the package's tests)replay-port/replay-script-source-fixtures../../replay-script-source.fixtures.ts; the export itself stays until test-kit's single entry lands (20 daemon + root importers remain)Test-count parity (
vitest run <files> --reporter=json, passed/failed)a907a919a)session-test-source-discovery.test.ts(untouched)Total moved 18 → 18. Selection: destination is under
packages/*/src/**/*.test.ts(unit-core include); vitest collected all five files by path.check:gate-manifestok;check:affectedselected the moved files (they appear in its related-test command).Surface
replay-portexports 32 → 31 (cumulative with #3647: 33 → 31 against main). No new subpath, barrel orexport *.bindReplayTestAttemptCancellationandbuildNestedReplayFlagskeep their module-levelexportfor the colocated tests; their package subpath (./test-command) still has production and integration importers.Remaining non-package importer of
attachRemoteReplayTestArtifacts:test/integration/provider-scenarios/remote-test-artifacts-materialization.test.ts(root worker's file). Not touched.Gates (on
1162edeac)check:quick,check:layering,check:fallow,check:gate-manifest,pnpm format: clean.check:affected --run: all pass exceptscripts/__tests__/eager-closure-budgets.test.ts > no APPROVED_OVER_CEILING row is stale, which namespackages/daemon/src/index.tsand fails on any branch offa907a919a(passes ona907a919aitself only because the check is deferred when merge-base equals head). Left stale by the daemon single-entry PR #3633; daemon thread to remove that row.R83 and the colocation baseline are not on main yet, so this only shrinks what the seed will contain.
🤖 Generated with Claude Code