Skip to content

fix(doctor): warm the runner cache only for simulators this host discovered - #3226

Merged
thymikee merged 1 commit into
mainfrom
claude/pensive-raman-f8d938
Oct 5, 2026
Merged

thymikee merged 1 commit into
mainfrom
claude/pensive-raman-f8d938

Conversation

@thymikee

@thymikee thymikee commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Summary

On macOS, three provider-scenario doctor tests started a real background xcodebuild build-for-testing. Doctor's warmup read inventory without its discovery source. The scenario worlds supply their simulator through a provider inventory source, so doctor treated it as a host simulator.

Doctor now keeps the inventory source and picks a warmup device only from host-discovered devices. Device selection uses the same rule before local Apple selection (source === 'local'). The session-device path does not change. In production, provider inventories list only provider-owned devices, which isProviderDevice already skipped.

Rejected: Apple tool providers on the worlds, so #3225's gate applies. Doctor gets a provider scope only when one device resolves. With #3225 applied, 3 of 5 warmups still started.

4 files. hermetic-signal-setup.ts is not changed.

Validation

Tested commit fb0c11a013, macOS:

  • New unit tests: the 3 provider-reported cases fail without the fix and pass with it.
  • Instrumented prewarmAppleRunnerCache count, vitest run --project provider-integration test/integration/provider-scenarios/:
Tree doctor keep-hot
main 6 51
main + this PR 1 51
main + #3225 + this PR 0 0

The remaining doctor warmup is the apple-platform-output-guard session path, inside the Apple tool scope #3225 gates. With both PRs, 70/70 files pass. remote-proxy-parity fails on main before and after (#3225 fixes it).

  • Linux (node:22-bookworm): base 939a4ce070 and head have the same status for all 226 provider-integration tests, and all doctor tests pass. The same 34 tests fail at both: 33 because the image has no zip, and 1 on lease-upload timing.
  • pnpm check:affected --run: all runnable checks pass.

Review in cubic

…overed

Doctor's fresh-machine warmup picked its simulator from provider-first
inventory, which drops the discovery source. A simulator a provider reported
is not on this host, yet doctor started a local xcodebuild runner build for it.
Doctor now keeps the inventory source and names a warmup device only from
devices this host discovered.
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.06 MB 5.06 MB +241 B
Package (unpacked) 5.06 MB 5.06 MB +241 B
Package (download) 1.52 MB 1.52 MB +71 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 27.3 ms 26.8 ms -0.5 ms
CLI --help 86.2 ms 83.6 ms -2.6 ms

@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.

No issues found across 4 files

Re-trigger cubic

@thymikee

thymikee commented Oct 5, 2026

Copy link
Copy Markdown
Member Author

This PR is ready as of fb0c11a. All 19 checks pass, and there are no conflicts. I ran no tests locally; I read the diff and the pre-change code, and I did not reproduce the prewarm counts or the Linux parity run from the PR body. No live agent-device doctor run against a real host simulator is attached, so real-host behavior rests on the source === 'local' path and unit tests that use a fake local inventory. Not blocking, and fine to take or leave: hostDevices is derived by object identity after filterInventoryForSelector. It works today because every step keeps the same objects. If a later step clones devices, hostDevices becomes empty and doctor stops warming the runner on real hosts, with no failing signal beyond the host-source unit test. Filtering the combined host list with the same selector predicate would remove that coupling. The multi-line doc comment above resolveHostWarmupDevice is also a note only.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 5, 2026
@thymikee
thymikee merged commit 2f933e5 into main Oct 5, 2026
19 checks passed
@thymikee
thymikee deleted the claude/pensive-raman-f8d938 branch October 5, 2026 11:35
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-05 11:36 UTC

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