fix(apple): carry the runner's sparse verdict through a viewport refusal - #2572
Merged
Conversation
A payload the runner declared sparse carries the backend, reason code, and reason that explain it, yet the daemon dropped all of it while reconstructing a viewport from the synthetic root that sparse payloads always carry. Callers saw only an internal engine invariant. The verdict now travels as error.details.snapshotQuality and the hint composes the shared sparse-capture advice with the presented surface host.
The replay failure wrapper rebuilds cause details from a four-key allowlist, so the verdict a device-facing capture produced could not reach the agent that replayed the step.
Size Report
Startup median (7 runs, lower is better):
|
Member
Author
|
No code findings at c37e17d. The runner’s sparse verdict survives presentation refusal and replay error wrapping, with reported live evidence on two iOS versions. The remaining smoke failure is the same automation-longpress scroll assertion seen on #2565 before its successful retry, so it appears unrelated; rerun that check before merge. Ready for human review. |
|
thymikee
added a commit
that referenced
this pull request
Sep 14, 2026
…name system surfaces in refusals An optional: true Maestro step that skipped stayed a warning that the terminal never printed once a later step failed: the accumulated channel rode only on the success response, so the repro run in #2560 reported a bare failure with no trace of the skip. The engine now emits warnings on the failure event, the daemon copies them onto the failure response's error details, and the failed test result carries the same array the passed result already had; replay prints them through its facet formatter and the test reporter adds a Warnings section that renders whether tests pass or fail. A regular iOS presentation refusal from the runner now also carries the registry identity of the system surface the tree was acquired from in error details, so a capture-boundary miss under optional: true stops looking like a selector problem; the sparse-declared verdict path is owned by #2572.
thymikee
added a commit
that referenced
this pull request
Sep 14, 2026
…name system surfaces in refusals An optional: true Maestro step that skipped stayed a warning that the terminal never printed once a later step failed: the accumulated channel rode only on the success response, so the repro run in #2560 reported a bare failure with no trace of the skip. The engine now emits warnings on the failure event, the daemon copies them onto the failure response's error details, and the failed test result carries the same array the passed result already had; replay prints them through its facet formatter and the test reporter adds a Warnings section that renders whether tests pass or fail. A regular iOS presentation refusal from the runner now also carries the registry identity of the system surface the tree was acquired from in error details, so a capture-boundary miss under optional: true stops looking like a selector problem; the sparse-declared verdict path is owned by #2572.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A capture that no backend could read failed with an internal engine invariant —
regular iOS snapshot presentation requires a valid viewport— naming neither the backend that was asked nor the screen that defeated it. The runner already declares such a payload sparse (backend,reasonCode, its own reason); the daemon read that verdict and then discarded it while reconstructing a viewport from the synthetic root every sparse payload carries.The refusal now carries
error.details.snapshotQuality, and the hint composes the shared sparse-capture advice with the presented surface host.replay/testkeep the verdict inREPLAY_DIVERGENCEdetails instead of truncating to four cause keys. Same command over anASWebAuthenticationSessionsheet, before:details { reason: "invalid-viewport", field: "viewport" }plus a generic hint. After: the same message, plussnapshotQuality: { state: "sparse", backend: "private-ax", reasonCode: "requested-backend", reason: "the private AX backend was selected because this capture asked for accessibility custom actions" }and a hint namingcom.apple.SafariViewService.Refs #2560 — diagnosis, not the flow fix. That flow still fails on this surface until the capture plan stops routing presented out-of-process surfaces to private AX, which ADR 0004 already diagnosed for #2403; that capability declaration is the follow-up. Six files.
Validation
Commit
c37e17d3f7:pnpm check:affected --runpassed (1874 tests);check:quick,check:layering,check:daemon-wire-compatpassed.Live: iPhone 17 Pro simulators on iOS 26.2 and iOS 18.6, UIKit app presenting
ASWebAuthenticationSession, driven by this checkout's CLI — plainsnapshotstayed healthy (35 nodes,backend: tree),snapshot --actionsproduced the quoted pair before and after the change. Manual sessions closed, created simulators deleted.Unresolved risk: whether the reporter's run armed the XCTest-channel penalty needs their runner log (
SNAPSHOT_XCTEST_CHANNEL_PENALIZED/_DEFERRED).