Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,12 @@ the background, and is never handed to a new requester.
A device currently `provisioning` or `reclaiming` carries a derived
`transitionAgeMs` — how long it has been in that state — visible in `status`
and `list --devices` well before it crosses the threshold that would make
`doctor` flag it as stalled.
`doctor` flag it as stalled. Once it crosses it, with nothing working on it,
`status` marks it `stalled`
(`Device dev_7: provisioning, mode full (mid-transition 412000ms, stalled)`),
and `--json` and `list --devices` carry `"stalled": true` on it. These are the
devices `doctor` reports as `stalled-transition`; no other device carries the
field.

Human-oriented overview: daemon health *and mode*, the web console's address
when HTTP is enabled (`Console: http://127.0.0.1:4700/`, see
Expand Down
2 changes: 1 addition & 1 deletion docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ edit yourself keeps the mode you give it until the next `config set`; run
| `health.maxRecoveryAttempts` | Reboot attempts for one lease before the lease is given up as lost. | `3` |
| `health.recoveryBackoffMs` | Base delay between reboot attempts; the monitor applies exponential backoff over it. | `5 seconds` |
| `health.maxConcurrentRecoveries` | Cap on simultaneous recovery reboots, so a machine wake (every device reads `stopped` at once) cannot start a boot storm. | `1` |
| `stalledTransition.thresholdMultiplier` | Factor applied to a driver's own `provision + boot` (for `provisioning`) or `reclaim` (for `reclaiming`) estimate to get the stall threshold for `simlock doctor`'s `stalled-transition` finding. | `3` |
| `stalledTransition.thresholdMultiplier` | Factor applied to a driver's own `provision + boot` (for `provisioning`) or `reclaim` (for `reclaiming`) estimate to get the stall threshold: past it, `simlock doctor` reports a `stalled-transition` finding and `simlock status` marks the device `stalled`. | `3` |
| `stalledTransition.minimumThresholdMs` | Floor under the multiplied estimate, for a driver whose estimate is near zero. | `1 minute` |
| `drivers.ios.deviceRoot` | The CoreSimulator device set Simlock owns and scopes every `simctl` call to. See [Device roots](#device-roots). | `${SIMLOCK_HOME}/devices/ios` |
| `drivers.android.deviceRoot` | The AVD home Simlock owns; exported as `ANDROID_AVD_HOME` to every `avdmanager`/`emulator` call. See [Device roots](#device-roots). | `${SIMLOCK_HOME}/devices/android` |
Expand Down
34 changes: 32 additions & 2 deletions docs/CONSOLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ The console is for people who operate Simlock. It needs an operator token.
Coding agents keep using the CLI, the MCP server, the client and the HTTP API.

This version has sign-in, the console's navigation (Workers, Leases, Waiting,
Attention and Events), the Workers pages and the Waiting page. The other
pages say "Coming soon" until their views are built.
Attention and Events), the Workers pages, the Waiting page and the Attention
page. The other pages say "Coming soon" until their views are built.

## Turn it on

Expand Down Expand Up @@ -147,6 +147,36 @@ host every request shows that host as its worker.
A request leaves the list as soon as it gets its device, fails, or is
cancelled.

## Attention

**Attention** lists everything that needs you, in one place. Each item names
its worker and links to that worker's page. An item leaves the list as soon as
the daemon reports that its condition cleared. A gateway keeps a disconnected
worker's devices and RAM use as the worker last reported them, so their items
stay until the worker reconnects or is removed. The console only shows these;
it does not fix them.

| Item | What it means |
| --- | --- |
| `disconnected` | The gateway has lost its connection to the worker. |
| `incompatible` | The worker and the gateway have no protocol version in common. The worker's page says which versions each speaks. |
| `drained` | The worker gets no new leases (`simlock worker drain`). |
| `over RAM budget` | The devices on the worker use more RAM than its budget allows, as `simlock status` reports with `(over limit)`. |
| `quarantined` | A device Simlock could not clean up. It retries the cleanup in the background and leases the device to no one meanwhile. |
| `stalled` | A device stuck `provisioning` or `reclaiming` for longer than it should take, with nothing working on it. `simlock doctor` reports the same devices. |

The first three come from a gateway only: a single host has no gateway to lose
or disagree with, and cannot be drained. The other three show on a single host
too.

The navigation shows how many items there are beside **Attention**, on every
page. It shows no number while there are none.

Each item shows within about a second of the daemon reporting it. A stalled
device is the exception on a gateway: a device becomes stalled when its time
runs out, not by anything happening, so the gateway sees it the next time it
reads that worker, which it does at least every 30 seconds.

## Live updates

Every page keeps itself current. A change on the daemon, such as a lease
Expand Down
22 changes: 20 additions & 2 deletions docs/HTTP-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,18 @@ device, oldest first, in the shape
[`GET /v1/lease-requests`](#get-v1lease-requests) answers. A worker always
sends it, empty when nothing waits; an older daemon leaves it out.

A device in `devices` that is `provisioning` or `reclaiming` carries
`transitionAgeMs`, how long it has been in that state. One that has been there
past its threshold with nothing working on it also carries
**`stalled: true`**: the same devices `simlock doctor` reports as stalled (see
`stalledTransition.*` in [CONFIGURATION.md](CONFIGURATION.md)). Every other
device has no `stalled` field, and an older daemon sends none.

```json
{ "id": "dev_7", "state": "provisioning", "mode": "full", "transitionAgeMs": 412000, "stalled": true,
"spec": { "platform": "ios", "model": "iPhone 16", "osVersion": "18.4" } }
```

On a **gateway** the numbers are the fleet's — capacity summed across connected
workers (`ramBudget` over the workers that report one, `overLimit` when any of
them is, absent when none does), every gateway-issued and local lease, every device, the
Expand Down Expand Up @@ -1054,6 +1066,11 @@ which worker has a custom Android profile. `host` is the worker's machine, the s
`GET /v1/status` reports, as of the gateway's last refresh: a tool installed
or upgraded on the worker shows here without a restart of either side.

`devices` are the worker's devices as its own
[`GET /v1/status`](#get-v1status) reports them, `stalled` included. A device
stalls with no event to report it, so the gateway shows a new stall after its
next periodic refresh of that worker.

`protocol` appears only on an `incompatible` worker: it names both ranges,
the worker's and the gateway's, so you can see which side to upgrade. A worker
too old to overlap is the ordinary upgrade path, not a fault, and its view
Expand Down Expand Up @@ -1122,8 +1139,9 @@ an all-or-nothing that leaves the operator guessing.
- `GET /v1/leases` — every active lease (`simlock list --leases`).
- `GET /v1/lease-requests` — every request waiting for a device
(`simlock list --requests`); see below.
- `GET /v1/devices` — every managed device, with state and
`transitionAgeMs` (`simlock list --devices`).
- `GET /v1/devices` — every managed device, with state,
`transitionAgeMs` and `stalled` as [`GET /v1/status`](#get-v1status)
describes them (`simlock list --devices`).
- `GET /v1/events?since=<duration>` — replay business events newer than
`since` (`simlock events --since`). They come from the daemon's event file,
so they include events from before a daemon restart and beyond the 1000
Expand Down
Loading
Loading