Skip to content

Status lists the installs in progress #218

Closed

Description

@V3RON

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 }. since is when the first call for it arrived; waiters is 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: statusGetOutput gains optional installs, an array of that shape, at most 16 entries with component at most 64 characters. workerViewSchema (:705) gains the same optional field, and downloads there gains optional timeoutMs. Entries on a gateway's own status.get also carry workerId.
  • src/daemon/dispatcher.ts (#statusGet): fill installs from the installer. Always present on a worker, empty when nothing is installing.
  • src/gateway/worker-link.ts: #rebuildView (:338) copies installs from the worker's status and downloads.timeoutMs from its config. changesCapacityOrLeases (:503) also answers true for component.install-started, component.installed and component.install-failed; on component.installed the refresh includes the catalog.
  • src/gateway/aggregate.ts: aggregateStatus concatenates the connected workers' installs, each with its workerId.
  • src/cli/index.ts: the human view of status prints one line per install: platform, component, state, age, waiters. The human view of worker list prints 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.get and the worker view gain an optional installs. The worker view's downloads gains an optional timeoutMs. Additive; no protocol change. A worker that does not send installs shows none.
  • No event change.

Rules in play

  • ADR 0010 §3 (installs in progress are in status) and §7 (the view copies them).
  • architecture.md rule 2 (component is carried unread), rule 12 (one record of what is installing).
  • safety.md rule 10: a worker's installs is a claim; the gateway bounds its length and its strings before it stores them.
  • documentation.md rule 2.
  • testing.md rules 1 to 4.

Tests

  • status.get lists a running install as downloading and one behind it on the same platform as waiting.
  • An install three calls joined is listed once with waiters: 3.
  • status.get lists 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-started and drops it after component.installed, without waiting for the periodic refresh.
  • After component.installed the worker view's catalog lists the new runtime without waiting for the periodic refresh.
  • A worker whose status has no installs field yields a view with none, and stays connected.
  • A worker that reports more than 16 installs or an over-long component is truncated to the bound, not stored as sent.
  • The gateway's status.get lists each worker's installs with its workerId.
  • simlock status prints an install line while one runs and none after.

Done when

  • e2e with the fake driver holding an install open: simlock status --json on the worker and simlock worker list --json on its gateway both show it; both show none after it ends.
  • pnpm check is green.

Out of scope

Depends on

Approval

  • Approved for delivery

Written by an agent.

Activity

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

    @V3RON
    ContributorAuthor

    Spec updated: the status list is bounded to the 16 oldest installs.

    Written by an agent.

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

    @github-actions
    Contributor

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

  5. self-assigned this
    on Oct 2, 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