Skip to content

fix(scripts): iOS scenarios prepare the dev client before leasing a device - #36456

Merged
juliusmarminge merged 1 commit into
mainfrom
t3/fix-mobile-pool-proof-failures
Nov 14, 2026
Merged

juliusmarminge merged 1 commit into
mainfrom
t3/fix-mobile-pool-proof-failures

Conversation

@juliusmarminge

Copy link
Copy Markdown
Member

What failed

Mobile proofs on a shared Simlock pool failed in two ways: leases expired after about 5 minutes instead of the gateway's 15 (and then answered with misleading errors such as "this agent-device is too old to use through a gateway" or "lease ... is not one of yours"), and the first use of a freshly booted iOS simulator timed out after 30 seconds while the runner install takes 71 to 83 seconds.

Where the two causes are

I looked for both in scripts/scenarios/, scripts/prove-scenario.ts, scripts/e2e.config.ts, scripts/mobile-native-client.ts, scripts/mobile-e2e/, scripts/mobile-behavior*, apps/server/src/device/SimlockDeviceHost.ts, and the installed e2e, @e2e-dev/mobile and agent-device packages.

1. The 5-minute lease is requested by the agent-device package, not by t3code. No file in this repository sets a pool lease TTL.

  • agent-device 0.21.36, dist/src/connection-lease-transaction.js: the lease policy for a connect proxy connection has ttlMs: () => 3e5. Every agent-device open on a proxy session therefore asks the gateway for 300000 ms, and the CLI has no flag or environment variable to change it. This is the path used by anything that drives the pool through the agent-device CLI, including scripts/mobile-e2e/device.ts and SimlockDeviceHost. A live lease taken that way showed ttlMs: 300000 in simlock status --json.
  • The scenario runner does not go through that path. scripts/e2e.config.ts calls client.leases.allocate without ttlMs, so it gets the gateway default. Measured on a real lease taken with the same call: ttlMs: 900000, and still about 899 s remaining after boot and after prepare ios-runner, so each command renews it.

This needs a fix in agent-device (stop overriding the gateway's default for proxy leases, or make it configurable). It is not patched around here.

2. No 30-second runner timeout is set or passed from t3code. Nothing in the scripts above passes a timeout for the runner install. In the scenario runner, @e2e-dev/mobile starts the runner with prepare ios-runner during engine preparation, which is not bounded by e2e's 30 s actionTimeout default. The only 30 s values near runner code are inside agent-device (for example the runner lock in dist/src/runner-lease.js); I could not tie the reported failure to one of them, and I could not reproduce it: prepare ios-runner on a just-leased pool simulator took 39.4 s and succeeded. So this one also belongs upstream (agent-device or the gateway), and nothing is changed for it here.

What this changes

The one part that belongs to t3code: an iOS scenario leased its device first and only then fetched or built the dev client, inside t3.open(). On a cache miss that is a native build of several minutes, running inside the 5-minute test with the lease idle.

scripts/e2e.config.ts now runs mobile-native-client.ts ensure <platform> --prepare in the pool provider's acquire, before it allocates the lease. t3.open() still calls it, which is then a cache hit. mobile:e2e and mobile:behavior already prepared before leasing.

Verified

  • e2e run --target ios against a real pool, before and after: the scenario passes both times. After the change the log shows preparing the ios dev client before simlock: leased ....
  • Lease lifetime with a real lease, as above: 900000 ms from the scenario runner's call; 300000 ms on a lease opened through the agent-device CLI.
  • vp run check:changed: format, lint, knip, typecheck pass.

Not verified

  • A cold dev-client build before the lease: the cache had this checkout's client, so only the cache-hit path ran.
  • The 30-second runner install failure: not reproduced, and its source not pinned to a line.
  • Lease lifetime "after" is unchanged by this PR, because the 5-minute value is not ours to change.

Related, not duplicated: #36447.

Claude Fable 5.2, Claude Code

🤖 Generated with Claude Code

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 14, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 4ba844a

Macroscope's review found this PR approvable — Mobile scenarios now fetch or build their development client before leasing a device, avoiding leases consumed by lengthy builds. The change is confined to test tooling and reuses the existing artifact-preparation path.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Simlock device acquisition now prepares a native client for the selected platform before it leases a device. The iOS scenario documentation describes client preparation before device leasing.

Changes: Simlock native client preparation

Layer / File(s) Summary
Prepare the client before leasing
scripts/e2e.config.ts, docs/operations/scenarios.md
Acquisition runs the native-client preparation command from APP_DIR before requesting a Simlock lease. It logs the selected platform and provides NodeServices.layer alongside NodeCrypto.layer. The iOS scenario documentation describes preparation before device leasing.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: Minimal · up to 4ba84

This change prepares the iOS dev client before a device is leased, so a long native build no longer occupies an idle lease. The documentation is updated to match. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the iOS scenario run now prepares the dev client before leasing a device. The title uses the conventional commit format and matches the changed behavior in scripts/e2e…
Description check Passed The description covers the required sections: Problem, Change, Scope, and Verification. It explains the failures and the causes. It states the one part fixed in this repository and the parts that belo…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the iOS scenario run now prepares the dev client before leasing a device. The title uses the conventional commit format and matches the changed behavior in scripts/e2e.config.ts and the scenario documentation.

Full details: Description check

Explanation

The description covers the required sections: Problem, Change, Scope, and Verification. It explains the failures and the causes. It states the one part fixed in this repository and the parts that belong upstream. The Verification section lists concrete checks and what was not verified. The Scope section does not link a specific issue for the fix. It cites PR #36447 as related, and it does not explain why the change needs no issue. The description also does not state whether a maintainer requested the PR. The description is long and mixes in the upstream investigation, but it is mostly complete against the template.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Usage-based review receipt

Note

This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between a6d9140 and 4ba844a.

Files selected for processing: 2

  • docs/operations/scenarios.md
  • scripts/e2e.config.ts

Limit details: You’ve used all 10 included reviews currently available.

@juliusmarminge
juliusmarminge merged commit 44fefbc into main Nov 14, 2026
32 checks passed
@juliusmarminge
juliusmarminge deleted the t3/fix-mobile-pool-proof-failures branch November 14, 2026 00:27
amv146 added a commit to amv146/t3code that referenced this pull request Nov 14, 2026
* fix(server): Claude can show the user mid-turn text in full (pingdotgg#36384)

* fix(cli): tagged source builds report the release version (pingdotgg#36350)

Co-authored-by: Lakshmi Tanmay <[email protected]>

* fix(server): storage cleanup prunes idle No project folders under ~/.t3/scratch (pingdotgg#36369)

* fix(terminal): trimmed history no longer replays half of a control sequence (pingdotgg#36368)

* fix(usage): a re-emitted Codex snapshot is no longer billed as a counter rewind (pingdotgg#36367)

Co-authored-by: rihanaws <[email protected]>

* fix(server): a Claude Monitor line no longer wakes a delegated child's parent (pingdotgg#36339)

* fix(opencode): a lost subagent report no longer leaves a resumed call running (pingdotgg#36386)

* fix(web): a new worktree thread opened during a clone bases on the real default branch (pingdotgg#36379)

* fix(server): unauthenticated token requests no longer write DPoP replay markers (pingdotgg#36393)

* fix(server): other sites can no longer frame the web app (pingdotgg#36395)

* fix(server): a server browser tab survives a renderer crash, and a service worker badge call no longer causes one (pingdotgg#36389)

* fix(web): T3 Connect sign-in offers Retry after Clerk fails to load (pingdotgg#23620)

Co-authored-by: Claude Opus 5.5 <[email protected]>

* fix(ci): macOS PR previews no longer run the PR's bundle next to signing secrets (pingdotgg#36407)

* fix(mobile): a new thread's first message no longer returns to the composer after a lost launch reply (pingdotgg#32330)

* fix(web): size markdown media whose width and height carry a px unit (pingdotgg#32108)

* fix(web): file links the agent cited from a checkout it cd'd into open that file (pingdotgg#36364)

* ci(mobile): iOS jobs run on macos-27, store builds require the final Xcode 27.1 (pingdotgg#36421)

* fix(server): Claude context meter no longer shows an auto-compact point when auto-compaction is off (pingdotgg#36417)

* fix(web): a run waiting on foreground subagents says so instead of Thinking (pingdotgg#36334)

* fix(server): a follow-up to a delegated child waits for its awaited background work (pingdotgg#36411)

* fix(provider-grok): Grok follow-ups queue instead of cancelling the running tool (pingdotgg#36422)

* fix(server): thread list builds metadata only for the page it returns (pingdotgg#36434)

* fix(web): middle-clicking empty chat space on Linux no longer pastes into the composer (pingdotgg#36436)

* fix(web): closing Settings no longer leaves it as a back/forward stop (pingdotgg#36437)

* fix(opencode): OpenCode 1.x threads report context-window usage (pingdotgg#36430)

* fix(web): bare @ in the composer lists workspace files (pingdotgg#36435)

* fix(mobile): thread list project filter lists recently active projects first (pingdotgg#36433)

* fix(clients): live working timers count on the host's clock (pingdotgg#36420)

* perf(relay): lighter Postgres load and PS-160 cluster (pingdotgg#36442)

Co-authored-by: Claude Opus 5.5 <[email protected]>

* fix(mobile): mobile:install --session works on pooled devices (pingdotgg#36447)

* fix(native): KDE SnapShot no longer loses the first reply from KWin (pingdotgg#36218)

Co-authored-by: Claude Fable 5.2 <[email protected]>

* fix(server): t3 connect status no longer reports a publish-only link as exposed (pingdotgg#33967)

* fix(web): don't label Windows paths outside the workspace as relative (pingdotgg#28469)

Co-authored-by: Julius Marminge <[email protected]>

* fix(server): multi-line guest messages are no longer refused or stored with CRLF (pingdotgg#26542)

* perf(desktop): provider checks no longer compete with server startup (pingdotgg#35712)

Co-authored-by: Claude Opus 5.5 <[email protected]>

* fix(web,mobile): explain missing file access for host videos (pingdotgg#24637)

* fix(scripts): iOS scenarios prepare the dev client before leasing a device (pingdotgg#36456)

* perf(server): a new thread's first turn starts sooner (pingdotgg#35710)

Co-authored-by: Claude Opus 5.5 <[email protected]>

* fix(provider-pi): running shell output no longer stores a snapshot row per update (pingdotgg#36429)

* fix(web): NVDA browse mode reads the current thread's branch, not the previous one (pingdotgg#34446)

Co-authored-by: nibarAhmed <[email protected]>
Co-authored-by: Julius Marminge <[email protected]>

* fix(server): T3 Connect clients are named "T3 Connect", not "T3 Connect connect" (pingdotgg#27887)

* fix(web): screen readers read the Update everything machine list as a table (pingdotgg#36445)

* feat: agents can restyle T3 Code with theme colors and CSS (pingdotgg#35247)

Co-authored-by: maria-rcks <[email protected]>
Co-authored-by: Claude Fable 5.2 <[email protected]>

* fix(mobile): long-pressed iOS blockquotes no longer draw over the thread (pingdotgg#36461)

* fix(cli): npm launcher no longer leaves a runtime running after a stop signal (pingdotgg#30487)

* feat(connect): require approval for new T3 Connect devices (pingdotgg#36419)

Co-authored-by: Claude Opus 5.5 <[email protected]>

* fix(server): run the Azure CLI in UTF-8 on Windows (pingdotgg#25801)

Co-authored-by: Julius Marminge <[email protected]>

* fix(server): preview navigation leaves a page whose script never yields (pingdotgg#36365)

* fix(server): the auto-settle sweep no longer rereads every idle branch every few minutes (pingdotgg#36371)

* fix(web): rewind no longer offers file restore in project-folder threads (pingdotgg#36467)

* fix(server): stop the relay client a crashed server left running (pingdotgg#36465)

* fix(server): read Azure DevOps pull request templates (pingdotgg#22881)

* perf(azure-devops): PR Code tab loads a page's files in one az run instead of two per file (pingdotgg#35295)

Co-authored-by: Julius Marminge <[email protected]>

* fix(web): copying a file preview selection returns the selected lines after scrolling (pingdotgg#36466)

* fix(mobile): push-token failures no longer report notifications as enabled (pingdotgg#26557)

* fix(provider-core): mise updates a tool configured by its backend name (pingdotgg#36472)

* fix(server): parent turns no longer duplicate delegated task thread items (pingdotgg#36473)

* fix(server): Windows drive paths open under WSL (pingdotgg#26030)

* fix(client-runtime): new T3 Connect machines appear without signing in again (pingdotgg#29788)

* fix(azure-devops): local pull request checkout no longer fails on --detect (pingdotgg#31170)

Co-authored-by: maria-rcks <[email protected]>
Co-authored-by: Julius Marminge <[email protected]>

* fix(usage): count shared Windows and WSL transcripts once (pingdotgg#24319)

* fix(azure-devops): pull requests report build validation as checks (pingdotgg#31146)

Co-authored-by: maria-rcks <[email protected]>
Co-authored-by: Julius Marminge <[email protected]>

* fix(desktop): WSL backend starts in distros without automounted drives (pingdotgg#25734)

* fix(server): t3 browser setup reloads an AppArmor profile that is on disk but not loaded (pingdotgg#36490)

* Initial plan

* fix(azure-devops): finish reconciling nightly diff tests

Remove retired files-diff code and update mocks for iteration changes and blob reads. Preserve bounded paging, cache, and error-path coverage.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Julius Marminge <[email protected]>
Co-authored-by: Lakshmi Tanmay <[email protected]>
Co-authored-by: rihanaws <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Theo Browne <[email protected]>
Co-authored-by: ValeraZSD <[email protected]>
Co-authored-by: nibarAhmed <[email protected]>
Co-authored-by: nibarAhmed <[email protected]>
Co-authored-by: maria-rcks <[email protected]>
Co-authored-by: Pedro Henrique <[email protected]>
Co-authored-by: Kieren-Foenander <[email protected]>
Co-authored-by: Pavel Kroupa <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Alex Vallone <[email protected]>
Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant