Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(replay): carry optional-skip warnings to every human surface and hint iOS viewport refusals - #2571

Open
thymikee wants to merge 3 commits into
mainfrom
t3code/fix-2560-quality-review
Open

fix(replay): carry optional-skip warnings to every human surface and hint iOS viewport refusals#2571
thymikee wants to merge 3 commits into
mainfrom
t3code/fix-2560-quality-review

Conversation

@thymikee

Copy link
Copy Markdown
Member

Summary

Refs #2560 (capture-routing/lineage half stays with #2450/#2485).

An optional: true Maestro step that skipped left a warning that vanished from human output the moment a later step failed — the repro printed a bare REPLAY_DIVERGENCE with no trace of the 7s skip. Warnings now travel with the run whether it passes or fails:

Test summary: 0 passed 1 failed, 1 failed in 9.4s

Warnings:
  sign-in [01-login.yaml]: warning: Optional Maestro assertVisible skipped at line 3: ...
  • Engine emits the accumulated warnings on the step-failure event; the daemon copies them onto the failure response's error details (scrubbed against replay vars); the failed test result gained the warnings array the passing result already had; the default reporter's Warnings: section, JUnit lines, failing replay stderr, and MCP error text all render them.
  • A regular iOS presentation refusal now carries a hint pointing at snapshot --raw; when the tree came from a system surface (e.g. SafariViewService sheet) the hint names the surface and error details carry its registry identity, so a capture-boundary miss stops looking like a selector bug.

37 files; the deep test-vs-replay routing diff is not in this PR.

Validation

Tested at fb07951; pnpm check:affected --run passed on that head (format, lint, typecheck, unit lanes incl. apple-runner, output-economy, maestro-compat, fallow, layering, wire/replay-compat, command-docs). New tests are red without their respective hunks. No device run: changes are response/reporter plumbing only; the reporter-path fix is fixture-proven, the live SafariViewService scenario remains reproducible only on the reporter's host.

…hint viewport 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.
The skip warning also appends the skipped failure's hint, so guidance that
lived only in error details reaches the terminal.

A regular iOS presentation refusal now carries a hint pointing at
`snapshot --raw`, and when the tree came from a system surface the hint
names that surface and the error details carry its registry identity, so an
`optional` capture miss caused by the acquisition boundary stops looking
like a selector problem.
A failing `replay` still printed no trace of the run's accumulated warnings:
the human error renderer read message, hint, and divergence but never the
error-level warnings channel, so the pass/fail asymmetry survived on that
surface. It now prints each warning after the error.

Round-two corrections: warnings on the divergence response are scrubbed
against replay vars like message and hint already are; a failed attempt
copies warnings only when non-empty, matching the passing branch; the
optional-skip hint append is removed because no producer of a maestro test
failure emits a hint — capture-error lineage stays with #2450 — along with
the CHANGELOG claim it rested on; the failed-result copy gains its own
module test, and JUnit covers a failed test's warning lines.
…ays present

An empty array and an absent key said the same thing two ways, so every
consumer needed both guards. The failed outcome now always carries the
warnings array, like the passed outcome already did, and the result builder
narrows the attempt once instead of per field. This also removes the clone
the shared candidate-view formatter had grown between the CLI and MCP error
renderers — the MCP error text gained the same warnings lines the CLI
stderr prints.
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callstack.github.io/agent-device/pr-preview/pr-2571/

Built to branch gh-pages at 2026-09-13 19:01 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
Installed (including dependencies) 4.52 MB 4.52 MB +1.4 kB
Package (unpacked) 4.52 MB 4.52 MB +1.4 kB
Package (download) 1.33 MB 1.33 MB +419 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 25.5 ms 25.6 ms +0.1 ms
CLI --help 73.7 ms 73.7 ms +0.0 ms

@thymikee

Copy link
Copy Markdown
Member Author

No code findings at fb07951: skipped-step warnings reach the failure response and human reporters, with replay-variable scrubbing preserved. Checks are green. The Apple presentation hint is also a changed device-facing path, so fixture evidence alone leaves a validation gap: please record a live simulator refusal on a confirmed SafariViewService sheet and verify the hint and systemSurface details. The underlying sheet-interaction fix remains outside this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant