Skip to content

Commit bf2a8d0

Browse files
committed
merge origin/main (union of executed runner-unit test lists)
2 parents b2ed38e + d919876 commit bf2a8d0

24 files changed

Lines changed: 1815 additions & 758 deletions

‎.github/workflows/ios.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ 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 \
109111
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testPreferredPrivateAXBackendPlansAsPenalized \
110112
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testDecodedPreferredBackendReachesOptionsAndApplicablePlan \
111113
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testRunnerScreenshotStabilitySettledNeedsEnoughSamples \

‎CONTEXT.md‎

Lines changed: 10 additions & 0 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

‎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)