Skip to content

Commit 6ae91bc

Browse files
committed
test: assert the caller-side replay path as a substring, not a hand-escaped regex
1 parent b7c66b8 commit 6ae91bc

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

src/__tests__/cli-client-commands.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ test('replay refuses a script missing on the caller before any daemon request',
756756
assert.equal(result.code, 1);
757757
assert.equal(result.calls.length, 0);
758758
assert.match(result.stderr, /replay script not found on this machine/);
759-
assert.match(result.stderr, new RegExp(missingPath.replace(/[.]/g, '\\.')));
759+
assert.ok(result.stderr.includes(missingPath), result.stderr);
760760
});
761761

762762
test('replay --timeout reaches the daemon request envelope through the public CLI', async () => {

src/daemon/handlers/session-test-suite-command.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* The `test` command's own orchestration: harness-flag admission, suite translation, and the
3+
* scheduler run whose every attempt is a nested `replay`. Extracted from
4+
* `handleSessionReplayCommands` (`session-replay.ts`), which is now the routing decision alone —
5+
* this is the half that grew every time the suite gained a capability (video recording, shards,
6+
* per-attempt step sinks, and #1802's per-source script bundles).
7+
*/
8+
19
import type { CommandFlags } from '@agent-device/contracts/command';
210
import type { ReplayScriptSourceBundle } from '@agent-device/contracts/replay';
311
import { REPLAY_SCRIPT_SOURCE_REQUIRED_MESSAGE } from '../../replay/script-source-bundle.ts';
@@ -46,13 +54,6 @@ import {
4654
} from './session-replay-video-recording.ts';
4755
import { REPLAY_ONLY_TEST_FLAG_REJECTIONS } from './session-replay-test-policy.ts';
4856

49-
/**
50-
* The `test` command's own orchestration: harness-flag admission, suite translation, and the
51-
* scheduler run whose every attempt is a nested `replay`. Extracted from
52-
* `handleSessionReplayCommands` (`session-replay.ts`), which is now the routing decision alone —
53-
* this is the half that grew every time the suite gained a capability (video recording, shards,
54-
* per-attempt step sinks, and #1802's per-source script bundles).
55-
*/
5657
/**
5758
* Binds one replay-test attempt to daemon request cancellation (#1478 P3b).
5859
*

0 commit comments

Comments
 (0)