Repository navigation
Description
Part of #1732.
Scope
An operator can run simlock seed <ios|android> <model> [--os] [--image-tag] [--json] on a worker to make and settle a kind's seed before anyone leases it, and the website documents it. The slow lane proves on real devices that copies of a settled seed do less work.
If this goes wrong, a user would notice simlock seed hanging past 60 minutes, an error that points at --allow-download, a refusal for a kind a lease accepts, or a gateway that tries to run it.
Technical spec
Commit fb42676.
Rows
- Behaviours: B10, B11, B12, B13
- Interfaces: I7, I8, I9 (and uses I4, I12)
- Existing code: X19, X20, X21, X22, X23, X25
Facts
| # | Fact | Source |
|---|---|---|
| F1 | Adding an operation takes the family file, OPERATIONS, the role and effect matrices, the protocol bump, daemon and gateway handlers, the admin client, error rows and errors.mdx |
src/contract/operations.ts:220 (OPERATIONS), src/contract/protocol.ts:13 (PROTOCOL_VERSION_RANGE), src/contract/operations.test.ts:64, :162 (matrices) |
| F2 | component.install's progress reaches the CLI as component-progress pushes keyed by request id |
src/daemon/server-requests.ts:532-549; src/contract/pushes.ts:85-95 |
| F3 | warm forget takes the platform as its first word |
src/cli/index.ts:25 |
| F4 | Worker-only operations answer UNSUPPORTED_IN_GATEWAY_MODE through unsupportedByDesign |
src/gateway/dispatcher.ts:268-274, :849-856 |
Modules touched
Searches: component.install, componentProgress, warm.forget, unsupportedByDesign, resolveSpec, RuntimeMissingError, PROTOCOL_VERSION_RANGE. New files: src/cli/commands/seed.ts, e2e/slow-seed-settle.test.ts. Also: src/daemon/dispatcher.ts (the handler map), src/daemon/dispatcher-options.ts and worker-composition.ts (the settler from createCore's seedSettler and leasing's resolveSeedSpec reach the handler), src/leasing/create-leasing.ts.
flowchart LR
CLI[cli/commands/seed] --> AC[simlock-client admin]
AC --> CT[contract seed.make]
CT --> DD[daemon dispatcher]
DD --> LR[leasing resolveSeedSpec]
DD --> SS[core seed-settle settle]
GW[gateway dispatcher] -.refuses.-> CT
Rules in play
- contract manual "Adding an operation" and "Protocol version": one bump in this PR.
- architecture.md rule 8: the CLI holds no decision; the daemon resolves, waits and answers.
- architecture.md rule 11: the 60-minute limit counts from arrival.
- documentation.md rule 9:
cli.mdx,errors.mdxandworker/capacity.mdxdescribesimlock seedand settling in this PR. src/instructions/index.ts: nothing tells an agent to runsimlock seed; it is an operator command.
Tests
The operation is driven through the daemon dispatcher with a fake driver and the real settler, modelled on src/daemon/dispatcher-components.test.ts; the CLI through runCli with a fake admin client, modelled on src/cli/index-catalog-components.test.ts.
- B10:
simlock seedmakes and settles a kind's seed: settled already; quick seed; no seed; another kind's settle running; this kind's background settle running; two calls for one kind; memory, disk and capacity waits; a failed make or settle; 60 minutes pass;--json - B11:
simlock seedrefuses what it cannot settle: no platform; unknown model;--image-tagwithios; a runtime not installed; iOS below 16; a gateway; an agent session; virtual devices off - B12: Ctrl-C stops the wait only: during
waiting; duringsettling;doctor --jsonafterwards - B13: on real hardware a settled seed's copy does less work: Android under half (measured 0.38 on Android 36.1; ADR 0090's figures predicted about 0.12) (decided in delivery, pending the maintainer); iOS: the settled copy uses under 0.3 cores from minute 3, with no total-CPU ratio (measured 0.95 against ADR 0090's predicted about 0.66) (decided in delivery, pending the maintainer). Tests:
e2e/slow-seed-settle.test.tsasserts the Android ratio under 0.5 and the iOS copy under 0.3 cores from minute 3.
Done when
pnpm test:changedpasses, with the B10 to B12 cases above.pnpm typecheckpasses.PROTOCOL_VERSION_RANGEis one higher than after Core settles quick seeds in the background, one at a time, when the worker is quiet #1746.pnpm test:e2e e2e/contract-surface.test.tspasses withseed.makeprobed.pnpm --dir website install && pnpm --dir website build && node website/scripts/check-openapi.mjspasses, andcli.mdx,errors.mdxandworker/capacity.mdxdescribesimlock seed,SEED_SETTLE_FAILEDand background settling.- Slow lane, on a Mac with an iOS 27 runtime and an Android SDK:
scripts/slow-e2e.sh e2e/slow-seed-settle.test.tspasses (B13).
Out of scope
- Pre-seeding from config; a
warmPool.targetsseed-only entry.
Depends on
- Core settles quick seeds in the background, one at a time, when the worker is quiet #1746
- iOS: a quick seed is replaced by its settled copy, and each plain lease counts against its seed #1747
- Android: a quick seed's snapshot is saved again from an idle copy, and copies and deletions take turns #1748
Written by an agent.
Activity
github-actions commentedon Nov 22, 2026
Claim released: no activity for 3 days. The label is unchanged; the next agent starts from the branch and the last handoff.
test: simlock seed makes and settles a kind's seed: a quick seed is s…
feat(daemon): seed.make resolves a kind as a lease does and settles i…
test: a failed make, a failed settle and 60 minutes answer SEED_SETTL…
feat(daemon): a failed settle and the operator's 60 minutes answer SE…
test: simlock seed refuses what it cannot settle, before any seed is …
feat(daemon): seed.make words a missing runtime with the install comm…
test: seed.make reports each stage with the seed's kind and answers a…
feat(contract): seed.make in the role and effect matrices, SEED_SETTL…
feat(daemon): the daemon serves seed.make and pushes its stages as se…
27 remaining items
fix(seed): an iOS default refusal below the download floor keeps the …
fix(test): the settle lane test finds an emulator by its console port…
test(e2e): the Android settled seed bound is half the quick copy's CP…
V3RON commentedon Nov 25, 2026
Handoff
Done: PR #1837 (draft). R6 to R9 are fixed and checked, and no finding is open. The lane test finds an emulator by its port and pins Android 36.1. The Android bound is now under half, pending OK (see Decision taken), and the Android case passes.
Not done: B13's iOS case fails. The hardware loop stopped after 6 lane runs.
Findings: in its first 5 minutes, a settled iOS copy used 555.9 core-seconds and a quick copy 585.1. That is 0.95, and the bound is 0.75. Both are quiet from minute 3, so the 0.3-core check would pass. ADR 0090 measured 690 against 455. Log:
simlock-slow-e2e-20261125-094355.log.Blocked on: the maintainer picks an iOS bound (for example, only the minute-3 check) or reopens ADR 0090's iOS claim. Then the lane, a fix-check of the loop commits, and the stack gate.
Written by an agent.
test(e2e): the settled iOS seed is judged by its minute-3 cores, not …
chore(stack): merge task/1748 into task/1749 (#1749)
docs(adr): 0090 is Accepted (#1749)
feat(seed): simlock seed makes and settles a kind's seed (#1837)