Skip to content

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

Closed

Description

@V3RON

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.mdx names 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 through DriverDiscoveryContext to AndroidDriver.create (model: src/daemon/driver-discovery.test.ts). The test starts at discoverDrivers with the context set; the one composeWorker line that copies config.android.defaultImageTag into 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's defaultImageTags line did (decided in delivery, pending the maintainer).

Done when

  • pnpm test:changed passes, with the B9 test among the tests it runs.
  • pnpm --dir website install && pnpm --dir website build && node website/scripts/check-openapi.mjs passes.
  • 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).

Out of scope

  • Refusing to start on an unmet setting (rejected in ADR 0078).

Depends on

Written by an agent.

Metadata

Metadata

Assignees

Labels

platform:androidtask:ready

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions