@@ -117,7 +117,7 @@ extension RunnerTests {
117117 // `boundedBlockingSystemAlertSnapshot`'s probe closure (see `systemModalProbeOverrideForTesting`
118118 // in RunnerTests.swift), so reverting this entry point to bypass the bounded probe fails the
119119 // regression test.
120- func snapshotFast ( app : XCUIApplication , options : SnapshotOptions ) throws -> DataPayload {
120+ func snapshotFast ( app : XCUIApplication , options : PresentationOptions ) throws -> DataPayload {
121121 let deadline = Date ( ) . addingTimeInterval ( Self . snapshotPlanBudget )
122122 if let blocking = boundedBlockingSystemAlertSnapshot ( deadline : deadline ) {
123123 return blocking
@@ -131,10 +131,10 @@ extension RunnerTests {
131131 )
132132 }
133133
134- func recursiveTreeSnapshotPayload (
134+ func recursiveTreeSnapshotAcquisition (
135135 context : SnapshotTraversalContext ,
136- options : SnapshotOptions
137- ) -> DataPayload {
136+ options : PresentationOptions
137+ ) -> SnapshotAcquisition {
138138 var cachedDescendantElements : [ XCUIElement ] ?
139139 func collapsedTabDescendants ( ) -> [ XCUIElement ] {
140140 if let cachedDescendantElements {
@@ -315,14 +315,15 @@ extension RunnerTests {
315315
316316 }
317317
318- return DataPayload (
319- presenting : applyHiddenContentHints ( hiddenContentHintsByNodeIndex , to : nodes ) ,
320- truncated : false
318+ return SnapshotAcquisition (
319+ nodes : applyHiddenContentHints ( hiddenContentHintsByNodeIndex , to : nodes ) ,
320+ truncated : false ,
321+ effectiveDepth : nil
321322 )
322323 }
323324
324325 // See `snapshotFast` above: the single production entry point, no unit-test overload.
325- func snapshotRaw ( app : XCUIApplication , options : SnapshotOptions ) throws -> DataPayload {
326+ func snapshotRaw ( app : XCUIApplication , options : PresentationOptions ) throws -> DataPayload {
326327 let deadline = Date ( ) . addingTimeInterval ( Self . snapshotPlanBudget )
327328 if let blocking = boundedBlockingSystemAlertSnapshot ( deadline : deadline ) {
328329 return blocking
@@ -418,10 +419,10 @@ extension RunnerTests {
418419 return min ( budget , deadlineRemaining )
419420 }
420421
421- func rawTreeSnapshotPayload (
422+ func rawTreeSnapshotAcquisition (
422423 context : SnapshotTraversalContext ,
423- options : SnapshotOptions
424- ) throws -> DataPayload {
424+ options : PresentationOptions
425+ ) throws -> SnapshotAcquisition {
425426 var nodes : [ RawAXNode ] = [ ]
426427
427428 func walk ( _ snapshot : XCUIElementSnapshot , depth : Int , parentIndex : Int ? ) throws {
@@ -460,19 +461,19 @@ extension RunnerTests {
460461 }
461462
462463 try walk ( context . rootSnapshot , depth : 0 , parentIndex : nil )
463- return DataPayload ( presenting : nodes , truncated : false )
464+ return SnapshotAcquisition ( nodes : nodes , truncated : false , effectiveDepth : nil )
464465 }
465466
466- func snapshotFlatInteractive (
467+ func querySweepSnapshotAcquisition (
467468 app : XCUIApplication ,
468- options : SnapshotOptions ,
469+ options : PresentationOptions ,
469470 planDeadline : Date = . distantFuture
470- ) -> DataPayload {
471+ ) -> SnapshotAcquisition {
471472 var nodes : [ RawAXNode ] = [
472473 interactiveRootNode ( rect : . zero )
473474 ]
474475 if options . depth == 0 {
475- return DataPayload ( presenting : nodes , truncated : false )
476+ return SnapshotAcquisition ( nodes : nodes , truncated : false , effectiveDepth : nil )
476477 }
477478
478479 // Bounded by both its own sweep budget and the umbrella capture-plan deadline, so a
@@ -543,7 +544,7 @@ extension RunnerTests {
543544 )
544545 )
545546 }
546- return DataPayload ( presenting : nodes , truncated : truncated )
547+ return SnapshotAcquisition ( nodes : nodes , truncated : truncated , effectiveDepth : nil )
547548 }
548549
549550 func snapshotAccessibilityUnavailable ( failure : SnapshotCaptureFailure ) -> DataPayload {
@@ -588,7 +589,7 @@ extension RunnerTests {
588589 ) -> DataPayload {
589590 return DataPayload (
590591 message : message ,
591- nodes : SnapshotPresentation . preservingCurrentSemantics ( [ interactiveRootNode ( rect : . zero ) ] ) ,
592+ nodes : [ SnapshotPresentation . singleElementRead ( interactiveRootNode ( rect : . zero ) ) ] ,
592593 truncated : true ,
593594 snapshotQuality : snapshotQuality ,
594595 runnerFatal : runnerFatal ,
@@ -669,7 +670,7 @@ extension RunnerTests {
669670 /// assertion instead of racing a fixed-timing guess.
670671 private func assertBoundedSystemModalProbeTimeoutRecoversThenReleasesOnDrain (
671672 entryPointName : String ,
672- callEntryPoint : @escaping ( XCUIApplication , SnapshotOptions ) throws -> DataPayload
673+ callEntryPoint : @escaping ( XCUIApplication , PresentationOptions ) throws -> DataPayload
673674 ) {
674675 let targetBundleId = " com.callstack.agentdevice.runner.missing.snapshot-timeout-test "
675676 let snapshotTarget = XCUIApplication ( bundleIdentifier : targetBundleId )
@@ -707,7 +708,7 @@ extension RunnerTests {
707708 DispatchQueue ( label : " agent-device.runner.tests.modal-probe-timeout " ) . async {
708709 box . payload = try? callEntryPoint (
709710 snapshotTarget ,
710- SnapshotOptions ( interactiveOnly : false , depth : nil , scope : nil , raw : false )
711+ PresentationOptions ( interactiveOnly : false , depth : nil , scope : nil , raw : false )
711712 )
712713
713714 // 1) Penalty/busy accounting: must already be in place by the time the entry point
@@ -874,7 +875,7 @@ extension RunnerTests {
874875 label : String ,
875876 identifier : String ,
876877 valueText : String ? ,
877- options : SnapshotOptions ,
878+ options : PresentationOptions ,
878879 hittable : Bool ,
879880 visible : Bool ,
880881 regularSnapshot : Bool = false
@@ -926,7 +927,7 @@ extension RunnerTests {
926927
927928 func makeSnapshotTraversalContext (
928929 app : XCUIApplication ,
929- options : SnapshotOptions ,
930+ options : PresentationOptions ,
930931 captureDeadline : Date = . distantFuture ,
931932 treeCaptureSliceBudgetOverride : TimeInterval ? = nil
932933 ) throws -> SnapshotTraversalContext ? {
@@ -1567,7 +1568,7 @@ extension RunnerTests {
15671568 index : Int ,
15681569 parentIndex : Int ? ,
15691570 viewport : CGRect ,
1570- options : SnapshotOptions
1571+ options : PresentationOptions
15711572 ) -> RawAXNode ? {
15721573 var node : RawAXNode ?
15731574 let exceptionMessage = RunnerObjCExceptionCatcher . catchException ( {
0 commit comments