Skip to content

fix(native): let the host settle after simulator boot - #141

Merged
HemSoft merged 1 commit into
mainfrom
fix/native-post-boot-settle
Nov 12, 2026
Merged

HemSoft merged 1 commit into
mainfrom
fix/native-post-boot-settle

Conversation

@HemSoft

@HemSoft HemSoft commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

After #138 and #140, one native failure class remains on hosted runners: the XCTest driver loses the device after "Timed out while requesting screenshot" (device-unreachable). It hit three of the last six complete native runs:

All three happened in the first scenario. This PR adds a bounded, recorded settle period after simulator boot, so the first scenario no longer runs inside the post-boot load peak.

Refs #130, which stays open for its restoration streak.

Evidence

Host telemetry (15 s samples, 1-minute load average on the 3-CPU runner, minutes after job start):

Run 0 2 3 4 6 7 8–10
main ba39899f tablet-10 (failed) 60 287 367 413 489 334 293 → 190
7045e6d3 phone-6 (failed) 63 – 537 670 405 221 215 → 208

The top processes in the peak are the new simulator's own services: widget extensions, intelligence and Fitness daemons, sync agents and diagnosticd. #138 already removed the app-side trace load.

Change

  • scripts/ios-native/hostSettle.mjs: after boot, wait at least 5 minutes, then until the 1-minute load is below 250, capped at 10 minutes. It only waits: no failure, retry or flow change.
  • scripts/ios-native/run.mjs: run it after each device boot (device groups and the owned modal; the settle route uses the same path) and record hostSettle (status, wait, final load, up to 64 samples) in the manifest.
  • docs/native-simulator.md: a "Post-boot settle" section.

Each native job gets 5–10 minutes longer, well inside its 60-minute limit.

Validation

  • node --test scripts/ios-native/*.test.mjs: 270 passed, 0 failed (Home). The new tests cover the minimum wait, the falling peak shape from the tablet-10 run, the cap, and unusable load readings.
  • npx eslint on the changed scripts: clean.
  • Hosted CI on this head, with every check green before merge.

🤖 Generated with Claude Code

Main ba39899 lost tablet-10 to an XCTest "Timed out while requesting
screenshot" driver failure, the third such loss in six complete native
runs (also phone-6 on 7045e6d and tablet-8 on 719887a). All three
happened in the first scenario. Host telemetry shows the cause window:
the 1-minute load peaks at 490-670 three to seven minutes after boot,
while the new simulator starts its background services, and falls to
about 200 by minutes eight to ten.

After each boot the runner now waits at least 5 minutes, then until the
1-minute load is below 250, capped at 10 minutes, and records the wait
and samples as hostSettle in the manifest. It only waits; it never
fails, retries or changes a flow. Jobs keep their 60-minute limit.

Refs #130

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@HemSoft HemSoft added github_actions Pull requests that update GitHub Actions code ios iPhone and iPad app work model:claude-opus-5.5 PR authored by claude-opus-5.5 labels Nov 11, 2026
@HemSoft

HemSoft commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

@sfl review

@HemSoft

HemSoft commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T23:38:01.851492Z 3b0292a Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 3b0292a51b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@HemSoft
HemSoft merged commit 287da12 into main Nov 12, 2026
15 checks passed
@HemSoft
HemSoft deleted the fix/native-post-boot-settle branch November 12, 2026 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code ios iPhone and iPad app work model:claude-opus-5.5 PR authored by claude-opus-5.5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant