Skip to content

feat(android): doctor warns when no installed image has the default image tag - #1616

Merged
V3RON merged 8 commits into
task/1595from
task/1597
Nov 16, 2026
Merged

V3RON merged 8 commits into
task/1595from
task/1597

Conversation

@V3RON

@V3RON V3RON commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1597

Status

Implement: done (2/2 green; Fallow fix 74b99a8) Review: passed (round 1, round 2, fix-check; 3 fixed) Hardware: n/a Gate: waiting for the stack
Next: in the #1590 stack above #1609

Assumptions

none

Done when

  • pnpm test:changed passes, with the B9 test among the tests it runs. — audit run at 8a973f1 (run: pass); review round 2 re-ran index-profiles-components.test.ts (25) and driver-discovery.test.ts (36) at 0640d5f
  • pnpm --dir website install && pnpm --dir website build && node website/scripts/check-openapi.mjs passes. — audit run at 8a973f1 (Done when walk 3/3)
  • troubleshooting.mdx lists default-image-tag-not-installed, what it means and how to fix it (install the image with sdkmanager, or correct the setting). — website/src/content/docs/docs/worker/troubleshooting.mdx, cause text matched to I5's message in review round 2

Review

Spec review: 4 blocking, 4 fixed, 0 notes. Code review: 3 blocking, 3 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 2. Tokens: 7.5M.
Runs: 8. Cost USD: 1.9311. Agent seconds: 815.
Assessment: complete

Written by an agent.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Android driver now checks whether the configured default image tag is installed for the host ABI. If no matching image exists, it reports an advisory with the configured tag and installed tags for that ABI. Worker composition passes the setting through driver discovery. Tests cover matching and missing tags, and troubleshooting documentation describes the advisory.

Severity of issue fixed: Low

Merge Risk: Minimal · up to 74b99

This adds a non-blocking doctor warning when the configured default Android image tag is not installed for the host CPU. The behavior is advisory only and does not stop startup, so merge-readiness risk is minimal.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Linked Issues check Inconclusive Directly linked issue #1597 is the only active target. Its coding requirements are assessed across the stack, per the stack rules.

1. [#1597] Advisory when the tag is not installed for the host CPU, …
Establish the config origin of android.defaultImageTag. Confirm which stack member adds the field to the config schema and loader, and that it is reviewed (#1591, #1609, or #1595). Confirm that pnpm test:changed and the website and Open…
Passed Passed checks: 3 passed

Check name Status Explanation
Title check Passed The title names the main change: a doctor advisory that warns when no installed Android system image has the configured default image tag. The raw summary confirms this advisory is the core change in …
Out of Scope Changes check Passed Changes introduced by PR #1616 stay within #1597 scope.

- src/drivers/android/index.ts: adds defaultImageTag option and the advisory. In scope.
- src/daemon/driver-discovery.ts and `src/daemon/…
Description check Passed The description states the PR closes issue #1597 and gives a status, a list of done-when items, and a review summary. It names the test command, the troubleshooting.mdx entry, and the default-image-ta…
Full details: Title check

Explanation

The title names the main change: a doctor advisory that warns when no installed Android system image has the configured default image tag. The raw summary confirms this advisory is the core change in index.ts and its tests.

Full details: Out of Scope Changes check

Explanation

Changes introduced by PR #1616 stay within #1597 scope.

  • src/drivers/android/index.ts: adds defaultImageTag option and the advisory. In scope.
  • src/daemon/driver-discovery.ts and src/daemon/worker-composition.ts: pass the setting through to the driver. In scope.
  • Test files: cover B9 behavior. In scope.
  • src/drivers/android/test-driver-harness.ts: adds defaultImageTag and replaces per-option conditional spreads with omitUndefined. This is a small refactor that supports the new option. It is not an unrelated change.
  • troubleshooting.mdx: documents the advisory, as the issue requires. In scope.

No change was found that is unrelated to #1597 or refuses startup, which the issue excludes.

Full details: Description check

Explanation

The description states the PR closes issue #1597 and gives a status, a list of done-when items, and a review summary. It names the test command, the troubleshooting.mdx entry, and the default-image-tag-not-installed advisory, all of which match the changeset. It is specific enough to relate to the changes.

Full details: Linked Issues check

Explanation

Directly linked issue #1597 is the only active target. Its coding requirements are assessed across the stack, per the stack rules.

  1. [#1597] Advisory when the tag is not installed for the host CPU, including tags installed only for another CPU. Addressed by PR #1616 (src/drivers/android/index.ts advisories(); tests in src/drivers/android/index-profiles-components.test.ts). Evidence is the raw summary. Not independently inspected.

  2. [#1597] Message content, sorted and deduplicated host-CPU tags, none when no host-CPU image exists, and no advisory when unset or matched. Addressed by PR #1616 per the summary. Behavior matches the issue text.

  3. [#1597] Setting flows through worker composition to AndroidDriver.create. Partially verified. At head, src/daemon/worker-composition.ts passes config.android.defaultImageTag to discoverDrivers as androidDefaultImageTag (#1616). src/daemon/driver-discovery.ts forwards it as defaultImageTag (#1616, per summary). The config field is read from config.android, but the PR diff does not add it. Its origin is in the stack: #1591, #1609, or the #1595 dependency. Those members are uncertain, so this part is Uncertain.

  4. [#1597] troubleshooting.mdx entry for default-image-tag-not-installed. Addressed by PR #1616 per the summary. Not directly inspected.

  5. [#1597] B9 tests. Addressed by PR #1616 per the summary. The composeWorker line has no test. The issue explicitly exempts this wiring line, so this is not a gap. The PR objectives describe the missing composition-level test as a gap. The issue text controls here, so this is resolved in favor of the issue.

  6. [#1597] Validation commands (pnpm test:changed, website build, OpenAPI check). The PR reports them passing. They were not re-run in this assessment. Evidence is the author's report only.

Overall: the PR's own changes appear to cover items 1, 2, 4, and 5. Item 3 is Uncertain because the config source is in uncertain stack members. Item 6 relies on reported results. No unmet coding requirement was demonstrated.

Resolution

Establish the config origin of android.defaultImageTag. Confirm which stack member adds the field to the config schema and loader, and that it is reviewed (#1591, #1609, or #1595). Confirm that pnpm test:changed and the website and OpenAPI commands pass at head 74b99a8.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: f04c2ee6-d15d-4929-bb89-9520f430e048
Commits

Reviewing files that changed from the base of the PR and between 55b7144 and 74b99a8.

Files selected for processing: 7

  • src/daemon/driver-discovery.test.ts
  • src/daemon/driver-discovery.ts
  • src/daemon/worker-composition.ts
  • src/drivers/android/index-profiles-components.test.ts
  • src/drivers/android/index.ts
  • src/drivers/android/test-driver-harness.ts
  • website/src/content/docs/docs/worker/troubleshooting.mdx

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

@V3RON
V3RON added this pull request to stack #1612 November 16, 2026 15:19
@V3RON

V3RON commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

Decision taken

Question. B9 says the worker composition carries android.defaultImageTag to AndroidDriver.create. The test starts at discoverDrivers. The one line in composeWorker (src/daemon/worker-composition.ts) that copies the setting into DriverDiscoveryContext has no test that fails if it is deleted, and no test in the repo reaches composeWorker.

Options.

  • A: treat the line as wiring, with no test of its own (taken). A user sees nothing different. If someone later deleted the line, doctor would stop warning, and no test would notice.
  • B: add a test seam in src/daemon/ that reaches composeWorker. A user sees nothing different. It needs new test scaffolding for daemon composition that no other test has, and B9 does not name it.

Why A. It is closest to the code today. #1595 left its sibling line, defaultImageTags in composeWorker, untested in the same way, and review passed it. It is also easy to reverse.

Reverting. Add a composition-level test as a new task. No code changes.

Written by an agent.

… advises with none when no host-CPU image exists; the context field is androidDefaultImageTag (#1597)
@V3RON

V3RON commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: 8a973f1
Round 2: 0640d5f
Round fix-check: 74b99a8

Runs: 2. Cost USD: 0.224. Agent seconds: 107.
Tokens input 19, output 4257, cache read 260383, cache write 62126.
- fix implementer: claude-sonnet-5-5 68 s $0.1111
- review fix-check reviewer: claude-sonnet-5-5 39 s $0.1129
Finding outcomes: {"fixed":3}. Classes: {"advisory text differs from I5 exact message":1,"context field name androidDefaultImageTag":1,"no host-CPU image must advise with none":1}.
{"findings":[{"id":"R1","role":"spec","class":"advisory text differs from I5 exact message","outcome":"fixed","path":"src/drivers/android/index.ts","round":"1","fix":"0640d5f37201adc969b9a507975dc220bae8adae"},{"id":"R2","role":"code","class":"no host-CPU image must advise with none","outcome":"fixed","path":"src/drivers/android/index.ts","round":"1","fix":"0640d5f37201adc969b9a507975dc220bae8adae"},{"id":"R3","role":"code","class":"context field name androidDefaultImageTag","outcome":"fixed","path":"src/daemon/driver-discovery.ts","round":"1","fix":"0640d5f37201adc969b9a507975dc220bae8adae"}]}

Written by an agent.

@V3RON
V3RON merged commit b46934a into main Nov 16, 2026
44 checks passed
@V3RON
V3RON deleted the task/1597 branch November 16, 2026 18:59
V3RON added a commit that referenced this pull request Nov 16, 2026
…ateway ranks by it (#1615)

Closes #1596

### Status

Implement: done (419 files, 6891 tests green) Review: passed (round 1,
round 2, fix-check, maintainer-directed fix-check; 5 fixed); ADR 0078
flip 80ea461 verified by: coordinator Hardware: n/a Gate: running for
the stack
Next: merge-pr.sh 1615

## Assumptions

- Assumption: which levels count as warm for a tagless request on a
defaulting worker — the newest level with a host-CPU image of the tag
for a request naming a model, any installed level for one naming none;
with `--os` the named level is kept (revised by review R2 and R3).
- Assumption: how the gateway knows the worker's CPU image — `hostAbiOf`
in `request-match.ts` repeats the driver's `hostAbiFor` rule (arm64 is
`arm64-v8a`, anything else `x86_64`), since the gateway cannot import
the driver; a view with no `host` counts every image, as before.

## Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 4 blocking, 4
fixed, 1 notes. Claims review: 1 blocking, 1 fixed, 0 notes.
Rounds: 2. Tokens: 10.4M.
Runs: 17. Cost USD: 5.8831. Agent seconds: 2299.
Assessment: complete

## Done when

- [x] `pnpm test:changed` passes, with the B6, B7, B8 and B11 tests
among the tests it runs. — ran on head 80ea461: 419 files, 6891 tests
passed; the B6 test is in `src/daemon/dispatcher.test.ts`, B7 in
`src/gateway/routing/stages/warm-hit.test.ts`, B8 in
`src/cli/index-catalog-components.test.ts`, B11 in
`src/gateway/aggregate-catalog.test.ts`.
- [x] `pnpm --dir website install && pnpm --dir website build && node
website/scripts/check-openapi.mjs` passes. — ran on head 80ea461: 92
pages built, `check-openapi: 45 operations, 12 tags: ok`.
- [x] `PROTOCOL_VERSION_RANGE.max` is one above #1595's, and `min` is
unchanged. — `src/contract/protocol.ts:13` is `{ min: 89, max: 91 }`
here; `origin/task/1595` has `{ min: 89, max: 90 }`.
- [x] `routing.mdx` says a gateway ranks a tagless Android lease by each
worker's default tag. `runtimes-and-images.mdx` shows the catalog's
`Default image tag` line and when a gateway prints it. — read in
`website/src/content/docs/docs/gateway/routing.mdx` and
`website/src/content/docs/docs/worker/runtimes-and-images.mdx`; the
website build above passes.

### Feature #1590 completion conditions

- [x] On a worker with API 36 `google_apis_playstore`, API 37
`google_apis` and `android.defaultImageTag: google_apis_playstore`,
`simlock lease --platform android --device "Pixel 9"` grants a Pixel 9
on API 36 whose spec names `google_apis_playstore`. — #1595 (PR #1609):
`src/leasing/lease-acquisition-default-image-tag.test.ts` (B1), green in
`pnpm test:changed`.
- [x] On the same worker, `--os 37` grants API 37 with no tag, and a
Pixel 6 lease grants what it grants without the setting. — #1595: same
file (B2).
- [x] On a worker without the setting, every lease in the Examples table
gets its Today result. — #1595: same file (B3, setting unset).
- [x] A request that names `--image-tag`, a baseline or `--physical`
gets the same result with and without the setting. — #1595: same file
(B3).
- [x] A configured warm target for Pixel 9 with no tag, on that worker,
keeps a Pixel 9 on API 36 with `google_apis_playstore` warm. — #1595:
`src/leasing/create-leasing-warm-targets.test.ts` (B4).
- [x] Through a gateway, a tagless Pixel 9 lease goes to the worker that
has a ready Pixel 9 on 36 with `google_apis_playstore` when another
worker has only free capacity. — #1596 (this PR):
`src/gateway/routing/stages/warm-hit.test.ts` (B7).
- [x] `simlock catalog --platform android` prints `Default image tag:
google_apis_playstore` on that worker, and no such line on a worker
without the setting. Through a gateway it prints the line only when
every Android worker reports the same tag. — #1596:
`src/cli/index-catalog-components.test.ts` (B8),
`src/daemon/dispatcher.test.ts` (B6),
`src/gateway/aggregate-catalog.test.ts` (B11).
- [x] `simlock doctor` reports `default-image-tag-not-installed` when no
installed image for the machine's CPU has the tag, and nothing for the
setting when one does or the setting is unset. — #1597 (PR #1616):
`src/drivers/android/index-profiles-components.test.ts` (B9) and
`src/daemon/driver-discovery.test.ts`, green in `pnpm test:changed`.
- [x] On an arm64 worker whose only image with the tag is x86_64, a
tagless lease gets what it gets without the setting. — #1595:
`src/drivers/android/catalog.test.ts` (B10) and the leasing file above
(B2).
- [x] A value that is not an image tag stops the config load with the
message in I1. — #1595:
`src/core/config-platform-and-driver-settings.test.ts` (B5).

*Written by an agent.*
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.

simlock doctor warns when no installed image has the default image tag

1 participant