* perf(agent): replayed trace actions carry the test origin
A replay executes recorded actions with no model reading the screen after
them; only its own relocation looks, and it polls. So a replayed action is
a deterministic step to the engine: on agent-device it acts without the
settle wait, under the same transition budget a test's tap gets. The step
accounting learns the replay span from the cache session's replaying hook
and stamps origin 'test' on the actions inside it.
* fix(agent): a replayed navigation carries the test origin too
navigate takes the step's full operation context rather than the targeted
one; the replay stamp now applies to both.
* perf(agent-device): deterministic steps act at once; settle is for the agent
A test's step verifies its outcome with expect, so it never waits for the
screen to settle. The runner now tells engines who is acting through
OperationContext.origin ('test' from the locator engine, 'agent' from the
act loop), and the device engine settles only agent actions.
The one wait a test keeps is the transition budget: accessibility frames
report a control's final position from the first frame of a transition,
so a modal's button or an alert's OK looks landed while it is still
sliding, and a tap there hits what is behind it. A control that appeared
or moved with the previous action waits out the budget (500 ms, counted
from that action's return); one already in place is acted on at once.
Nothing is observed for this, so idle steps pay nothing.
react-native-pager-view, 11 tests, one iPhone 17 Pro simulator:
190 s with agent-device's 500 ms settle, 142 s with 150 ms, 117 s now,
three runs each, all passing. Taps average 673 ms against a 600 ms
XCTest floor; the waiting moved into expect, which polls.
* fix(agent-device): transition guard edge cases from review
A transition wait that is cancelled no longer lets the action behind it
go out; a launch records no screen before it, so every control of the new
screen waits its budget; a toggle already in the wanted state sends
nothing and is not recorded as an action.