Skip to content

feat(catalog): the catalog shows the default model per class (#333) - #342

Merged
V3RON merged 5 commits into
mainfrom
task/333
Oct 5, 2026
Merged

V3RON merged 5 commits into
mainfrom
task/333

Conversation

@V3RON

@V3RON V3RON commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Closes #333

Status

Implement: done (all spec tests green) Review: round 3, 0 open Mutate: 13 alive, all equivalent or fixture Hardware: pass Gate: pending

Done when

  • Every test above passes and pnpm check is green. Checked by implement's pnpm check on 089f612 and by CI.
  • docs/CONFIGURATION.md lists both keys with their default and the preference-list rule. Checked by the spec review, rounds 1 and 2.
  • On a Mac with Xcode 26 installed: simlock catalog --json shows classDefaults.phone as iPhone 17; with ios.defaultModels.phone set to iPhone 15 it shows iPhone 15; set to a name the catalog does not list, it shows iPhone 17 again. Checked by the slow lane at 4b92a80: all three are assertions in e2e/slow-ios-smoke.test.ts, and the test passed.

Assumptions

  • Assumption: where the preference map reaches DriverCatalog — the spec names src/daemon/main.ts:247, which is the component installer's catalog; the catalog read by catalog.get is the lease engine's own, so the map goes in through a new LeaseEngine option into the DriverCatalog the engine builds.
  • Assumption: how the class line prints — phone (default: iPhone 17):, keeping the header's trailing colon; the (no class) group has no default suffix.
  • Assumption: a gateway's per-platform agreement counts every connected worker that reports that platform, as defaultRuntime does; a worker with no entry for the platform is not a disagreement.

Mutants still alive, all equivalent or in a fixture: name.toUpperCase() in findCatalogModel, because both sides fold alike. The unreachable ?? [] after an own-key check in catalog-match.ts. model !== undefined && in DriverCatalog and aggregate.ts, because an undefined model has no class and is not listed. The config literals in src/http/test-fakes.ts, a fixture no test asserts on.

Review

Spec review: 2 blocking, 2 fixed, 2 notes. Code review: 5 blocking, 3 fixed, 3 notes.
Mutate: 190 mutants, 13 alive.

Rejected:

  • code: findCatalogModel in src/core/catalog-match.ts copies the gateway's findModel, which breaks architecture rule 10 and ADR 0015 — the spec orders this copy ("The gateway keeps its own copy until the gateway task replaces it"), and Through a gateway, a class or range request is served by a worker that fits #336 removes it (round 1).
  • code: the same duplicate, raised again in round 2 — same reason.

The third round was a test-only fix the maintainer approved after round 2.

Written by an agent.

@V3RON

V3RON commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Review notes

Not blocking, not verified. Each is one reviewer's claim.

  • code: src/contract/schemas.ts:552-558 fitPlatformCatalog drops a class default whose model name is longer than CATALOG_NAME_MAX instead of falling to the next qualifying name, so the worker reports no default for a class that has one. The spec review raised the same point in round 2, noting that simlock catalog gives no warning.
  • code: e2e/slow-ios-smoke.test.ts the slow iOS lane now needs the host's simctl to list iPhone 17 and iPhone 15, so it fails on a Mac whose Xcode lacks either device type.
  • code: src/contract/schemas.ts:715-716 adding defaultModelsSchema split the comment "Mirrors Config … field for field" from configSchema. It now sits above the wrong schema.
  • spec: src/gateway/aggregate.ts:285 the gateway drops a worker's class default when that worker does not list the model. The spec did not ask for this; it came from round 1's fix for safety rule 10, and the schemas.ts comment now states it.
  • spec: six existing Android config tests now carry defaultModels: {}, so no test loads a config whose android block has no defaultModels (every config written before this change). The "absent keys meaning none" rule is proven only with no config file at all.

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review October 5, 2026 08:40
@V3RON
V3RON merged commit 713b38a into main Oct 5, 2026
24 checks passed
@V3RON
V3RON deleted the task/333 branch November 6, 2026 07:10
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.

The catalog shows the default model per class, from config over built-in lists

1 participant