Skip to content

refactor(limrun): clean up shared iOS runner integration - #4227

Closed
thymikee wants to merge 4 commits into
mainfrom
stack/limrun-native-runner
Closed

thymikee wants to merge 4 commits into
mainfrom
stack/limrun-native-runner

Conversation

@thymikee

@thymikee thymikee commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Follow up on #4224 in 19 files: remove the unused Limrun iOS app-alias adapter and redundant cancellation wrapper, and correct settings help and stale AX descriptions. Main already contains the app-state simplification and removes limrun-ios-tree. The runner switch in #4224 bundles plist; its earlier size report showed a 45.4 kB download increase.

Validation

  • Head 63f6cbc5c835b44d5043228f813c55dc63e6bf83, base 22bd671066f256a195f934c317ce17ec6ed4ddf3.
  • pnpm install --frozen-lockfile && pnpm build and pnpm exec tsc -b passed; the Limrun Vitest selection passed 33 files and 243 tests at this head.
  • pnpm check:affected --run --head 63f6cbc5c835b44d5043228f813c55dc63e6bf83: passed, exactCommit=true, checkoutChanged=false; local receipt .tmp/validation/run-2rx9YR/receipt.json. GitHub owns the skipped device and integration lanes.
  • Required live Limrun fill/type, permission alert, cancellation, and lease-release/reconnect evidence remains outstanding: the available device panel did not expose a Limrun instance. No live-run comment or cancellation guarantee is claimed. Independent review was unavailable; the diff was self-reviewed.

@apex-sentinel-staging

apex-sentinel-staging Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Apex Sentinel could not review commit 2418c79c. No review ran, so there are no findings; this is not a verdict on the change.

Apex Sentinel did not review this pull request, as input_limits.pr_max_diff_size is exceeded (570,515/500,000 characters). Make the change smaller or split it into several pull requests, then push a new commit or comment @apex-sentinel-staging review. To review it as it is anyway, comment @apex-sentinel-staging review force. It is still bound by the per-review cost budget: a review this large can run out of it partway, and then fails without posting findings.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 117 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread packages/platform-apple/package.json Resolved
Comment thread packages/provider-limrun/src/ios.ts Resolved
Comment thread packages/provider-limrun/src/ios.ts Resolved
Comment thread packages/apple-runner/src/index.ts Resolved
@thymikee

thymikee commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

This conflicts with main at 9524580. #4196 has merged, so this is ready for the planned rebase down to one commit; review will continue on the rebased head.

@thymikee

thymikee commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

Live checks on Limrun iOS 26.4 for the commands earlier runs never exercised. The build is #4182 a21d320011, which sits on this PR's 9524580631.

Command Result
settings appearance dark, then light success both times. Screenshots show the app switching to dark and back to light.
settings text-size extra-large, then read Set succeeded, and the read returned extra-large. Reset to medium.
uninstall com.callstack.sheetprobe success, wasInstalled: true. A later open fails with "The app bundle is not installed on this simulator."
open com.callstack.sheetprobe --launch-console <path> success. The file holds the launch console (1465 bytes).
push com.callstack.sheetprobe '{"aps":{...}}' success × 3. No banner appeared, but the test app never requested notification permission, so this shows only that the command is admitted and forwarded. Delivery to the device is not shown.

The --launch-console result contradicts the review follow-up, which had narrowed the docs to local simulators. app-launch.ts:69 refuses only non-simulator devices. The original wording is restored in the next push.

muvaf and others added 4 commits November 5, 2026 08:12
The review follow-up narrowed --launch-console to local simulators, but no
provider guard refuses it on Limrun: app-launch.ts refuses only non-simulator
devices, and a live Limrun iOS 26.4 open with --launch-console succeeded and
captured the launch console. This restores the original wording.

Co-Authored-By: Claude <noreply@anthropic.com>
@thymikee
thymikee force-pushed the stack/limrun-native-runner branch from a1071a4 to 2418c79 Compare November 5, 2026 07:23
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.86 MB 6.02 MB +159.7 kB
Package (unpacked) 5.86 MB 6.02 MB +159.7 kB
Package (download) 1.78 MB 1.82 MB +45.4 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 22.4 ms 24.9 ms +2.5 ms
CLI --help 46.0 ms 50.0 ms +4.0 ms

@thymikee

thymikee commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

Live on Limrun iOS 26.4 after the rebase onto main. The build is #4182 aeb439d482 on this PR's 2418c79caf, with an Xcode 26.2 runner.

  • appstate before the runner starts: success, appBundleId: com.callstack.sheetprobe, state: null. The instance check passed, and the session record named the app.
  • appstate after captures: success, state: runningForeground from the runner.
  • install, open, press, screenshot: all succeeded.
  • Snapshots: app captures were bridge-served, and both web sheets were read by XCTest.

@thymikee

thymikee commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

At 2418c79, the switch of Limrun iOS to the shared XCTest runner looks right in code. One live run is needed before merge.

This PR replaces every Limrun iOS producer: text entry, alerts, and runner launch, cancel and release (see ios.ts:180). The live runs on record cover appstate, install, open, press, screenshot, snapshots, settings, uninstall, --launch-console and push, but none shows fill/type, alert get/accept, an in-flight cancel, or close plus lease release stopping the runner. Runner cancellation also changed after the older #4182 evidence. Please run one Limrun iOS session at this head and post the output:

  1. fill then type, with a snapshot reading back the combined value;
  2. alert get on a system permission prompt, alert accept succeeding, then alert get reporting none;
  3. an in-flight runner command canceled (for example Ctrl-C on wait text with a long timeout), then a snapshot succeeding with no RUNNER_BUSY and no exhausted 409 retry;
  4. close and lease release with the daemon log showing the runner stopped, then connect plus open on the same instance starting a fresh runner.

Not blocking, take or leave:

  • the limrun-ios-tree snapshot producer has nothing left that produces it, so removing it from IosSnapshotProducer and SnapshotProvenance (and the tables, tests and ADR 0004 lines tsc then points at) would finish the cleanup;
  • resolveAppAlias on the Limrun iOS adapter has no callers left and can go with its implementation, test and fixtures;
  • the settings permission help and its type doc still say Limrun iOS resolves --app only through the settings alias, and a few comments still call Limrun iOS an AX backend (alert-tree-driver, alert-contract, interactor-types, the launch-console message);
  • awaitWithSignal in host-kit duplicates awaitLimrunOperation, so one helper would be simpler;
  • the iOS branch of readLimrunAppState discards the state it reads and writes the same runner lookup twice, and the appstate tests carry an always-true ternary;
  • the +45 kB download growth from bundling plist is worth one sentence in the PR body.

The only failing check refused to run because the diff is over its size limit, so it says nothing about the code; the other 21 checks pass. There are no conflicts. The earlier inline threads on uninstall, push, the plist runtime dependency, setSetting scope, open/close and --launch-console match the current code and the live runs and can be resolved; the cancellation-guarantee thread is covered by item 3 above.

@thymikee

thymikee commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

Closing as superseded by #4224, muvaf's own PR of this Limrun switch, which is now merged to main. Main already has the two fixes that lived only here: the --launch-console wording for Limrun and #4176's appstate path. #4182 is now rebased directly onto main.

@thymikee thymikee closed this Nov 5, 2026
@thymikee thymikee changed the title feat(limrun): replace iOS AX automation with the shared XCTest runner refactor(limrun): clean up shared iOS runner integration Nov 5, 2026
@thymikee

thymikee commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

Superseded by #4224, which landed the same switch of Limrun iOS to the shared XCTest runner. #4243 ports the genuine extras from this PR (stale alert/settings/launch-console wording, the apple-runner entry comment) plus the still-applicable cleanups from the review: removing the unused resolveAppAlias and collapsing awaitLimrunOperation into awaitWithSignal. Nothing else from this PR remains: the rest is already on main in another form, and the four behavior differences are listed in #4243 as candidates for follow-ups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants