Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fallow-baselines/health.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
"count": 1
}
},
"src/daemon/replay/internal/__tests__/session-test-runner.test.ts": {
"src/daemon/__tests__/replay-suite/session-test-runner.test.ts": {
"crap_high": {
"count": 1
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,35 @@
* the original recorded, so the fresh replay needs no hand-fixing.
*/
import { test, expect, vi, beforeEach } from 'vitest';
import { markRepairTransactionComplete } from '../../../session-replay-transaction.ts';
import { mkdtempForTestSync } from '../../../../__tests__/test-utils/tmp-dir.ts';
import { markRepairTransactionComplete } from '../../session-replay-transaction.ts';
import { mkdtempForTestSync } from '../../../__tests__/test-utils/tmp-dir.ts';

vi.mock('@agent-device/device-selection/dispatch-resolve', async (importOriginal) => {
const actual =
await importOriginal<typeof import('@agent-device/device-selection/dispatch-resolve')>();
return { ...actual, resolveTargetDevice: vi.fn() };
});
vi.mock('../../../snapshot-interactor-capture.ts', () => ({
vi.mock('../../snapshot-interactor-capture.ts', () => ({
captureSnapshotWithInteractor: vi.fn(),
}));

import fs from 'node:fs';
import path from 'node:path';
import { runReplayForTest } from '../../__tests__/replay-command-fixture.ts';
import { SessionStore } from '../../../session-store.ts';
import { captureSnapshotWithInteractor } from '../../../snapshot-interactor-capture.ts';
import { makeIosSession } from '../../../../__tests__/test-utils/session-factories.ts';
import type { DaemonRequest } from '../../../daemon-request.ts';
import { runReplayForTest } from '../../replay/__tests__/replay-command-fixture.ts';
import { SessionStore } from '../../session-store.ts';
import { captureSnapshotWithInteractor } from '../../snapshot-interactor-capture.ts';
import { makeIosSession } from '../../../__tests__/test-utils/session-factories.ts';
import type { DaemonRequest } from '../../daemon-request.ts';
import { parseReplayScriptDetailed } from '@agent-device/ad-script';
import {
baseReplayRequest as baseReq,
writeReplayFile,
} from '../../__tests__/session-replay-runtime.fixtures.ts';
} from '../../replay/__tests__/session-replay-runtime.fixtures.ts';
import { freshEvidence, makeRecordingReplayInvoke } from './session-replay-repair.fixtures.ts';
import {
captureSnapshotThroughLegacyDispatchFixture,
legacyDispatchCapture,
} from '../../../__tests__/legacy-snapshot-capture-fixture.ts';
} from '../legacy-snapshot-capture-fixture.ts';

const mockDispatchCommand = legacyDispatchCapture;
const mockCaptureSnapshotWithInteractor = vi.mocked(captureSnapshotWithInteractor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,33 @@
* `caution`/`manual` divergence is no longer a dead end.
*/
import { test, expect, vi, beforeEach } from 'vitest';
import { mkdtempForTestSync } from '../../../../__tests__/test-utils/tmp-dir.ts';
import { mkdtempForTestSync } from '../../../__tests__/test-utils/tmp-dir.ts';

vi.mock('@agent-device/device-selection/dispatch-resolve', async (importOriginal) => {
const actual =
await importOriginal<typeof import('@agent-device/device-selection/dispatch-resolve')>();
return { ...actual, resolveTargetDevice: vi.fn() };
});
vi.mock('../../../snapshot-interactor-capture.ts', () => ({
vi.mock('../../snapshot-interactor-capture.ts', () => ({
captureSnapshotWithInteractor: vi.fn(),
}));

import fs from 'node:fs';
import path from 'node:path';
import { runReplayForTest } from '../../__tests__/replay-command-fixture.ts';
import { SessionStore } from '../../../session-store.ts';
import { captureSnapshotWithInteractor } from '../../../snapshot-interactor-capture.ts';
import { runReplayForTest } from '../../replay/__tests__/replay-command-fixture.ts';
import { SessionStore } from '../../session-store.ts';
import { captureSnapshotWithInteractor } from '../../snapshot-interactor-capture.ts';
import {
captureSnapshotThroughLegacyDispatchFixture,
legacyDispatchCapture,
} from '../../../__tests__/legacy-snapshot-capture-fixture.ts';
import { makeIosSession } from '../../../../__tests__/test-utils/session-factories.ts';
import { repairSessionBoundary } from '../../../session-replay-transaction.ts';
import type { SessionState } from '../../../session-state.ts';
} from '../legacy-snapshot-capture-fixture.ts';
import { makeIosSession } from '../../../__tests__/test-utils/session-factories.ts';
import { repairSessionBoundary } from '../../session-replay-transaction.ts';
import type { SessionState } from '../../session-state.ts';
import {
baseReplayRequest as baseReq,
writeReplayFile,
} from '../../__tests__/session-replay-runtime.fixtures.ts';
} from '../../replay/__tests__/session-replay-runtime.fixtures.ts';
import { freshEvidence, makeRecordingReplayInvoke } from './session-replay-repair.fixtures.ts';
import {
bottomTabsRealCaptureFixture,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isSessionRecording } from '../../../session-script-publication-capability.ts';
import { isSessionRecording } from '../../session-script-publication-capability.ts';
/**
* ADR 0012 decision 6: `replay --save-script` arming (R1), the repair-run
* boundary watermark (R6, sticky across `--from` legs, no amputation when
Expand All @@ -11,41 +11,38 @@ import { isSessionRecording } from '../../../session-script-publication-capabili
* `session.actions` accumulates for real instead of staying empty.
*/
import { test, expect, vi, beforeEach } from 'vitest';
import { mkdtempForTestSync } from '../../../../__tests__/test-utils/tmp-dir.ts';
import { mkdtempForTestSync } from '../../../__tests__/test-utils/tmp-dir.ts';

vi.mock('@agent-device/device-selection/dispatch-resolve', async (importOriginal) => {
const actual =
await importOriginal<typeof import('@agent-device/device-selection/dispatch-resolve')>();
return { ...actual, resolveTargetDevice: vi.fn() };
});
vi.mock('../../../snapshot-interactor-capture.ts', () => ({
vi.mock('../../snapshot-interactor-capture.ts', () => ({
captureSnapshotWithInteractor: vi.fn(),
}));

import path from 'node:path';
import { runReplayForTest } from '../../__tests__/replay-command-fixture.ts';
import { SessionStore } from '../../../session-store.ts';
import { captureSnapshotWithInteractor } from '../../../snapshot-interactor-capture.ts';
import { runReplayForTest } from '../../replay/__tests__/replay-command-fixture.ts';
import { SessionStore } from '../../session-store.ts';
import { captureSnapshotWithInteractor } from '../../snapshot-interactor-capture.ts';
import {
makeIosSession,
repairPublication,
} from '../../../../__tests__/test-utils/session-factories.ts';
import { repairSessionBoundary } from '../../../session-replay-transaction.ts';
import {
NO_SCRIPT_PUBLICATION,
scriptTargetPath,
} from '../../../session-script-publication-state.ts';
import type { DaemonRequest } from '../../../daemon-request.ts';
import type { SessionState } from '../../../session-state.ts';
} from '../../../__tests__/test-utils/session-factories.ts';
import { repairSessionBoundary } from '../../session-replay-transaction.ts';
import { NO_SCRIPT_PUBLICATION, scriptTargetPath } from '../../session-script-publication-state.ts';
import type { DaemonRequest } from '../../daemon-request.ts';
import type { SessionState } from '../../session-state.ts';
import {
baseReplayRequest as baseReq,
writeReplayFile,
} from '../../__tests__/session-replay-runtime.fixtures.ts';
} from '../../replay/__tests__/session-replay-runtime.fixtures.ts';
import { freshEvidence, makeRecordingReplayInvoke } from './session-replay-repair.fixtures.ts';
import {
captureSnapshotThroughLegacyDispatchFixture,
legacyDispatchCapture,
} from '../../../__tests__/legacy-snapshot-capture-fixture.ts';
} from '../legacy-snapshot-capture-fixture.ts';

/** Repair-transaction status, or `undefined` outside a repair publication. */
function sessionRepairStatus(session: SessionState | undefined) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* completely unchanged.
*/
import { test, expect, vi, beforeEach } from 'vitest';
import { mkdtempForTestSync } from '../../../../__tests__/test-utils/tmp-dir.ts';
import { mkdtempForTestSync } from '../../../__tests__/test-utils/tmp-dir.ts';

vi.mock('@agent-device/platform-apple/runner/operations', () => ({
resolveRunnerAppBundleId: vi.fn(),
Expand All @@ -32,45 +32,45 @@ vi.mock('@agent-device/host-kit/command', async (importOriginal) => {
const actual = await importOriginal<typeof import('@agent-device/host-kit/command')>();
return { ...actual, runCmd: vi.fn() };
});
vi.mock('../../../../platform-runtime-runtime-hints.ts', async (importOriginal) => {
vi.mock('../../../platform-runtime-runtime-hints.ts', async (importOriginal) => {
const actual =
await importOriginal<typeof import('../../../../platform-runtime-runtime-hints.ts')>();
await importOriginal<typeof import('../../../platform-runtime-runtime-hints.ts')>();
return { ...actual, clearRuntimeHintValues: vi.fn(async () => {}) };
});
vi.mock('@agent-device/device-selection/dispatch-resolve', async (importOriginal) => {
const actual =
await importOriginal<typeof import('@agent-device/device-selection/dispatch-resolve')>();
return { ...actual, resolveTargetDevice: vi.fn() };
});
vi.mock('../../../snapshot-interactor-capture.ts', () => ({
vi.mock('../../snapshot-interactor-capture.ts', () => ({
captureSnapshotWithInteractor: vi.fn(),
}));
import fs from 'node:fs';
import path from 'node:path';
import { runReplayForTest } from '../../__tests__/replay-command-fixture.ts';
import { handleSessionCloseCommands as handleProductionCloseCommand } from '../../../session-lifecycle/index.ts';
import { SessionStore } from '../../../session-store.ts';
import { LeaseRegistry } from '../../../lease-registry.ts';
import { captureSnapshotWithInteractor } from '../../../snapshot-interactor-capture.ts';
import { runReplayForTest } from '../../replay/__tests__/replay-command-fixture.ts';
import { handleSessionCloseCommands as handleProductionCloseCommand } from '../../session-lifecycle/index.ts';
import { SessionStore } from '../../session-store.ts';
import { LeaseRegistry } from '../../lease-registry.ts';
import { captureSnapshotWithInteractor } from '../../snapshot-interactor-capture.ts';
import {
makeIosSession,
authoringPublication,
} from '../../../../__tests__/test-utils/session-factories.ts';
} from '../../../__tests__/test-utils/session-factories.ts';
import { parseReplayScriptDetailed } from '@agent-device/ad-script';
import {
baseReplayRequest as baseReq,
writeReplayFile,
} from '../../__tests__/session-replay-runtime.fixtures.ts';
} from '../../replay/__tests__/session-replay-runtime.fixtures.ts';
import { freshEvidence, makeRecordingReplayInvoke } from './session-replay-repair.fixtures.ts';
import {
bindLifecycleRuntime,
inspectLifecycleRuntimeFacts,
} from '../../../__tests__/application-lifecycle-runtime-harness.ts';
import { platformResourceCleanup } from '../../../../platform-runtime-resource-cleanup.ts';
} from '../application-lifecycle-runtime-harness.ts';
import { platformResourceCleanup } from '../../../platform-runtime-resource-cleanup.ts';
import {
captureSnapshotThroughLegacyDispatchFixture,
legacyDispatchCapture,
} from '../../../__tests__/legacy-snapshot-capture-fixture.ts';
} from '../legacy-snapshot-capture-fixture.ts';

const mockDispatchCommand = legacyDispatchCapture;
const mockCaptureSnapshotWithInteractor = vi.mocked(captureSnapshotWithInteractor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,30 @@ vi.mock('@agent-device/host-kit/command', async (importOriginal) => {
const actual = await importOriginal<typeof import('@agent-device/host-kit/command')>();
return { ...actual, runCmd: vi.fn() };
});
vi.mock('../../../../platform-runtime-runtime-hints.ts', async (importOriginal) => {
vi.mock('../../../platform-runtime-runtime-hints.ts', async (importOriginal) => {
const actual =
await importOriginal<typeof import('../../../../platform-runtime-runtime-hints.ts')>();
await importOriginal<typeof import('../../../platform-runtime-runtime-hints.ts')>();
return { ...actual, clearRuntimeHintValues: vi.fn(async () => {}) };
});
vi.mock('@agent-device/device-selection/dispatch-resolve', async (importOriginal) => {
const actual = (await importOriginal()) as Record<string, unknown>;
return { ...actual, resolveTargetDevice: vi.fn() };
});
vi.mock('../../../snapshot-interactor-capture.ts', () => ({
vi.mock('../../snapshot-interactor-capture.ts', () => ({
captureSnapshotWithInteractor: vi.fn(),
}));
import fs from 'node:fs';
import path from 'node:path';
import { captureSnapshotWithInteractor } from '../../../snapshot-interactor-capture.ts';
import { captureSnapshotWithInteractor } from '../../snapshot-interactor-capture.ts';
import {
legacyDispatchCapture,
resetLegacySnapshotCapture,
} from '../../../__tests__/legacy-snapshot-capture-fixture.ts';
import { dispatchApplicationLifecycleEffect } from '../../../__tests__/application-lifecycle-runtime-fixture.ts';
} from '../legacy-snapshot-capture-fixture.ts';
import { dispatchApplicationLifecycleEffect } from '../application-lifecycle-runtime-fixture.ts';
import { AppError } from '@agent-device/kernel/errors';
import { HEAL_COMPLETE_SENTINEL } from '../../../session-script-writer.ts';
import { HEAL_COMPLETE_SENTINEL } from '../../session-script-writer.ts';
import { parseReplayScriptDetailed } from '@agent-device/ad-script';
import type { SessionState } from '../../../session-state.ts';
import type { SessionState } from '../../session-state.ts';
import { freshEvidence } from './session-replay-repair.fixtures.ts';
import {
handleCloseCommand,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,45 +23,45 @@ vi.mock('@agent-device/host-kit/command', async (importOriginal) => {
const actual = await importOriginal<typeof import('@agent-device/host-kit/command')>();
return { ...actual, runCmd: vi.fn() };
});
vi.mock('../../../../platform-runtime-runtime-hints.ts', async (importOriginal) => {
vi.mock('../../../platform-runtime-runtime-hints.ts', async (importOriginal) => {
const actual =
await importOriginal<typeof import('../../../../platform-runtime-runtime-hints.ts')>();
await importOriginal<typeof import('../../../platform-runtime-runtime-hints.ts')>();
return { ...actual, clearRuntimeHintValues: vi.fn(async () => {}) };
});
vi.mock('@agent-device/device-selection/dispatch-resolve', async (importOriginal) => {
const actual = (await importOriginal()) as Record<string, unknown>;
return { ...actual, resolveTargetDevice: vi.fn() };
});
vi.mock('../../../snapshot-interactor-capture.ts', () => ({
vi.mock('../../snapshot-interactor-capture.ts', () => ({
captureSnapshotWithInteractor: vi.fn(),
}));
import fs from 'node:fs';
import path from 'node:path';
import { runReplayForTest } from '../../__tests__/replay-command-fixture.ts';
import { captureSnapshotWithInteractor } from '../../../snapshot-interactor-capture.ts';
import { runReplayForTest } from '../../replay/__tests__/replay-command-fixture.ts';
import { captureSnapshotWithInteractor } from '../../snapshot-interactor-capture.ts';
import {
legacyDispatchCapture,
resetLegacySnapshotCapture,
} from '../../../__tests__/legacy-snapshot-capture-fixture.ts';
import { dispatchApplicationLifecycleEffect } from '../../../__tests__/application-lifecycle-runtime-fixture.ts';
import { repairPublication } from '../../../../__tests__/test-utils/session-factories.ts';
import { HEAL_COMPLETE_SENTINEL } from '../../../session-script-writer.ts';
} from '../legacy-snapshot-capture-fixture.ts';
import { dispatchApplicationLifecycleEffect } from '../application-lifecycle-runtime-fixture.ts';
import { repairPublication } from '../../../__tests__/test-utils/session-factories.ts';
import { HEAL_COMPLETE_SENTINEL } from '../../session-script-writer.ts';
import {
repairSessionBoundary,
markRepairTransactionComplete,
} from '../../../session-replay-transaction.ts';
} from '../../session-replay-transaction.ts';
import {
NO_SCRIPT_PUBLICATION,
scriptTargetPath,
scriptTargetForce,
} from '../../../session-script-publication-state.ts';
} from '../../session-script-publication-state.ts';
import { parseReplayScriptDetailed } from '@agent-device/ad-script';
import type { DaemonRequest } from '../../../daemon-request.ts';
import type { SessionState } from '../../../session-state.ts';
import type { DaemonRequest } from '../../daemon-request.ts';
import type { SessionState } from '../../session-state.ts';
import {
baseReplayRequest as baseReq,
writeReplayFile,
} from '../../__tests__/session-replay-runtime.fixtures.ts';
} from '../../replay/__tests__/session-replay-runtime.fixtures.ts';
import { freshEvidence, makeRecordingReplayInvoke } from './session-replay-repair.fixtures.ts';
import {
handleCloseCommand,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import path from 'node:path';
import { mkdtempForTestSync } from '../../../../__tests__/test-utils/tmp-dir.ts';
import { SessionStore } from '../../../session-store.ts';
import { LeaseRegistry } from '../../../lease-registry.ts';
import { mkdtempForTestSync } from '../../../__tests__/test-utils/tmp-dir.ts';
import { SessionStore } from '../../session-store.ts';
import { LeaseRegistry } from '../../lease-registry.ts';
import {
makeIosSession,
makeRepairCompleteSession,
repairPublication,
} from '../../../../__tests__/test-utils/session-factories.ts';
import { handleSessionCloseCommands as handleProductionCloseCommand } from '../../../session-lifecycle/index.ts';
} from '../../../__tests__/test-utils/session-factories.ts';
import { handleSessionCloseCommands as handleProductionCloseCommand } from '../../session-lifecycle/index.ts';
import {
bindLifecycleRuntime,
inspectLifecycleRuntimeFacts,
} from '../../../__tests__/application-lifecycle-runtime-harness.ts';
import { platformResourceCleanup } from '../../../../platform-runtime-resource-cleanup.ts';
} from '../application-lifecycle-runtime-harness.ts';
import { platformResourceCleanup } from '../../../platform-runtime-resource-cleanup.ts';
import { freshEvidence } from './session-replay-repair.fixtures.ts';

/**
Expand Down
Loading
Loading