Repository navigation
refactor(ios): carry provider acquisitions through one presentation owner #2231
Copy link
Copy link
Closed
Labels
Description
Parent: #2188
Follows: #2195
Blocks: #2196
Outcome
Finish the Appium/WebDriver and Limrun convergence by carrying their typed acquired iOS snapshot
input through the snapshot runtime to one host-side presentation owner. Provider adapters should
parse vendor facts and limitations; they should not each plan, present, translate engine errors,
render residue warnings, and then collapse the result back into the legacy snapshot shape.
This is a deletion-first follow-up to #2195. It must make the shared interface cheaper and harder
to use inconsistently before the Simulator bridge adopts it.
Exact scope
- Define the smallest internal snapshot-runtime result that can carry
stage: acquiredplus typed
acquisition facts from a provider adapter to one host presentation owner. Keep it internal; do
not add required public RPC fields. - Make the Appium/WebDriver and Limrun iOS adapters return vendor facts, viewport evidence,
lineage, truncation knowledge, and typed residue through that carrier. - Present both providers exactly once at the shared host boundary and preserve the existing public
SnapshotResult/daemon output shape after presentation. - Add explicit producer capability for truncation evidence. Derive unavailable facts centrally;
do not infer truncation knowledge from acquisition-depth or presentation ownership. - Delete WebDriver's attach-ref/strip-ref round trip and production wrappers/types that exist only
so tests can inspect an intermediate publication. - Delete provider-local request/plan/presentation orchestration, duplicate residue construction,
duplicate warning rendering, and divergent engine-error translation where the shared owner can
express the same behavior. - Reuse the shared viewport-root resolver for Limrun while retaining its valid device-info fallback.
- Keep WebDriver Android's current derived source semantics, but isolate them as Android-owned
behavior. Do not thread a legacy mode through iOS or scroll-frame code that does not need it. - Move the real Limrun provider-runtime to daemon/public regression into the provider-scenario
harness if that removes custom handler-test scaffolding without weakening the route it proves.
Required simplification
- Start from the merged refactor(ios): route Appium snapshots through engine #2224 and refactor(ios): converge Limrun snapshots through engine #2222 implementations and report gross additions/deletions for
production and tests separately. - The final production diff must be net-negative against current
main. New shared code must
delete more provider/runtime code than it adds. - Prefer one typed construction/presentation path over a configurable helper with provider-name
branches. Do not replace duplicate code with a generic bag of callbacks. - Remove obsolete tests after equivalent closest-negative and production-route evidence exists.
Do not keep tests whose only purpose is pinning deleted wrappers.
Non-goals
- No Simulator bridge implementation, backend selection, fallback, generation circuit,
runner-demand, proxy, open/relaunch, or physical-device change. - Do not perform refactor(ios): prune converged snapshot paths and close release gates #2199's final
snapshot-statepruning:presentationOwner, the producerless
legacy presentation branch,backendScopesAfterWire, and direct legacy presenter removal remain
owned by the later routing/pruning sequence unless this change can delete a provider-only arm
without affecting the bridge plan. - No Android output or interaction behavior change, provider SDK upgrade, public CLI flag, public
backend flag, or required wire field. - Do not merge Appium and Limrun parsers into one vendor-shaped parser.
Acceptance and evidence
- Appium and Limrun each prove their real provider adapter/runtime path reaches one shared host
presentation owner exactly once. - Regular/raw, depth, scope, interactive-only, viewport failure, unavailable hittability, and
unknown truncation remain behaviorally consistent with refactor(ios): build and prove the converged snapshot engine #2191 and refactor(ios): converge Appium and Limrun acquisition adapters #2195. - Unknown truncation remains absent through daemon, JSON output, and client without downstream
inference from acquisition depth. - A planted violation proves a provider cannot present before the shared owner or discard typed
residue and still pass. - Android WebDriver parsing and scrolling retain focused positive coverage.
- The PR body records removed wrappers/branches/tests, production and test line deltas, CI Size/npm
unpacked delta, and why any remaining provider-specific logic cannot live at the shared owner. - Focused provider/capture-kit/contracts/runtime tests, layering, Fallow, and exactly one
pnpm check:affected --runpass on the final pre-push head. GitHub exact-head CI is authoritative. - Publish one ready-for-review PR targeting
main; do not merge it.
Worker stop conditions
- Stop if the design requires public wire evolution, bridge routing, or changes to Android behavior.
- Stop and report if the proposed shared abstraction is not net-negative or merely replaces direct
code with callbacks, flags, casts, or provider-name switching. - Stop if the real provider-to-daemon regression would be weakened to a mocked helper-only test.
- Do not preserve compatibility scaffolding for the unreleased refactor(ios): route Appium snapshots through engine #2224/refactor(ios): converge Limrun snapshots through engine #2222 internal shapes; verify
withgit tag --containsbefore claiming compatibility is required.
Reactions are currently unavailable
Activity