Repository navigation
Closed
Labels
task:draftScope written; technical spec or its spec check missing.
Description
Part of #88.
Scope
The operator sees, in one place, everything that needs their attention:
workers that are disconnected, incompatible or drained; quarantined
devices; devices stuck provisioning or reclaiming; a host over its RAM
budget. Each item appears within about a second of happening and leaves
when it clears. The shell shows how many items there are, from any view.
Technical spec
Modules touched
src/core/doctor.ts: the stall test insidestalledTransitionFinding
becomes its own exported function,isStalledTransition, taking the
device, its driver, thestalledTransitionconfig, the claims and the
time. The doctor's finding calls it. Behaviour does not change.src/daemon/dispatcher.ts:#decorateDevicesetsstalled: trueon a
device for whichisStalledTransitionholds. The dispatcher gains what
that needs: the drivers by platform, the config, the device operation
claims.src/contract/schemas.ts: the status device schema gains optional
stalled. Worker views carry it because they copy status devices.ui/: the Attention view and the count in the shell, both derived from
GET /v1/workers:- a worker whose
connectionisdisconnectedorincompatible, or
whosedrainedistrue; - a device whose state is
quarantined; - a device with
stalled: true; - a worker whose capacity reports
ramBudget.overLimit: true.
Each item names its worker and links to it.
- a worker whose
src/cli/index.ts:simlock statusmarks a stalled device next to it,
the way it marks a quarantined one.docs/HTTP-API.md(thestalledfield),docs/CLI.md(the marker),
docs/CONSOLE.md(the Attention view and each condition).
Contract and event changes
stalled(optional boolean) on status devices, onlist.getdevices and
on worker view devices. Absent means not stalled. Additive; no protocol
version change.- No event changes. A stall is not a new event: the doctor's
device.stalled-transition-detectedkeeps its meaning.
Rules in play
architecture.mdrule on one place: the stall rule lives in one
function; the doctor and the status decoration both call it.testing.md: prove the doctor's finding is unchanged.
Tests
isStalledTransition holds for a provisioning device past its threshold with no claimisStalledTransition does not hold for a device with a live operation claimthe doctor's stalled-transition finding is unchangedstatus marks a stalled device with stalled: true and leaves others without ita gateway's worker view carries a worker device's stalled flagsimlock status marks a stalled devicethe attention list holds a disconnected, an incompatible and a drained workerthe attention list holds a quarantined device and a stalled devicethe attention list holds a worker over its RAM budgetan item leaves the attention list when its condition clears- Browser lane, in Chromium, Firefox and WebKit:
draining a worker adds it to the attention view within a secondundraining it removes it within a secondstopping a worker adds it as disconnected within a secondthe attention count shows in the shell from every viewthe Attention view has no horizontal scroll at 360px widethe Attention view is usable with the keyboard alone
Done when
- Each condition listed under Scope appears in the Attention view on a
gateway, and the ones that apply to one machine also on a single host. - Each appears within a second of happening and leaves when it clears.
simlock doctorreports the same stalls as before.- The browser lane passes in all three browsers.
Out of scope
- Fixing anything from the console.
- Notifications outside the page.
Depends on
Approval
- Approved for delivery
Written by an agent.
Metadata
Metadata
Assignees
Labels
task:draftScope written; technical spec or its spec check missing.
Activity
feat(contract,daemon,http,docs): a worker answers the fleet operation…
feat(ui,core,daemon,cli): attention view and stalled devices (#295)