From 5dc3dac0f47de1bda5d61af211ec193f542218c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Thu, 15 Oct 2026 13:28:44 +0200 Subject: [PATCH 1/3] refactor(replay): move four daemon tests of replay-port code beside their modules Pure git mv; specifiers are rewritten in the next commit. Co-Authored-By: Claude Opus 5.5 --- .../__tests__/session-test-source-discovery-inspection.test.ts} | 0 .../src/daemon-port/__tests__/test-command-cancellation.test.ts} | 0 .../src/daemon-port/__tests__/test-command-nested-flags.test.ts} | 0 .../daemon-port/__tests__/test-command-remote-artifacts.test.ts} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename packages/{daemon/src/sessions/__tests__/replay-suite/session-test-source-discovery.test.ts => replay-port/src/daemon-port/__tests__/session-test-source-discovery-inspection.test.ts} (100%) rename packages/{daemon/src/sessions/__tests__/replay-suite/session-test-suite-command-cancellation.test.ts => replay-port/src/daemon-port/__tests__/test-command-cancellation.test.ts} (100%) rename packages/{daemon/src/sessions/__tests__/replay-suite/session-test-suite-command-nested-flags.test.ts => replay-port/src/daemon-port/__tests__/test-command-nested-flags.test.ts} (100%) rename packages/{daemon/src/sessions/__tests__/replay-suite/session-test-suite-command-remote-artifacts.test.ts => replay-port/src/daemon-port/__tests__/test-command-remote-artifacts.test.ts} (100%) diff --git a/packages/daemon/src/sessions/__tests__/replay-suite/session-test-source-discovery.test.ts b/packages/replay-port/src/daemon-port/__tests__/session-test-source-discovery-inspection.test.ts similarity index 100% rename from packages/daemon/src/sessions/__tests__/replay-suite/session-test-source-discovery.test.ts rename to packages/replay-port/src/daemon-port/__tests__/session-test-source-discovery-inspection.test.ts diff --git a/packages/daemon/src/sessions/__tests__/replay-suite/session-test-suite-command-cancellation.test.ts b/packages/replay-port/src/daemon-port/__tests__/test-command-cancellation.test.ts similarity index 100% rename from packages/daemon/src/sessions/__tests__/replay-suite/session-test-suite-command-cancellation.test.ts rename to packages/replay-port/src/daemon-port/__tests__/test-command-cancellation.test.ts diff --git a/packages/daemon/src/sessions/__tests__/replay-suite/session-test-suite-command-nested-flags.test.ts b/packages/replay-port/src/daemon-port/__tests__/test-command-nested-flags.test.ts similarity index 100% rename from packages/daemon/src/sessions/__tests__/replay-suite/session-test-suite-command-nested-flags.test.ts rename to packages/replay-port/src/daemon-port/__tests__/test-command-nested-flags.test.ts diff --git a/packages/daemon/src/sessions/__tests__/replay-suite/session-test-suite-command-remote-artifacts.test.ts b/packages/replay-port/src/daemon-port/__tests__/test-command-remote-artifacts.test.ts similarity index 100% rename from packages/daemon/src/sessions/__tests__/replay-suite/session-test-suite-command-remote-artifacts.test.ts rename to packages/replay-port/src/daemon-port/__tests__/test-command-remote-artifacts.test.ts From 23c616984704d49379d478a2a75d9679d5a45cea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Thu, 15 Oct 2026 13:29:02 +0200 Subject: [PATCH 2/3] refactor(replay): import the moved tests relatively 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 --- .../session-test-source-discovery-inspection.test.ts | 6 +++--- .../__tests__/test-command-cancellation.test.ts | 2 +- .../__tests__/test-command-nested-flags.test.ts | 2 +- .../__tests__/test-command-remote-artifacts.test.ts | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/replay-port/src/daemon-port/__tests__/session-test-source-discovery-inspection.test.ts b/packages/replay-port/src/daemon-port/__tests__/session-test-source-discovery-inspection.test.ts index 8f95c8d4ee..a0205f1dfe 100644 --- a/packages/replay-port/src/daemon-port/__tests__/session-test-source-discovery-inspection.test.ts +++ b/packages/replay-port/src/daemon-port/__tests__/session-test-source-discovery-inspection.test.ts @@ -2,12 +2,12 @@ import { test } from 'vitest'; import assert from 'node:assert/strict'; import fs from 'node:fs'; import path from 'node:path'; -import { buildReplayTestSourceDiscovery } from '@agent-device/replay-port/session-test-source-discovery'; -import { mkdtempForTestSync } from '@agent-device/test-kit/tmp-dir'; +import { buildReplayTestSourceDiscovery } from '../session-test-source-discovery.ts'; +import { mkdtempForTestSync } from '../../tmp-dir.fixtures.ts'; import { maestroScriptSourceBundleFor, replayScriptSourceBundleFor, -} from '@agent-device/replay-port/replay-script-source-fixtures'; +} from '../../replay-script-source.fixtures.ts'; // #1478 P3b: the daemon adapter's inspection capability. #1802 moved expansion and file reading // to the caller, so what is left here is exactly format routing plus per-engine manifest diff --git a/packages/replay-port/src/daemon-port/__tests__/test-command-cancellation.test.ts b/packages/replay-port/src/daemon-port/__tests__/test-command-cancellation.test.ts index 4f95ffe37f..5e9fd1b1af 100644 --- a/packages/replay-port/src/daemon-port/__tests__/test-command-cancellation.test.ts +++ b/packages/replay-port/src/daemon-port/__tests__/test-command-cancellation.test.ts @@ -6,7 +6,7 @@ import { markRequestCanceled, registerRequestAbort, } from '@agent-device/host-kit/request'; -import { bindReplayTestAttemptCancellation } from '@agent-device/replay-port/test-command'; +import { bindReplayTestAttemptCancellation } from '../test-command.ts'; // The daemon half of the replay-test cancellation seam (#1478 P3b). The scheduler only says // "cancel" and "release"; everything here — registry entries, the parent-abort relay, and diff --git a/packages/replay-port/src/daemon-port/__tests__/test-command-nested-flags.test.ts b/packages/replay-port/src/daemon-port/__tests__/test-command-nested-flags.test.ts index 77c9773afb..f38ed27e5d 100644 --- a/packages/replay-port/src/daemon-port/__tests__/test-command-nested-flags.test.ts +++ b/packages/replay-port/src/daemon-port/__tests__/test-command-nested-flags.test.ts @@ -5,7 +5,7 @@ */ import assert from 'node:assert/strict'; import { test } from 'vitest'; -import { buildNestedReplayFlags } from '@agent-device/replay-port/test-command'; +import { buildNestedReplayFlags } from '../test-command.ts'; test('buildNestedReplayFlags returns parent flags untouched when neither override is set', () => { const parent = { platform: 'android' as const, timeoutMs: 5000 }; diff --git a/packages/replay-port/src/daemon-port/__tests__/test-command-remote-artifacts.test.ts b/packages/replay-port/src/daemon-port/__tests__/test-command-remote-artifacts.test.ts index fa107a9b17..5c084abdfe 100644 --- a/packages/replay-port/src/daemon-port/__tests__/test-command-remote-artifacts.test.ts +++ b/packages/replay-port/src/daemon-port/__tests__/test-command-remote-artifacts.test.ts @@ -17,9 +17,9 @@ import fs from 'node:fs'; import path from 'node:path'; import { test } from 'vitest'; import type { ReplaySuiteResult } from '@agent-device/contracts/replay'; -import type { DaemonRequest } from '../../../core/daemon-request.ts'; -import { attachRemoteReplayTestArtifacts } from '@agent-device/replay-port/test-command'; -import { mkdtempForTestSync } from '@agent-device/test-kit/tmp-dir'; +import type { DaemonWireRequest } from '@agent-device/contracts/command'; +import { attachRemoteReplayTestArtifacts } from '../test-command.ts'; +import { mkdtempForTestSync } from '../../tmp-dir.fixtures.ts'; const SUITE_INVOCATION_ID = 'cd5f9c01feec8d70'; @@ -73,7 +73,7 @@ function suiteResult(daemonRoot: string): ReplaySuiteResult { }; } -function req(clientArtifactsRoot: string | undefined): DaemonRequest { +function req(clientArtifactsRoot: string | undefined): DaemonWireRequest { return { token: 't', session: 'default', From d9f07bd3aef53d14abbecdffabe675a597ab108f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Thu, 15 Oct 2026 13:29:10 +0200 Subject: [PATCH 3/3] chore(gates): drop the replay-port session-test-source-discovery export Its only importer moved into the package. Co-Authored-By: Claude Opus 5.5 --- packages/replay-port/package.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/replay-port/package.json b/packages/replay-port/package.json index a76b534c3a..da330c5e2d 100644 --- a/packages/replay-port/package.json +++ b/packages/replay-port/package.json @@ -120,10 +120,6 @@ "types": "./src/daemon-port/session-test-shard-devices.ts", "default": "./src/daemon-port/session-test-shard-devices.ts" }, - "./session-test-source-discovery": { - "types": "./src/daemon-port/session-test-source-discovery.ts", - "default": "./src/daemon-port/session-test-source-discovery.ts" - }, "./target-classification": { "types": "./src/daemon-port/target-classification.ts", "default": "./src/daemon-port/target-classification.ts"