Skip to content

refactor: contract Apple platform surface - #2125

Open
thymikee wants to merge 3 commits into
refactor/prune-platform-split-residuefrom
refactor/contract-apple-platform-surface
Open

refactor: contract Apple platform surface#2125
thymikee wants to merge 3 commits into
refactor/prune-platform-split-residuefrom
refactor/contract-apple-platform-surface

Conversation

@thymikee

@thymikee thymikee commented Aug 28, 2026

Copy link
Copy Markdown
Member

Summary

Contract the private Apple package root to four composition exports and move synchronous consumers through existing named facets and the platform plugin.

Remove obsolete Apple facade exports, stale root mocks, and dead Fallow suppressions. Derive platform-family policy from kernel PLATFORMS while retaining independent R11 export inventories alongside R13 ownership.

This deletes 612 lines while adding 179 across 48 files. Stacked on #2123.

Validation

Typecheck, all 161 layering tests, Fallow, the 41-test snapshot suite, the exact file-size ratchet, and focused provider scenarios pass. A planted Apple subpath failed the independent R11 export inventory and the restored tree passed.

The full affected run passed 2,994 of 2,995 related tests. The unchanged gesture-admission timing test hit 5.01 seconds under four-worker load and passes focused in 3.04 seconds. Exact-head CI is authoritative and rerunning.

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 2.51 MB 2.51 MB -88 B
JS gzip 839.4 kB 839.4 kB -16 B
npm tarball 966.8 kB 966.8 kB +40 B
npm unpacked 3.35 MB 3.35 MB -88 B

npm unpacked components

Component Base Current Diff
JS / dist source 2.66 MB 2.66 MB -88 B
Apple runner source/project 581.1 kB 581.1 kB 0 B
macOS helper source 54.8 kB 54.8 kB 0 B
Android helper artifacts 0 B 0 B 0 B
Other package files 45.6 kB 45.6 kB 0 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 25.6 ms 25.9 ms +0.3 ms
CLI --help 71.6 ms 71.5 ms -0.1 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/interactor.js 0 B -27 B
dist/src/runner-client.js -58 B +1 B

Top changed packed files

Packed file Base Current Diff
dist/src/runner-client.js 41.7 kB 41.7 kB -58 B
dist/src/simctl-facade.js 93 B 70 B -23 B
dist/src/simctl.js 411 B 404 B -7 B
dist/src/app-launch.js 6.3 kB 6.3 kB +5 B
dist/src/perf-facade.js 27.3 kB 27.3 kB -5 B

@thymikee
thymikee marked this pull request as ready for review August 28, 2026 14:42
@thymikee

Copy link
Copy Markdown
Member Author

Review found two readiness blockers on exact head 2f6006cfba5b00dfd80567d7be235caa65c5e7a2: Coverage fails because snapshot-handler.test.ts grew to 2,141 lines against its 2,140 ratchet, and the PR remains stacked on open #2123/#2119 while its own iOS smoke is not yet green. Please reduce/extract that test change, resolve the stack, and rerun exact-head CI.

The surface contraction also removes the independent real-tree Apple/Android export assertions from package-boundaries.test.ts, leaving R13's editable allowlist as the sole oracle despite ADR 0019 pinning exported subpaths there. Keep the independent Apple assertion and avoid the unrelated Android guard removal, or amend the ADR with equally independent proof. Finally, ./interactor is currently a test-only facet combining createAppleInteractor with unrelated setIosSetting; please first try the existing applePlugin/runner-provider composition or a fixture-local adapter, which appears materially smaller and avoids expanding the contracted package surface.

@thymikee

Copy link
Copy Markdown
Member Author

Addressed the review on exact head 38e4e52:

  • removed the test-only mixed-purpose ./interactor export; async fixtures now use applePlugin.createInteractor, and the synchronous provider fixture composes it with the existing withAppleRunnerProvider scope locally
  • restored independent exact Apple and Android export inventories in R11; a planted ./planted-review export failed that assertion, then the restored tree passed
  • reduced snapshot-handler.test.ts from 2,141 to 2,138 lines
  • typecheck, 161 layering tests, Fallow, snapshot-handler, ios-alert-settings, and provider-ios-runner-transport pass

The full affected run still has only the pre-existing gesture-admission timing failure at 5.01 seconds under four-worker load; its focused run passes in 3.04 seconds. Exact-head CI is running.

@thymikee

Copy link
Copy Markdown
Member Author

The export-proof and ./interactor findings are resolved on 38e4e5212d: R11 again independently pins the exact Apple/Android real-tree exports, and the test-only transport uses the existing Apple plugin/runner-provider composition without widening the package surface.

One P1 remains: snapshot-handler.test.ts is now 2,138 lines but its ratchet is still pinned at 2,140. This gate requires lowering the pin when a file shrinks, so Coverage will fail until the pin is updated. Exact-head CI is still running, and the open #2123/#2119 stack remains unresolved.

@thymikee

Copy link
Copy Markdown
Member Author

Coverage follow-up: the job correctly required the exact file-size pin to follow the snapshot-handler reduction. Commit 165efeb lowers the pin from 2,140 to the measured 2,138 lines; all four focused ratchet tests pass. Exact-head CI restarted.

@thymikee

Copy link
Copy Markdown
Member Author

Exact-head CI is now fully green on 165efeb, including Android and iOS smoke. The review fixes, planted-red package-boundary proof, focused validation, and full CI are complete.

@thymikee

Copy link
Copy Markdown
Member Author

Exact head 165efeb8358190b207d150be4e6baed62944f243 resolves the remaining ratchet blocker: the snapshot-handler.test.ts pin is now 2,138, matching the file. The targeted delta is otherwise empty, and Coverage, integration, package/compatibility, Repo Guards, CodeQL, and all four platform smokes are green. No code finding remains.

#2125 is clean and ready to advance in the #2119 → #2123 → #2125 stack; it is not independently mergeable to main until those open parent PRs land.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant