Skip to content

refactor(ios): prune converged snapshot paths and close release gates #2199

Description

@thymikee

Parent: #2188

Blocked by: #2195, #2198

Outcome

Delete the compatibility and backend-name policy that remains solely for the migrated iOS snapshot
implementation, enforce no-regrowth at the owning seams, and run the final package-size,
conformance, provider, Simulator, proxy, and affected release evidence.

This is a deletion and enforcement issue, not a place to finish incomplete behavior from blockers.
Each owning migration must already have removed its obvious local duplication; this issue audits and
closes the cross-cutting remainder.

Prune audit

Delete when equivalent engine-interface coverage is already proven:

  • shouldPresentIosInteractiveSnapshot from src/core/snapshot-state.ts;
  • backendScopesAfterWire and remaining backend-name scope planning;
  • direct presentIosInteractiveSnapshot orchestration from buildSnapshotState;
  • remaining provider-specific post-wire scope/option branches;
  • remaining synthesized WebDriver hittability;
  • old iOS semantic-compaction locations after capture-kit owns the implementation;
  • runner-local Swift geometric-presentation copies after the runner and harness use the shared source;
  • simulator observation dependencies on runner readiness and repeated bridge retries after the
    generation circuit opens;
  • tests whose only purpose was to assert removed producer-name branches, after equivalent behavior is
    covered through the engine interface.

Move matching path-keyed fallow baselines rather than regenerating unrelated baselines. Stage new
structural modules before trusting the layering scan.

Do not delete

  • XCTest tree, query-sweep, or private-AX capture backends.
  • Apple runner manager/cache, .xctestrun preparation, or interaction protocol.
  • Swift geometric presentation or TypeScript iOS semantic compaction.
  • Generic scope/normalization, refs, quality, occlusion, Android policy, provider acquisition
    adapters, golden fixtures, fuzz harnesses, live smokes, or physical-device code.
  • Proxy routes, device leases, authentication, artifact transfer, or RPC compatibility machinery.

If deletion appears possible only by weakening another consumer, stop and report the remaining owner
rather than adding a compatibility re-export or fallback.

No-regrowth enforcement

  • Add or update structural ownership tests so producer adapters cannot import presentation behavior,
    contracts cannot own algorithms, and root orchestration cannot reconstruct engine policy.
  • Reject old path recreation, backend-name scope/presentation branching, or direct iOS presenter
    invocation outside the engine.
  • Plant each new forbidden direction/path and record the named red failure before returning green.
  • Do not add allowlists for unclassified paths; fix the declaration or ownership seam.

Final evidence

  • Compare packed, clean-installed, and bundled npm sizes with test(ios): establish snapshot convergence baselines and permanent evidence #2189. Report exact deltas; do not use
    source-line estimates. The compiled bridge cache remains outside the npm artifact.
  • Run the independent Swift/TypeScript golden corpus, bounded differential fuzz, properties, and
    structural gate with reproducible artifacts.
  • Run Appium and Limrun provider contracts on the exact head.
  • Run local Simulator cold-cold, cold, warm, relaunch, bridge crash/timeout/cancellation, stale
    generation, fallback, and first-runner-interaction evidence.
  • Run direct/proxy semantic parity, controlled-RTT performance, lease isolation/expiry, cancellation,
    and supported version-skew evidence.
  • Run pnpm check:affected --run; GitHub remains authoritative for native, provider, coverage, and
    full macOS/Simulator lanes.
  • Update CLI help/user docs only if observable behavior changed. Do not document internal producer
    selection. Keep physical-iPhone behavior explicitly unchanged and separately owned.

Acceptance

  • No compatibility surface remains solely for the migrated implementation.
  • Old paths and forbidden dependency directions have observed planted-red no-regrowth proof.
  • All child acceptance evidence is linked from iOS snapshot backend convergence and fast Simulator observation #2188 and corresponds to exact implementation heads.
  • No open blocker is represented as passing through fixture-only or stale evidence.
  • The size delta is within the maintainer-accepted budget and the remote/local performance targets are
    met without wrong-tree, stale-tree, lease, or interaction regressions.

Worker stop conditions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions