Skip to content

Commit 401869a

Browse files
committed
refactor(daemon): move the deferred outcome interface into post-gesture-stabilization.ts
With the pending-outcome retry gone, deferred-interaction-outcome.ts only marks and resolves post-gesture stabilization (its R7 field) and Android freshness. It moves to src/daemon/post-gesture-stabilization.ts; the exported names stay, so callers change only their import path. No shim is left at the old path. The surviving cases of deferred-interaction-outcome.test.ts move unchanged into post-gesture-stabilization.test.ts, which already tested this module's stabilization loop. The capture-kit and fixture comments name the new owner. No new tests: the move carries its tests unchanged.
1 parent f467c0f commit 401869a

19 files changed

Lines changed: 207 additions & 220 deletions

‎packages/capture-kit/src/post-gesture-stability.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { PostGestureAction, PostGestureOutcome } from '@agent-device/kernel
77
* baseline-distrust verdict, parameterized over the capture value and the
88
* signature comparators. Deliberately a leaf — it imports no cycle owners and
99
* no `SessionState`, so it stays outside the R9 type cycle while the
10-
* deferred-interaction-outcome owner (which holds the pending record and the
10+
* daemon's post-gesture-stabilization owner (which holds the pending record and the
1111
* session mutation) stays the one seam callers see. The owner supplies the
1212
* comparators from interaction-outcome-policy; their semantics (subset
1313
* tolerance, identity keying, discriminating entries) are documented there.

‎src/daemon/__tests__/deferred-interaction-outcome.test.ts‎

Lines changed: 0 additions & 198 deletions
This file was deleted.

‎src/daemon/__tests__/is-runtime.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { makeSnapshotState } from '@agent-device/selectors/snapshot-geometry-fix
1313
import type { PostGestureOutcome } from '@agent-device/kernel/snapshot';
1414
import type { DaemonRequest } from '../daemon-request.ts';
1515
import { selectorCaptureFixture } from './selector-capture-fixture.ts';
16-
import { markDeferredInteractionOutcome } from '../deferred-interaction-outcome.ts';
16+
import { markDeferredInteractionOutcome } from '../post-gesture-stabilization.ts';
1717
import { formatPostGestureOutcomeWarning } from '@agent-device/capture-kit/post-gesture-stability';
1818

1919
const { mockRunAppleRunnerCommand } = vi.hoisted(() => ({ mockRunAppleRunnerCommand: vi.fn() }));

‎src/daemon/__tests__/post-gesture-no-effect-claim.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import type { CommandFlags } from '@agent-device/contracts/command';
1616
import {
1717
capturePostGestureStabilizedResult,
1818
markDeferredInteractionOutcome,
19-
} from '../deferred-interaction-outcome.ts';
19+
} from '../post-gesture-stabilization.ts';
2020
import { formatPostGestureOutcomeWarning } from '@agent-device/capture-kit/post-gesture-stability';
2121
import type { PostGestureAction } from '@agent-device/kernel/snapshot';
2222
import type { SessionState } from '../session-state.ts';
@@ -38,7 +38,7 @@ afterEach(() => {
3838
vi.useRealTimers();
3939
});
4040

41-
// Marking is module-private behind the deferred-interaction-outcome interface;
41+
// Marking is module-private behind `markDeferredInteractionOutcome`;
4242
// this shim drives the same public entry every shipping caller uses.
4343
function markPostGestureStabilization(
4444
session: SessionState,

‎src/daemon/__tests__/post-gesture-stabilization-fixtures.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import { makeSnapshotState } from '@agent-device/selectors/snapshot-geometry-fix
33
import type { SessionState } from '../session-state.ts';
44

55
/**
6-
* Shared fixtures for the deferred-interaction-outcome test cluster:
6+
* Shared fixtures for the post-gesture-stabilization test cluster:
77
* post-gesture-stabilization.test.ts (the async capture loop),
88
* post-gesture-stabilization-verdict.test.ts (the pure verdict/classifier
9-
* coverage — split by subject per #1563 review), deferred-interaction-outcome.test.ts,
9+
* coverage — split by subject per #1563 review), post-gesture-no-effect-claim.test.ts,
1010
* and session-snapshot-freshness.test.ts. Not a `.test.ts` file, so vitest
1111
* never tries to run it directly.
1212
*/

0 commit comments

Comments
 (0)