Skip to content

Catalog lists every accepted Android name and every installed image #180

Closed

Description

@V3RON

Part of #171.

Scope

After this PR the catalog lists every other name a worker accepts for a model, and every installed Android system image with its API level, tag, and ABI. On a gateway each worker's view carries its own, and the fleet catalog is the union.

{ "platform": "android",
  "models": ["My Tablet", "Pixel 8"],
  "runtimes": ["34", "35"],
  "defaultRuntime": "35",
  "modelRuntimes": { "My Tablet": ["34", "35"], "Pixel 8": ["34", "35"] },
  "modelAliases": { "Pixel 8": ["pixel_8"] },
  "images": [ { "runtime": "34", "tag": "default", "abi": "x86_64" },
              { "runtime": "35", "tag": "google_apis", "abi": "arm64-v8a" } ] }

Technical spec

File and line references are to main at the time of writing.

Modules touched

  • src/contract/schemas.ts: platformCatalogSchema gains required modelAliases (a map from a name in models to its other names; only models that have one appear) and optional images (runtime, tag, abi; runtime is a value from runtimes). Every string and list has a length limit.
  • src/core/driver.ts: DriverCatalogEntry gains the two fields.
  • src/drivers/android/device-profile-source.ts: each source exposes one list of profiles with all the names each answers to (display name, and the avdmanager id for a built-in profile). The registry owns the only matcher: resolve returns the first profile whose names contain the model, ignoring case, and the catalog's aliases come from the same list. The per-source resolve and listModels are removed. models keeps the content it has on main.
  • src/drivers/android/index.ts: listCatalog returns the aliases and projects #installedImages() (:1293-1321) to runtime, tag, abi. Still one avdmanager run per call.
  • src/drivers/ios/index.ts: modelAliases: {} and no images. iOS accepts only the device type name, in any letter case.
  • src/core/fake-driver.ts, e2e/fake-driver/: empty aliases and no images, with script keys to set them.
  • src/gateway/aggregate.ts: modelAliases[m] is the union per model, deduplicated ignoring case. images is the union by (runtime, tag, abi), sorted, and absent when no worker reports any.
  • src/gateway/test-support.ts: catalogFixture fills modelAliases.
  • src/cli/index.ts (formatCatalog): print a model's other names and each image.
  • Docs: docs/CLI.md, docs/HTTP-API.md, docs/CLIENT.md.

Contract and event changes

  • catalog.get output gains required modelAliases and optional images. No further protocol bump: this adds to the version the previous task introduced, which has not been released.
  • No event changes.

Rules in play

  • ADR 0008 §1 to §4.
  • architecture.md rule 2 (AVD ids and image tags stay inside the Android driver; the core type says runtime, not apiLevel), rule 10 (one matcher feeds both resolveSpec and the catalog), rule 13.
  • safety.md rule 1 (devices.xml is only read) and rule 10.
  • testing.md rules 1 to 4.

Tests

  • Android lists a built-in profile's avdmanager id as another name for its model.
  • Android lists no other name when the id equals the display name ignoring case.
  • Android resolves every listed name of every listed model, in upper and lower case, to that model.
  • Android's models is the same list as before this change for the same profiles.
  • Android lists models with one avdmanager run.
  • Android lists every installed system image with its API level, tag, and ABI, a foreign-ABI image included.
  • Android does not list an image that is not installed, whatever the download policy.
  • iOS reports no other names and no images.
  • The fleet catalog unions other names per model.
  • The fleet catalog lists each distinct image once.
  • The fleet catalog omits images when no worker reports any.
  • simlock catalog prints a model's other names and each image.
  • Slow lane, real Android SDK: the catalog lists a real AVD id as another name and a real installed image, and a lease by that AVD id is granted.

Done when

  • Every test above passes and pnpm check is green.
  • git diff origin/main -- src/gateway/routing.ts src/gateway/routing.test.ts is empty.
  • The slow lane passes on a machine with an Android SDK.

Out of scope

Depends on

Approval

  • Approved for delivery

Written by an agent.

Activity

  1. added
    task:draft
    on Oct 1, 2026
  2. V3RON commented on Oct 1, 2026

    @V3RON
    ContributorAuthor

    Spec updated: Out of scope no longer defers the devices.xml clean-up to #173; ADR 0009 decided against it.

    Written by an agent.

  3. added
    task:ready
    and removed
    task:draft
    on Oct 1, 2026
  4. github-actions commented on Oct 1, 2026

    @github-actions
    Contributor

    Now task:ready: approved, technical spec present, #179 closed.

  5. self-assigned this
    on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

task:ready

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions