Commit Graph
121 Commits
Author SHA1 Message Date
pj c6efc15951 test(verifier): cover longPresses and scrolls generators 2026-05-31 18:07:37 +05:30
pj dc0026ad37 feat(verifier): wire longPresses and scrolls generators 2026-05-31 18:07:37 +05:30
pj 8ffb174c1b feat(verifier): add LongPress and Scroll action kinds 2026-05-31 18:06:29 +05:30
pj b3742101d1 feat(chrome): implement LongPress as press-and-hold 2026-05-31 18:02:08 +05:30
pj ecaae817a0 feat(mock): record LongPress action 2026-05-31 18:01:38 +05:30
pj fc54e86b17 feat(sidecar): add LongPress client method 2026-05-31 18:01:38 +05:30
pj 55352f72c5 feat(driver): add LongPress to DeviceDriver interface 2026-05-31 18:01:24 +05:30
pj 17fc698e10 fix(chrome): launch with no-sandbox so headless Chrome starts in CI 2026-05-31 17:09:35 +05:30
pj f237eb2c4d test(inspect): update fixtures to use next_action trace field
Aligns inspect tests with the trace schema rename. Step constructors
now set NextAction and the JSONL fixtures use the next_action tag.
2026-05-31 15:40:34 +05:30
pj 7916123458 refactor(inspect): decode trace step's next_action JSON field
Mirrors the trace schema rename of action to next_action. The summary
shape exposed to the SPA (action_kind/action_label) keeps its current
JSON tags since these are derived labels, not the raw next-action.
2026-05-31 15:40:04 +05:30
pj 332e7a034d refactor(runner): assign trace action to Step.NextAction field
Follows the rename of trace.Step.Action to Step.NextAction. The runner
already computed the next iteration's action here; only the field name
changes.
2026-05-31 15:39:43 +05:30
pj 4ee3d97cff refactor(trace): rename Step.Action to Step.NextAction
The trace step's action field is the action chosen FOR THE NEXT iteration
based on observing this step's hierarchy, not the action that produced
this step. Rename Step.Action to Step.NextAction and the JSON tag to
next_action to make causality explicit at the data level.
2026-05-31 15:39:32 +05:30
pj 8d29b2906f test(runner): cover transitional step skips verifier and clean control 2026-05-31 15:36:04 +05:30
pj d83b2f8da1 fix(runner): skip verifier for transitional trees after retry budget
When fetchSyncedState exits its retry loop with a tree that still shows a NavHost cross-fade, the runner now marks the step transitional, writes the step + screenshot to the trace, and skips Verifier.PushSnapshot / EvaluateProperties / ChangedExtractors so the previous-to-current extractor advance is not poisoned by transient state. The next clean step's previous still references the prior clean state. NextAction continues to run so the loop never deadlocks on a never-stabilizing screen.
2026-05-31 15:35:03 +05:30
pj 2d2c11f830 feat(trace): add Transitional flag to Step 2026-05-31 15:33:25 +05:30
pj 56b762deac test(driver): cover Snapshot in proto descriptor and sidecar client
Adds Snapshot to the descriptor allowlist and a sidecar-client test that
asserts both fields come back over the wire.
2026-05-31 15:28:50 +05:30
pj 5c58610181 test(runner): assert step uses Snapshot, not raw hierarchy/screenshot
TestRunner_UsesAtomicSnapshot catches regressions to the two-goroutine
race, and the existing parallel-fetch test now keys off ActionSnapshot.
2026-05-31 15:27:45 +05:30
pj 1931c0b57f refactor(runner): observe each step via the atomic Snapshot RPC
fetchSyncedState now issues one Snapshot per attempt so hierarchy and
screenshot describe the same on-device frame. The transitional retry
stays: that case handles a fully-captured but mid cross-fade frame,
which atomic capture cannot fix.
2026-05-31 15:27:39 +05:30
pj c57be03b69 feat(driver): add Snapshot to chrome and mock drivers
The chrome tab is single-threaded so its Snapshot pairs the two reads
without extra locking. The mock records ActionSnapshot so tests can
assert the runner reaches for the paired RPC.
2026-05-31 15:26:03 +05:30
pj c11beb1728 feat(driver): expose Snapshot on DeviceDriver and sidecar client
Snapshot wraps the new atomic-snapshot gRPC: the runner gets hierarchy
and screenshot from one round-trip whose two reads are serialized on
the sidecar side.
2026-05-31 15:25:58 +05:30
pj a1390aecdd test(runner): cover startup gate waiting for app window to draw 2026-05-31 14:35:04 +05:30
pj 5be6eaaad5 test(mock): add FocusedWindowApp with foreground mirroring 2026-05-31 14:34:40 +05:30
pj 06213e444e fix(runner): gate first observe on the app window being drawn, not just resumed 2026-05-31 14:33:09 +05:30
pj 3fe92537be feat(driver): add FocusedWindowChecker capability 2026-05-31 14:30:36 +05:30
pj 2fe01ea254 feat(android): detect focused-window package via dumpsys window 2026-05-31 14:30:10 +05:30
pj d733218c40 test(hierarchy): cover package derivation from resource-id 2026-05-31 12:59:20 +05:30
pj 8401ae908f feat(hierarchy): derive package from resource-id prefix
The Android sidecar omits an explicit package attribute, so the verifier's package scope filter was a no-op and the keyboard still leaked into targets. Native nodes carry their package as the resource-id prefix; derive it there when the attribute is absent. Compose testTags are colon-less and stay empty, keeping them in scope.
2026-05-31 12:59:20 +05:30
pj 6d3561bf6c test(verifier): cover package-scoped target selection 2026-05-31 12:50:30 +05:30
pj 6d0f81ffa2 feat(testrun): pass app package into verifier scope filter 2026-05-31 12:50:30 +05:30
pj 15f3906f1c feat(verifier): scope random-action targets to app package
Random tap/doubleTap/type/swipe candidates now exclude nodes whose package differs from the app under test, so exploration never fuzzes the soft keyboard, system UI, or permission dialogs. An unset app package or an element with no package stays in scope, preserving behavior on iOS.
2026-05-31 12:50:26 +05:30
pj 16a9136b28 test(runner): cover startup foreground gate and back-press 2026-05-31 12:12:58 +05:30
pj f22e1bada8 feat(runner): gate first action on app reaching foreground 2026-05-31 12:12:58 +05:30
pj ddec95a2c5 feat(runner): re-fetch on transitional hierarchy capture
Some actions trigger async work (DB write, ViewModel coroutine) whose
navigation transition begins after the sidecar settle poll has already
exited. Without intervention, the next iteration's hierarchy fetch
lands mid cross-fade and the verifier observes a partial extractor
state which then surfaces as a false-positive violation at the step
where the transition completes.

fetchSyncedState pairs hierarchy + screenshot in one goroutine and
retries the pair (up to 4 times, 200ms apart) while the captured tree
contains more than one route-level *Screen tag. Steps that observe
no transition get no added cost; steps that catch a transition pay
up to ~600ms extra wall time but record a tree that matches the
post-transition state the property language expects to compare.
2026-05-31 12:11:29 +05:30
pj e44ad56749 feat(trace): emit extractor_changes per step
Add ExtractorChanges to trace.Step and a runner helper that converts
the verifier's diff map into the trace shape. The inspect UI keys
its violation breadcrumbs off this field.
2026-05-30 21:58:08 +05:30
pj c66c4e0ad4 test(verifier): cover ChangedExtractors diffs
Verify initial snapshot reports both named and fallback-named
extractors, a subsequent change surfaces prev/curr, and a no-op
snapshot leaves the diff empty.
2026-05-30 21:58:04 +05:30
pj 419a2d564e feat(verifier): track extractor value transitions
Cache each extractor's prior and current JSON-encoded value during
PushSnapshot; expose ChangedExtractors to surface per-step diffs the
runner can emit into the trace. The first observation flushes every
non-null extractor as a change so the inspect UI shows initial state
breadcrumbs alongside later transitions.
2026-05-30 21:57:59 +05:30
pj 1b35e5a6a6 feat(verifier): name extractors for diff surfacing
bindExtract accepts an optional name argument; falls back to
extractor_N when omitted. The name is stored on extractorState
alongside prev/curr value caches that the next change will use to
emit per-step diffs.
2026-05-30 21:54:30 +05:30
pj fb69c1b774 refactor(runner): one concurrent screenshot per step
Move screenshot capture into the post-action errgroup so it observes
the same UI moment as the hierarchy fetch. Drop the pre-action and
deferred -after captures. Skip WaitForIdle when the action is Wait
since the wait itself provides settling time.
2026-05-30 21:48:21 +05:30
pj 095b58afcf refactor(trace): drop WriteScreenshotAfter
Only one screenshot per step is captured now (concurrently with
hierarchy after settle), so the -after.png variant is unused.
2026-05-30 21:48:17 +05:30
pj 352118c199 fix(verifier): canonicalize selector strings
Object/chain JS selectors used to fall through to goja's default
stringification, producing "[object Object]" tags that surfaced as
garbage in trace.action.selector. Emit canonical "k:v" / " > "-joined
strings instead so the tag round-trips back through the hierarchy
selector grammar.
2026-05-30 21:43:27 +05:30
pj c69052ae89 style(verifier): use maps.Copy for verdict snapshot 2026-05-30 16:33:23 +05:30
pj 60c4ef7458 refactor(runner): emit onset-only violations to trace and summary
Switch the per-step violation list from the sticky verdict map to the
verifier's onset set. Each property now appears exactly once across a
run: at the step it first violates, not on every subsequent step where
the residual stays false. Removes the dead violationNames helper.
2026-05-30 16:32:17 +05:30
pj b9fa41553f feat(verifier): track newly-violated property set per step
Sticky `always(P)` violations re-surfaced on every step after onset,
flooding traces and summaries with duplicate records. EvaluateProperties
now diffs against the prior verdict map and records the onset set; a new
NewlyViolatedProperties accessor exposes it so callers can emit each
violation exactly once at its onset step. The verdict-map return is
preserved for residual / current-verdict consumers.
2026-05-30 16:30:37 +05:30
pj 801f09d455 feat(verifier): add doubleTaps random-target generator 2026-05-30 16:00:09 +05:30
pj 87834caf96 test(doubleTap): cover constructor, verifier round-trip, and runner dispatch 2026-05-30 11:05:58 +05:30
pj fb085eeaa0 feat(runner): dispatch DoubleTap as two taps inside one step 2026-05-30 11:05:53 +05:30
pj 6766f1ad58 feat(verifier): bind doubleTap and decode DoubleTap actions 2026-05-30 11:05:50 +05:30
pj dff91095b8 feat(runner): relaunch app when foreground escapes during exploration 2026-05-28 11:23:50 +05:30
pj dea39d3bac feat(sidecar): implement ForegroundApp via adb for android 2026-05-28 11:21:52 +05:30
pj 09528d84e6 feat(android): detect foreground package via adb dumpsys 2026-05-28 11:21:14 +05:30