Commit Graph
175 Commits
Author SHA1 Message Date
pj a15e7a14f9 test(ioscompanion): cover paste threshold, retry flow, and sentinel detection 2026-06-07 00:28:40 +05:30
pj 841497cc30 perf(ioscompanion): paste long text for atomic landing 2026-06-07 00:28:40 +05:30
pj 2e817e3167 fix(ioscompanion): wait out unresolved accessibility values after launch 2026-06-07 00:28:40 +05:30
pj 93b62d4aa5 fix(ioscompanion): reinstall via simctl and sanitize companion env 2026-06-06 23:56:08 +05:30
pj 5ab2991dd0 test(ioscompanion): cover install payload chunking 2026-06-06 23:53:38 +05:30
pj f3d3068f4f fix(ioscompanion): chunk install payload under companion message cap 2026-06-06 23:53:38 +05:30
pj 4d72be80d6 test(ioscompanion): prove companion child outlives startup context 2026-06-06 23:51:53 +05:30
pj 8fb7dd9f89 fix(ioscompanion): spawn companion under driver-lifetime context 2026-06-06 23:51:53 +05:30
pj 29b5752e44 fix(doctor): probe simctl via xcrun instead of PATH lookup 2026-06-06 23:47:00 +05:30
pj 34cfba4221 style: gofmt struct alignment drift 2026-06-06 23:45:13 +05:30
pj 571dd414f5 chore(folio): wire gates recipe, app path, and ignore gate output 2026-06-06 23:45:13 +05:30
pj e90453d9b9 feat(folio): add iOS conformance gate script 2026-06-06 23:45:13 +05:30
pj f4e5479558 test(folio): add gate-analyzer fixtures for G1-G5 2026-06-06 23:45:13 +05:30
pj 02bbeb8190 feat(doctor): split iOS checks into simulator and physical-device paths 2026-06-06 23:45:13 +05:30
pj 30c84288f5 feat(cli): add --ios-app-path flag 2026-06-06 23:45:13 +05:30
pj 20dab0ae2f refactor(testrun): defer the java preflight check to the physical-device path 2026-06-06 23:45:13 +05:30
pj 75d4294601 feat(testrun): route iOS simulators through the native companion driver 2026-06-06 23:45:13 +05:30
pj 966aeba6c0 feat(ios): add ResolveTarget for simulator vs physical-device routing 2026-06-06 23:45:13 +05:30
pj 6a5ea5fb83 test(ioscompanion): gated companion smoke test 2026-06-06 23:45:13 +05:30
pj 2bb2bdb2f7 test(ioscompanion): unit tests with fake companion transport 2026-06-06 23:45:12 +05:30
pj 034f8d1308 feat(ioscompanion): implement DeviceDriver with companion supervision 2026-06-06 23:45:12 +05:30
pj f73fc898dd feat(ioscompanion): add Describe to companion transport 2026-06-06 23:45:12 +05:30
pj 222a51cb93 test(ioscompanion): cover input composers, paste dialog loop, and pure helpers 2026-06-06 23:20:03 +05:30
pj c2746610bf feat(ioscompanion): text input and gesture HID composition with pasteboard fallback 2026-06-06 23:20:03 +05:30
pj bc1b71f5e2 test(ioscompanion): add gated simulator integration smoke test 2026-06-06 23:20:03 +05:30
pj 02e4010344 test(ioscompanion): cover Dial, process-state mapping, and install archive 2026-06-06 23:20:03 +05:30
pj d2f39d84a6 test(ioscompanion): cover HID builders and unit conversions 2026-06-06 23:20:03 +05:30
pj c8c405b6b3 feat(ioscompanion): wire gRPC companion client and Dial 2026-06-06 23:20:03 +05:30
pj 9d52b20d89 feat(ioscompanion): add HID event wrapper and builders 2026-06-06 23:20:03 +05:30
pj 0ceddf409c feat(ioscompanion): add transport companion interface 2026-06-06 23:20:03 +05:30
pj 3d17559455 build: embed companion assets via withcompanion tag 2026-06-06 23:10:00 +05:30
pj 9253a67abc test(ioscompanion): cover keymap branches and paste-chord constants 2026-06-06 23:10:00 +05:30
pj 68affe4a1c feat(ioscompanion): add USB HID keymap module 2026-06-06 23:10:00 +05:30
pj f718ed8a36 test(ioscompanion): cover settle transitional, hash, streak, and cap rules 2026-06-06 23:10:00 +05:30
pj 4e29850747 feat(ioscompanion): port screen-settle stability polling to Go 2026-06-06 23:10:00 +05:30
pj 476f099b2f test(ioscompanion): add hierarchy-map golden and unit tests 2026-06-06 23:10:00 +05:30
pj 7f0f9a2336 feat(ioscompanion): map flat companion describe dump to TreeNode JSON 2026-06-06 23:10:00 +05:30
pj 2c2b9e2e81 feat(ioscompanion): commit generated companion gRPC stubs 2026-06-06 23:10:00 +05:30
pj 48991a2c74 build(proto): exclude pinned companion proto from root buf workspace 2026-06-06 23:10:00 +05:30
pj 1a7e7339a8 build(proto): add dedicated buf module and gen template for pinned proto 2026-06-06 23:10:00 +05:30
pj 13dfaf9d6f build(proto): pin simulator companion proto v1.1.8 2026-06-06 23:10:00 +05:30
pj b67c2a8f61 chore: ignore vendored companion bundle artifact 2026-06-06 23:09:59 +05:30
pj d9398166ea docs: add third party notices for vendored companion 2026-06-06 23:09:59 +05:30
pj f67cb8a00c test(ioscompanion): cover companion stub and embedded extraction 2026-06-06 23:09:59 +05:30
pj 6c4f00abad feat(ioscompanion): embed and extract simulator companion bundle 2026-06-06 23:09:59 +05:30
pj 27f7986545 chore(ioscompanion): add companion asset prepare script 2026-06-06 23:09:59 +05:30
pj 49af9f64ee perf(ios): use prebuilt XCTest runner to cut startup 2026-06-06 22:56:29 +05:30
pj 94d9511312 test: full test-suite refactor sweep (#61)
* chore(test): start test-suite refactor sweep

* test(ltl): pin exact multi-obligation residual AST

* test(ltl): table-test finalize Kleene connective combinations

* test(ltl): pin reduce over pending inner for bound, Or, Not

* test(ltl): marshal bounded Always steps/duration/deadline

* test(verifier): cover LTL combinator verdict transitions and within unit panic

* test(verifier): table-test DecodeAction kinds and lastAction field exposure

* test(verifier): assert WithPlatform(ios) reaches the picker host and key pool

* test(verifier): widen weighted-selection assertion to a 5x skew margin

* test(verifier): un-skip ax-find round trip with a committed tree fixture

* test(runner): pin isWDADrop to sidecar reconnect-failed message origin

* test(runner): assert PressKey/Wait trace encoding records kind-specific fields

* test(runner): cover RenderSummary unsupported-verbs surfacing branch

* test(trace): set Hierarchy in round-trip and lock lossy Tree contract

Also add a -race concurrent WriteStep test that asserts N well-formed JSONL lines, catching torn lines if the writer mutex is dropped.

* test(trace): round-trip witnesses/changes/metrics/exceptions, pin step-0 witness

* test(trace): document ViolationsAreGreppable grep contract and lock-free WriteScreenshot

* test(hierarchy): cover invalid-JSON and malformed-bounds parser paths

* test(trace): guard writer mutex via WriteStep/Close race on w.file

* test(replay): drop unfailable assets and devproxy assertions

* test(replay): cache reuses on equal mtime, reparses after append

* test(replay): violation marker falls back to detection step when attributed missing

* test(replay): corrupt meta/trace dirs return 500 with error body

* test(replay): SSE client receives runs.changed after a broadcast

* test(replay): Run coalesces creates, ignores write/chmod, closes subs on cancel

* fix(sidecar): synchronize health fixture writes and exercise healthError

* test(sidecar): cover swipe/longpress/doubletap/erase/presskey/metrics/logs translations

* test(sidecar): cover DoubleTapSelector composition and mid-gesture cancel

* test(sidecar): assert gRPC error status surfaces from action RPC

* fix(chrome): route action methods through runCtx so caller cancellation aborts CDP

* fix(chrome): route hierarchy/screenshot/waitidle/metrics through runCtx

* refactor(ios): extract pure simctl JSON parsers

* refactor(ios): add command-runner seams for EnsureSimulator

* test(ios): table-test simctl parsers and EnsureSimulator seams

* test(sidecarassets): cover placeholder build path

* test(sidecarassets): assert reuse via sentinel bytes not mtime

* test(bundler): cover properties-only spec registration

* refactor(testrun): extract prepareBundleInputs from Execute

* test(testrun): cover prepareBundleInputs aliases and missing-runtime error

* test(testrun): table-test resolveRuntimeSibling search edges

* test(testrun): exact-output tests for progressHandler line format

* fix(cmd): point bundle-check aliases at pkg/spec/src

* test(cmd): smoke-test bundle-check resolves spec aliases

* test(cmd): table-test hier-check parse and FindAll on fixture

* test(cmd): unit-test buildBrowseURL deep-link vs root

* test(cmd): drop flaky TestRun_Doctor that launched real Chromium

* test(cmd): pin pipeline error to bundle resolution on web platform

* test(replay-ui): add bun test script

* ci(replay-ui): run bun test via make web-test target

* ci(replay-ui): point bun cache key at replay-ui/bun.lock

* test(replay-ui): exercise real URL encoding and non-ok throw in getJson

* refactor(replay-ui): extract snapshot flatten/getAtPath into lib module

* test(replay-ui): pin snapshot flatten/getAtPath path round-trip

* refactor(replay-ui): extract action selector/format into lib module

* test(replay-ui): pin action selector parse and row formatting

* refactor(replay-ui): share one statusFor between panels

* refactor(replay-ui): extract run-history derivation into lib module

* test(replay-ui): pin shared statusFor precedence and ordering

* test(replay-ui): pin run-history derivation alignment

* refactor(replay-ui): export clampIndex for testing

* refactor(replay-ui): extract keyboard-nav dispatch into pure module

* refactor(replay-ui): extract metrics formatters into lib module

* test(replay-ui): pin clampIndex step boundaries

* test(replay-ui): pin keyboard-nav ownership and key routing

* test(replay-ui): pin metrics formatters and path gap handling

* refactor(sidecar): expose device-output parsers as internal for testing

* test(sidecar): table-test device-output parsers against malformed input

* test(sidecar): cover logcat parsing year inference and line skipping

* test(sidecar): pin pressKey keycode mapping and unknown-key rejection

* test(sidecar): metrics bundleId falls back to launched app and honors override

* test(sidecar): loosen deadline upper bound to tolerate slow CI scheduling

* test(web-runtime): export selector builders for unit tests

* test(web-runtime): guard sanitize cycle, function, and depth limits

* test(web-runtime): table-test selector builder quoting and escaping

* test(sidecar): collapse scalar-forwarding RPC tests into a table

* test(replay-ui): dedup step/summary fixtures into shared module

* test(ios): collapse pickSimulator point-tests into a table
2026-06-06 13:59:08 +05:30
pj 410602d2e1 Fix action-system audit findings (#60)
* fix(replay-ui): size overlay viewBox from hierarchy root bounds

Tap points are recorded in the hierarchy's coordinate space (iOS points,
Android pixels, web CSS px) while screenshots are device pixels, so the
overlay rendered at 1/3 position on iOS 3x screens. Derive the viewBox
from the root element bounds; natural image size stays the fallback.

* fix(runner): derive trace tap point from resolveCoordinates

stampSelectorTarget preferred possibly-stale action X/Y while dispatch
preferred the fresh tree-resolved center, so the trace could record a
different point than the one tapped. Both now share resolveCoordinates.

* fix(runner): settle after InputText focus tap before key events

The focus tap raises the keyboard; with no settle the keyboard
animation races the erase/type key events on iOS, landing them in the
wrong field or dropping them. Wait for idle after a successful focus
tap, bounded by the run's idle timeout.

* fix(driver): skip pre-erase for replace-on-input drivers

The web driver's InputText already replaces content via select-all, so
the runner's unconditional EraseText was a redundant round-trip on
every InputText. A new optional TextReplacer capability lets a driver
assert replace semantics; the runner skips the erase when asserted.

* fix(hierarchy): rank spatial-fallback matches by specificity

The bounds-containment fallback returned the first pre-order match, so
a screen-sized container could win over the intended small element.
Matches are now ordered smallest-area first; equal-area matches keep
pre-order, preserving the iOS-flat equal-bounds sibling pattern.

* fix(runner): treat an unchanging transitional tree as settled

A UI persistently showing two route-level Screen ids (overlay, both
route ids alive at rest) burned the full retry budget every step and
skipped the verifier forever. A tree byte-identical to the previous
attempt now breaks the retry loop as settled; genuine cross-fades
differ between attempts and keep the retry/skip behavior.

* fix(replay-ui): skip synthetic zero-bounds root in deviceSpaceOf

The iOS hierarchy prepends a zero-bounds node before the real root
window, so elements[0] returned undefined and the overlay fell back to
the screenshot's pixel size. Take the first element with positive
extent instead; pre-order puts the root window before any content.
Verified against a real iOS trace in the replay UI.

* fix(sidecar): never replay non-idempotent actions after reconnect

A dropped connection mid-action (e.g. a read timeout while the device
is still typing) re-ran the whole block after reconnecting, typing the
text twice and double-firing taps. Non-idempotent actions now reconnect
for the next RPC's benefit but surface UNAVAILABLE, which the runner
already treats as transient; idempotent reads keep the replay.

* fix(sidecar): land the second double-tap sequentially on gesture collision

The overlapped second tap can hit the XCTest runner while the first
gesture is still executing ('only one gesture can be performed at a
time'), failing the step. The second tap now waits the first out and
retries once, keeping the tight gap on the happy path.

* fix(sidecar): map non-Exception throwables to INTERNAL status

The vendored iOS client throws failures that do not extend Exception;
runRpc missed them, killing the RPC as a channel-level Unknown the
runner cannot classify. Catch Throwable instead.

* feat(sidecar): close the driver and app under test on shutdown

* test(sidecar): cover service shutdown paths

* fix(testrun): stop the sidecar with SIGTERM before killing

* fix(sidecar): reap orphaned XCTest runner sessions at iOS init

* fix(sidecar): probe channel liveness before restarting the XCTest runner

* test(sidecar): cover WdaRecovery restart and retry policy

* fix(sidecar): absorb first-leg double-tap collision sequentially

* fix(runner): scope WDA-drop detection and cap consecutive transient failures

* chore(sidecar): silence vendored loggers on expected failure paths

* fix(runner): absorb one-off apply errors; only an unbroken streak aborts

* fix(folio): install the current build before the Android fuzz run

* chore(sidecar): silence absorbed view-hierarchy poll noise in Android runs

The driver logs an ERROR for every on-device view-hierarchy fetch that the
device-side server cancels or times out while the UI animates. The stability
poll fetches the hierarchy on a sub-second cadence and swallows those throws
to keep polling, so each line is advisory with no effect on the run. Real
failures still reach the runner as gRPC status errors, so nothing is lost.
2026-06-06 12:21:11 +05:30
pj 9958b0ddc8 Attribute violations to the causing step and render witness evidence (#59)
* feat(ltl): attribute violations to the obligation origin step

* feat(verifier): label evaluator observations with the runner step index

* feat(trace): carry the causing step in violation witnesses and summary

* feat(replay): move the violation marker to the causing step

* feat(replay-ui): render witness evidence in the violations panel

* feat(replay-ui): wire witnesses and step jump into violation panels

* fix(ltl): treat next obligations as vacuous at run end

* fix(runner): give the finalize trace record its own step index
2026-06-05 23:46:36 +05:30