Repository navigation
Description
Part of #1590.
Scope
simlock doctor tells an operator when android.defaultImageTag names a tag that no installed system image for the machine's CPU has, such as a typo or an image installed only for another CPU. Those leases are quietly getting today's image instead.
If this goes wrong, a user would notice doctor staying silent while the setting has no effect, or warning about a tag that is installed.
Technical spec
Commit 5e639b4.
Rows
- Behaviours: B9
- Interfaces: I5
- Existing code: X15, X19, X21
Facts
| # | Fact | Source |
|---|---|---|
| F1 | Core doctor turns each driver advisory into a driver-advisory finding, and --fix acts on none |
src/core/doctor.ts:411-430; src/core/doctor-advisories.test.ts:108,196 |
| F2 | The CLI prints a driver advisory as Warning [<platform>] <code>: <message> on stderr |
src/cli/commands/doctor.ts:52-61 |
| F3 | The Android driver is built in discoverAndroidDriver from DriverDiscoveryContext, with hostAbi from the host's arch |
src/daemon/driver-discovery.ts:63-87,265-276 |
| F4 | SystemImages.installedImages lists each image's tag and abi |
src/drivers/android/system-images.ts:368-401 |
Modules touched
Searches: rg -n "advisories\(|DriverDiscoveryContext|AndroidDriver.create|androidConfig" src -g '!*.test.ts'. Three modules: the daemon (context and composition), the Android driver (index.ts options and advisories), and the website.
Rules in play
- ADR 0078 §4: an unmet setting is an advisory, never a refusal; for the host CPU only.
- src/drivers/AGENTS.md: the driver imports only core and ports; the tag reaches it as a constructor option from the composition root.
- documentation rule 9:
troubleshooting.mdxnames the advisory and its fix.
Tests
Seam: AndroidDriver.advisories over the memory SDK (model on src/drivers/android/index-profiles-components.test.ts, which covers device-profile-hidden); the collection into doctor is already proven by src/core/doctor-advisories.test.ts.
- B9:
advisories()with the setting: tag installed for the host CPU → none; only for another CPU → the advisory; no image has it → the advisory with the tag, the host CPU and its tags sorted and once each; no host-CPU image →none; setting unset → none; the worker composition carries the loaded tag throughDriverDiscoveryContexttoAndroidDriver.create(model:src/daemon/driver-discovery.test.ts). The test starts atdiscoverDriverswith the context set; the onecomposeWorkerline that copiesconfig.android.defaultImageTaginto the context is wiring and gets no test of its own, as Android leases that name no image tag get the worker's android.defaultImageTag where it fits #1595'sdefaultImageTagsline did (decided in delivery, pending the maintainer).
Done when
pnpm test:changedpasses, with the B9 test among the tests it runs.pnpm --dir website install && pnpm --dir website build && node website/scripts/check-openapi.mjspasses.troubleshooting.mdxlistsdefault-image-tag-not-installed, what it means and how to fix it (install the image withsdkmanager, or correct the setting).
Out of scope
- Refusing to start on an unmet setting (rejected in ADR 0078).
Depends on
Written by an agent.
Activity
test: the default image tag test's host images sort differently liste…
fix(android): the default image tag advisory carries I5's message and…
refactor(android): simplify the test harness's onlyProvided so Fallow…
feat(leasing): an Android worker tries its default image tag first (#…
feat(android): doctor warns when no installed image has the default i…
feat(catalog): a worker's catalog names its default image tag and a g…