Repository navigation
Closed
Labels
task:readySpec checked. An agent may implement it once its Depends on allow.
Description
Part of #209.
Scope
After this PR status lists the installs in progress on a machine. simlock status shows them on a single node. On a gateway, each worker's view carries its own, so simlock worker list shows which workers are installing what. It covers every install, whoever started it: an install command, a lease request, or a gateway.
Technical spec
File and line references are to main at 88c4eeb.
Modules touched
src/core/component-installer.ts:inProgress()returns one entry per install that is waiting or running, the 16 oldest when there are more:{ platform, component, state: "waiting" | "downloading", since, waiters }.sinceis when the first call for it arrived;waitersis the number of calls joined to it. Read from the installer's own queue, not from a second list (architecture rule 12).src/contract/schemas.ts:statusGetOutputgains optionalinstalls, an array of that shape, at most 16 entries withcomponentat most 64 characters.workerViewSchema(:705) gains the same optional field, anddownloadsthere gains optionaltimeoutMs. Entries on a gateway's ownstatus.getalso carryworkerId.src/daemon/dispatcher.ts(#statusGet): fillinstallsfrom the installer. Always present on a worker, empty when nothing is installing.src/gateway/worker-link.ts:#rebuildView(:338) copiesinstallsfrom the worker's status anddownloads.timeoutMsfrom its config.changesCapacityOrLeases(:503) also answers true forcomponent.install-started,component.installedandcomponent.install-failed; oncomponent.installedthe refresh includes the catalog.src/gateway/aggregate.ts:aggregateStatusconcatenates the connected workers' installs, each with itsworkerId.src/cli/index.ts: the human view ofstatusprints one line per install: platform, component, state, age, waiters. The human view ofworker listprints the same under each worker. JSON output carries the field as is.- Docs:
docs/CLI.md(status,worker list),docs/HTTP-API.md(GET /v1/status,GET /v1/workers),docs/CLIENT.md.
Contract and event changes
status.getand the worker view gain an optionalinstalls. The worker view'sdownloadsgains an optionaltimeoutMs. Additive; no protocol change. A worker that does not sendinstallsshows none.- No event change.
Rules in play
- ADR 0010 §3 (installs in progress are in status) and §7 (the view copies them).
architecture.mdrule 2 (componentis carried unread), rule 12 (one record of what is installing).safety.mdrule 10: a worker'sinstallsis a claim; the gateway bounds its length and its strings before it stores them.documentation.mdrule 2.testing.mdrules 1 to 4.
Tests
status.getlists a running install asdownloadingand one behind it on the same platform aswaiting.- An install three calls joined is listed once with
waiters: 3. status.getlists no install once it has ended, whether it succeeded, failed or timed out.- A gateway's worker view shows a worker's install after
component.install-startedand drops it aftercomponent.installed, without waiting for the periodic refresh. - After
component.installedthe worker view's catalog lists the new runtime without waiting for the periodic refresh. - A worker whose status has no
installsfield yields a view with none, and staysconnected. - A worker that reports more than 16 installs or an over-long
componentis truncated to the bound, not stored as sent. - The gateway's
status.getlists each worker's installs with itsworkerId. simlock statusprints an install line while one runs and none after.
Done when
- e2e with the fake driver holding an install open:
simlock status --jsonon the worker andsimlock worker list --jsonon its gateway both show it; both show none after it ends. pnpm checkis green.
Out of scope
- Starting an install through a gateway: the next task.
- Showing bytes or a percentage in status.
- A
downloadingstage on the lease progress stream: A requester sees when its lease is waiting on a download #210.
Depends on
Approval
- Approved for delivery
Written by an agent.
Metadata
Metadata
Assignees
Labels
task:readySpec checked. An agent may implement it once its Depends on allow.
Activity
V3RON commentedon Oct 2, 2026
Spec updated: the status list is bounded to the 16 oldest installs.
Written by an agent.
github-actions commentedon Oct 2, 2026
Now
task:ready: approved, technical spec present, #216 closed.