Skip to content

Commit d4b75dd

Browse files
committed
Merge remote-tracking branch 'origin/main' into review-1617
* origin/main: ci: remove package smoke workflow (callstack#1624) fix(ios): pin tap-outcome corroboration probes to the baseline's backend (callstack#1634) refactor: sink backend.ts's cycle-closing types below both zones (callstack#1632) (callstack#1636) refactor(daemon): one interface for the deferred interaction outcome (callstack#1633) feat(ios): extend depth-capped private-AX captures via element-rooted requests (callstack#1627) # Conflicts: # src/daemon/request-generic-dispatch.ts
2 parents 4cf4eb4 + 3d2a9a0 commit d4b75dd

51 files changed

Lines changed: 2211 additions & 893 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ios.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ jobs:
106106
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testBoundedSystemModalProbeTimeoutRecoversThenReleasesOnDrain \
107107
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testBoundedSystemModalProbeTimeoutRecoversThenReleasesOnDrainForSnapshotRaw \
108108
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testSnapshotTraversalIdentityPreservesSameOriginNodesWithDifferentBounds \
109+
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testPrivateAXDepthLimitedRequiresEveryFrontierResolved \
110+
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testDeepExtensionCountsMissedFrontiers \
111+
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testPreferredPrivateAXBackendPlansAsPenalized \
112+
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testDecodedPreferredBackendReachesOptionsAndApplicablePlan \
109113
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testRunnerScreenshotStabilitySettledNeedsEnoughSamples \
110114
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testRunnerScreenshotStabilitySettledTrueWhenWindowMatches \
111115
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testRunnerScreenshotStabilitySettledFalseOnMidWindowMismatch \

‎.github/workflows/package-smoke.yml‎

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

‎CONTEXT.md‎

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,16 @@ task touches:
114114
- Ref generation pin: optional `~s<n>` suffix on an @ref carrying the snapshot generation it was
115115
minted from. Accepted as input everywhere, emitted by no tree output (snapshot token budget),
116116
auto-appended by the MCP layer, stripped and ignored by replay.
117+
- Deferred interaction outcome: the daemon's post-response answer to "did that mutation actually
118+
take effect" — pending interaction outcome retry, post-gesture stabilization, and Android
119+
snapshot freshness recovery. `src/daemon/deferred-interaction-outcome.ts` is its one interface:
120+
every mutating route marks through it after dispatch, and every snapshot capture resolves
121+
through it; the three `SessionState` fields stay with their R7 owners (the module itself owns
122+
`postGestureStabilization`, so the seam adds no node to the R9 cycle). Marking
123+
order is load-bearing (pending outcome retry before stabilization), each marker keeps its own
124+
eligibility gate, and the module owns only these post-action markers — never ADR 0014 ref-frame
125+
expiry or the ADR 0012/0016 staged protocols. Distinct from the same-response settled
126+
observation below.
117127
- Settled observation: opt-in (`--settle`) post-action payload on press/click/fill/longpress — the
118128
quiet-window stable loop re-captures until the UI settles, and the response carries the diff vs the
119129
pre-action tree (changed lines only, added lines with fresh refs, `refsGeneration` when the settled
@@ -312,16 +322,20 @@ The perfect-shape refactor is complete and merged. Its end-state:
312322
theirs.
313323
- Type-cycle growth (R9). R4 keeps the VALUE import graph acyclic, so every remaining cycle is
314324
created by type-only imports — free at runtime, invisible to R5/R6, and the largest single
315-
obstacle to reading a subsystem in isolation: inside a strongly-connected component of 76 files,
325+
obstacle to reading a subsystem in isolation: inside a strongly-connected component of 49 files,
316326
no file has a self-contained slice. `TYPE_CYCLE_BASELINE`, derived from the zone ceilings in
317327
`scripts/layering/daemon-modularity.ts`, ratchets it for **growth only**, deliberately unlike R6: reducing it
318328
is a real refactor rather than a file move, so a hard equality would turn every unrelated
319329
improvement into a baseline edit. A shrunk tree is reported in the success line instead of
320-
failing. Hubs by in-component dependents: `runtime-contract.ts` (25),
321-
`commands/runtime-types.ts` (21), `backend.ts` (15), `commands/runtime-common.ts` (12).
330+
failing. Hubs by in-component dependents: `core/dispatch.ts` (8),
331+
`command-catalog.ts` (7), `commands/interaction/runtime/resolution.ts` (6),
332+
`core/command-descriptor/registry.ts` (6). The former type hubs (`runtime-contract.ts`,
333+
`commands/runtime-types.ts`, `backend.ts`, `commands/runtime-common.ts`) left the cycle when
334+
#1632 sank `backend.ts`'s two upward type imports — 27 files stranded out of the component at
335+
once.
322336
- Daemon modularity ratchets (R10). The same tooling-only declaration pins R7's writer-owned
323-
field/owner-claim counts, R9's 76 members by zone (`commands` 33, `daemon-server` 20, `core` 10,
324-
`platforms` 7, root 5, `client` 1), and the external production importers of `daemon/types.ts`
337+
field/owner-claim counts, R9's 49 members by zone (`commands` 14, `daemon-server` 19, `core` 10,
338+
`platforms` 2, root 3, `client` 1), and the external production importers of `daemon/types.ts`
325339
(down to 2: the client normalizers and remote artifacts). R7 counts and external importers may
326340
only shrink; no zone may grow inside R9, and replay/Maestro/replay-test engine files remain outside
327341
it. This per-zone ratchet is intentionally stricter than R9's ordinary total-growth rule: even

‎apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAXSnapshotBridge.h‎

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,54 @@
33

44
NS_ASSUME_NONNULL_BEGIN
55

6+
/// Keys of the `deepExtension` dictionary in the snapshot response, shared
7+
/// with the Swift consumer so the response shape has one spelling.
8+
FOUNDATION_EXPORT NSString *const RunnerAXSnapshotDeepExtensionKey;
9+
FOUNDATION_EXPORT NSString *const RunnerAXSnapshotDeepExtensionCallsKey;
10+
FOUNDATION_EXPORT NSString *const RunnerAXSnapshotDeepExtensionNodesAddedKey;
11+
FOUNDATION_EXPORT NSString *const RunnerAXSnapshotDeepExtensionPendingKey;
12+
FOUNDATION_EXPORT NSString *const RunnerAXSnapshotDeepExtensionMissedKey;
13+
14+
/// A depth-capped childless node awaiting an element-rooted follow-up request.
15+
/// Public so the runner unit bundle can drive the extension's miss paths with
16+
/// fabricated snapshots — the executed contract that missed frontiers are
17+
/// counted, never silently dropped.
18+
@interface RunnerAXSnapshotFrontier : NSObject
19+
@property(nonatomic, strong, nullable) id snapshot;
20+
@property(nonatomic, strong, nullable) NSMutableDictionary *node;
21+
@property(nonatomic, assign) NSInteger depth;
22+
@end
23+
624
@interface RunnerAXSnapshotBridge : NSObject
725

26+
/// Captures the app's accessibility tree, then chains element-rooted follow-up
27+
/// requests from depth-capped frontier nodes (the AX depth limit is
28+
/// per-request, so re-rooting reaches content the app-rooted request could
29+
/// not). The response gains a `deepExtension` {calls, nodesAdded,
30+
/// pendingFrontiers, missedFrontiers} dictionary when any frontier existed and
31+
/// the call limit allowed extension. Pass 0 to disable extension entirely.
832
+ (NSDictionary<NSString *, id> *)snapshotTreeForApplication:(XCUIApplication *)application
933
maxDepth:(NSInteger)maxDepth
10-
maxNodes:(NSInteger)maxNodes;
34+
maxNodes:(NSInteger)maxNodes
35+
deepExtensionCallLimit:(NSInteger)deepExtensionCallLimit
36+
deadline:(nullable NSDate *)deadline;
1137

1238
+ (NSInteger)processIdentifierForApplication:(XCUIApplication *)application;
1339

40+
/// The frontier-extension loop, exposed for the runner unit bundle: a frontier
41+
/// whose element vanished or whose re-rooted request fails must count as
42+
/// missed (see the deepExtension keys above) — an all-miss extension reporting
43+
/// itself drained would present a capped capture as complete.
44+
+ (nullable NSDictionary *)extendSnapshotFrontiers:(NSMutableArray<RunnerAXSnapshotFrontier *> *)frontiers
45+
axClient:(id)axClient
46+
attributes:(NSArray *)attributes
47+
maxDepth:(NSInteger)maxDepth
48+
maxNodes:(NSInteger)maxNodes
49+
nodeCount:(NSInteger *)nodeCount
50+
truncated:(BOOL *)truncated
51+
callsAllowed:(NSInteger)callsAllowed
52+
deadline:(nullable NSDate *)deadline;
53+
1454
@end
1555

1656
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)