mirror of
https://github.com/callstack/agent-device.git
synced 2026-09-14 20:06:34 +08:00
37895caf99
* test: add pinned Maestro conformance harness * feat: add typed Maestro program IR parser * docs: define direct Maestro engine architecture * test: compare Maestro oracle with typed IR * feat: add direct Maestro program engine * refactor: narrow Maestro execution context * refactor: tighten Maestro program parsing * fix: verify iOS Maestro visibility waits * refactor: isolate retained Maestro runtimes * refactor: type Maestro target resolution * refactor: harden typed Maestro execution * refactor: share in-page swipe planning * feat: add typed Maestro runtime port * refactor: parse Maestro suite metadata from typed IR * refactor: centralize Maestro include loading * feat: execute Maestro files through typed engine * refactor: share replay built-in variables * fix: make Maestro target intent explicit * fix: refresh Maestro targets before input * refactor: format Maestro progress from typed IR * feat: compile typed Maestro replay plans * feat: bind typed Maestro runtime to public commands * feat: route Maestro YAML through typed runtime * refactor: remove legacy Maestro runtime * refactor: remove obsolete replay control model * refactor: split typed Maestro plan modules * fix: harden typed Maestro runtime semantics * docs: update direct Maestro architecture * fix: reconcile Maestro runtime with merged contracts * fix: harden typed Maestro execution boundaries * fix: harden typed Maestro runtime evidence * perf: avoid eager Maestro device resolution * refactor: finalize typed Maestro execution * fix: reject Android system-only helper snapshots * fix: preserve Android system dialog snapshots * fix: make helper-backed CI deterministic * refactor: invalidate Maestro observations before dispatch * fix: make Maestro selector policy explicit * refactor: remove Maestro ranking sentinels * refactor: make Maestro own observation stabilization * refactor: source Maestro compatibility presets * refactor: keep Maestro failure reports typed * refactor: simplify Maestro runtime policy * fix: isolate Maestro engine failures * refactor: consolidate Maestro swipe presets * fix: align Maestro selector and observation semantics * fix: preserve atomic iOS Maestro taps * fix: require semantic uniqueness for Maestro taps * fix: preserve Maestro parse provenance * docs: pin Maestro compatibility presets * docs: reconcile Maestro gesture viewport contract * perf: resolve Maestro gesture viewport directly * test: align Maestro replay regressions * fix: order Android gesture lift after endpoint * fix: settle Maestro gestures before continuation * fixup! fix: order Android gesture lift after endpoint * refactor: normalize Maestro swipes once * refactor: fail impossible Maestro observations * refactor: normalize Maestro defaults alias * test: reconcile Android provider scenarios * fix(android): synchronize single-pointer move events * test: align repair digest parsing * refactor: type Maestro runtime operations * refactor: keep Maestro controls compact * refactor: name Maestro diagnostic limit * fix: align Maestro parser and settling semantics * fix: complete Maestro compatibility semantics * docs: define Maestro compatibility boundaries * fix: refresh iOS runner target after relaunch * fix: reset prewarmed iOS runner after URL open * fix: preserve iOS Maestro target and swipe intent * fix: harden direct Maestro runtime semantics * fix: preserve ranked Maestro replay suggestions * fix: align maestro tap runtime semantics * fix: stabilize maestro ci contracts * fix: tighten maestro runtime architecture * fix: reconcile maestro replay with latest main * perf: tighten Maestro iOS stabilization * fix: preserve Maestro app lifecycle sessions * fix: restore Maestro CI coverage * fix: address Maestro engine review findings * refactor: consolidate Maestro compatibility internals * fix: scope Maestro target evidence to childOf
3.9 KiB
3.9 KiB
Maestro Compatibility Architecture
This map describes the direct compatibility engine after ADR 0015. Maestro YAML has one production
route: typed parse, immutable plan compilation, typed execution, and a runtime port backed by public
agent-device commands. There is no SessionAction lowering, private command namespace, runtime
fallback, or second compatibility engine.
| Area | Owners | Shared boundary | Remaining risk |
|---|---|---|---|
| Program parsing | program-ir*.ts, program-loader.ts |
Source-preserving typed IR | The supported Maestro subset must reject unknown syntax explicitly. Keep parser modules focused as the grammar grows. |
| Plan and resume | replay-plan*.ts, replay-plan-digest.ts |
Immutable expanded plan and digest | Runtime control steps are opaque resume boundaries. Includes, static conditions, and environment inputs must remain digest-bound. |
| Execution | engine*.ts, runtime-port*.ts |
Typed commands, observation generations, runtime port | Mutation must invalidate observation evidence. Scoped and output variables must not leak across flow boundaries. |
| Daemon binding | daemon-runtime-port*.ts |
Typed calls to public daemon commands | Reuse same-generation observation snapshots only as semantic evidence for atomic iOS selector dispatch, never as coordinate geometry. Otherwise preserve one fresh target snapshot, structured target retries, and platform-independent command semantics. Never restore private compatibility dispatch or re-enter Maestro parsing. |
| Target policy | runtime-target*.ts |
Shared snapshot model in provider order | Exact-or-regex selector behavior and visibility are compatibility policy. Default selection follows Maestro's first-match semantics; explicit index selects a later match. Provider normalization belongs below this layer. |
| Gestures | runtime-port-geometry*.ts |
ADR 0013 normalized single-pointer input | Preserve authored absolute/percentage endpoints exactly. Maestro does not own multi-touch planning or injection. |
| Failure and resume reporting | session-replay-maestro-*.ts |
ADR 0012 REPLAY_DIVERGENCE wire contract |
Source paths, step ordinals, artifacts, scrubbed variables, screen digest, and typed resume preflight must survive nested control failures. |
| Trusted scripts | run-script-*.ts |
Typed environment/output maps | node:vm is not a security sandbox. Keep execution flow-local and do not expand trust without a separate product decision. |
| Suite integration | session-test-*.ts, replay backend selection |
Existing test lifecycle and artifacts | YAML discovery must remain backend-scoped; .ad continues through generic replay even inside a Maestro suite. |
Deliberately Removed
- Generic
SessionActionconversion andreplayControlwrappers. - Private
__maestro*command routing and positional JSON decoding. - WeakMap compatibility state and action-after-assertion replay.
wait/findfallback chains after coordinate input.- Selector-name heuristics for text-entry coalescing.
- Fuzzy substring matching that broadened plain Maestro text selectors.
- Duplicate-stack ranking and visible-context promotion over provider order.
- Fabricated tab-strip slots and ancestor geometry used in place of provider rectangles.
- Cached gesture frames; percentage gestures use fresh shared viewport evidence.
Convergence Rules
- Compatibility aliases normalize into shared public commands; they do not clone platform input.
- Single-pointer target and viewport plans stay distinct from ADR 0013 multi-touch plans.
- Retry policy is typed and budgeted. Infrastructure failures propagate unless a structured error is explicitly retriable.
- Performance comparisons count provider queries, captures, retries, hierarchy bytes, and warm latency, not only daemon round trips.
- New parity behavior needs a typed-IR fixture, an engine/runtime-port test, and live Android+iOS evidence when device behavior is involved.