rescue: device-ladder — the advised device rescue ladder, impact first #95

Closed
opened 2026-07-25 04:59:56 +00:00 by ben · 1 comment
Owner

Parent

Feature spec: #21 (rescue).

What to build

When monitoring escalates a degraded device it could not fix (P5-S4), the incident arrives on the device rescue ladder (P8-S2), and the track matches what is actually down. The screen states the impact first, in service terms — which data lost a copy but is still safe, which services are down (e.g. "rimu unreachable 38 min · Files & documents lost a copy, still safe on tōtara · Chat is down") — before offering any advised option.

The ladder climbs wait → rehome → remove, honestly (DDR 0088). Wait holds on the device's own pattern and says why it is the right call (and names when it is not, e.g. "rimu is always-on"). Rehome places the device's services onto healthy nodes P4-style, capacity-checked before anything moves, with the impact reviewed before deploy. Remove never grows a second, scarier removal path: when a removal would drop the last copy of data it hands to provisioning's standing change surface and its LOSES destructive confirm (P4-S3x, ADRs 0060/0063), revoking keys and rotating secrets where warranted (DDR 0088 §4). A device that comes back either rejoins cleanly or re-provisions through provisioning's assess surface (P4-S1). And when the degraded device is the gateway, no dashboard can serve this rescue, so P8-S2 summons the operator app's break-glass surface (P8-S3, ADRs 0086/0087).

Thin UI over the rescue orchestrator; the exhausted-ladder → remote support path (story 16 offer) lands in remote-support-engagement.

Acceptance criteria

  • (story 2) Given monitoring escalates a degraded device (P5-S4), when rescue opens, then P8-S2 shows the device rescue ladder with the device's impact stated in service terms (e.g. "rimu unreachable 38 min · Files & documents lost a copy, still safe on tōtara · Chat is down").
  • (story 10) Given a degraded device, when P8-S2 loads, then the impact is stated first in service terms (which data lost a copy but is still safe, which services are down), then the advised options.
  • (story 11) Given a device with an intermittent pattern, when the operator chooses Wait, then the ladder holds and says why it is the right call for that device's pattern (and names when it is not, e.g. "rimu is always-on").
  • (story 12) Given a gone device, when the operator chooses Rehome, then services are placed onto healthy nodes P4-style, capacity-checked before anything moves, and the impact is reviewed before deploy.
  • (story 13) Given the operator chooses Remove the device, when the removal would drop the last copy of data, then it hands to provisioning's standing change surface and its LOSES destructive confirm (P4-S3x, ADRs 0060/0063); keys are revoked and secrets rotated if warranted; rescue never grows a second removal path (DDR 0088 §4).
  • (story 14) Given the device returns, when it rejoins, then it either rejoins cleanly or re-provisions through provisioning's assess surface (P4-S1).
  • (story 15) Given the degraded device is the gateway, when P8-S2 recognises it, then no dashboard can serve this rescue and it summons the operator app's break-glass surface (P8-S3, ADRs 0086/0087).
  • (story 16) Given every device option has been tried and named failed, when the ladder is exhausted, then it offers Request remote support (P8-S6) with the evidence bundled.

Blocked by

  • #25 — ladder rungs issue clan operations
  • #87 — escalate hand-off carries the incident
  • #51 — remove routes through the LOSES confirm

Task manifest

task: rescue:device-ladder
implements_flow: p8-rescue
implements_edge: P5-S4→S2, S2→S2, S2→P4-S1, S2→P4-S3x, S2→S3, S2→S6
wireframe: docs/ux/wireframes/p8-rescue/p8-s2-device-degraded.html
interface: rescue orchestrator (control plane) — open a device ladder from an escalated incident; state impact in service terms; offer wait (pattern-aware) / rehome (capacity-checked P4-style) / remove (hand to provisioning's LOSES confirm); route a returned device to P4-S1; summon break-glass when the device is the gateway
seam: rescue orchestrator seam tests (control plane, Go) — fake fleet-state provider, fake clan.Clan, per-service HealthCheck fakes, in-memory ladder state; assert removal routes to provisioning's LOSES confirm (never a second removal path) and gateway degradation summons break-glass
acceptance:
  - given: monitoring escalates a degraded device (P5-S4)
    when: rescue opens
    then: P8-S2 shows the device ladder with impact stated first in service terms, then advised options
  - given: an intermittent-pattern device
    when: Wait is chosen
    then: the ladder holds and says why it is right for that pattern (and names when it is not)
  - given: a gone device
    when: Rehome is chosen
    then: services are placed P4-style, capacity-checked before moving, impact reviewed before deploy
  - given: Remove is chosen and it would drop the last copy of data
    when: the removal runs
    then: it hands to provisioning's LOSES confirm (P4-S3x); keys revoked and secrets rotated if warranted; no second removal path (DDR 0088 §4)
  - given: the device returns
    when: it rejoins
    then: it rejoins cleanly or re-provisions through provisioning's assess (P4-S1)
  - given: the degraded device is the gateway
    when: P8-S2 recognises it
    then: it summons the operator app's break-glass surface (P8-S3)
  - given: every device option is tried and named failed
    when: the ladder is exhausted
    then: it offers Request remote support (P8-S6) with evidence bundled
depends_on: [bootstrap:clan-seam, monitoring:respond-ladder, provisioning:provision-review-impact]
out_of_scope:
  - stories 4–8 service ladder — service-ladder's
  - stories 17–20 the remote-support engagement itself — remote-support-engagement's
  - provisioning's change/removal surface and LOSES confirm (P4) — the remove rung hands to it, does not implement it
  - monitoring's detection and decision to escalate (P5)
needs_human_decision: []
## Parent Feature spec: #21 (rescue). ## What to build When monitoring escalates a degraded device it could not fix (P5-S4), the incident arrives on the **device rescue ladder** (P8-S2), and the track matches what is actually down. The screen states the **impact first, in service terms** — which data lost a copy but is still safe, which services are down (e.g. "rimu unreachable 38 min · Files & documents lost a copy, still safe on tōtara · Chat is down") — before offering any advised option. The ladder climbs wait → rehome → remove, honestly (DDR 0088). **Wait** holds on the device's own pattern and says why it is the right call (and names when it is not, e.g. "rimu is always-on"). **Rehome** places the device's services onto healthy nodes P4-style, capacity-checked before anything moves, with the impact reviewed before deploy. **Remove** never grows a second, scarier removal path: when a removal would drop the last copy of data it hands to provisioning's standing change surface and its **LOSES destructive confirm** (P4-S3x, ADRs 0060/0063), revoking keys and rotating secrets where warranted (DDR 0088 §4). A device that **comes back** either rejoins cleanly or re-provisions through provisioning's assess surface (P4-S1). And when the degraded device is the **gateway**, no dashboard can serve this rescue, so P8-S2 summons the operator app's break-glass surface (P8-S3, ADRs 0086/0087). Thin UI over the `rescue` orchestrator; the exhausted-ladder → remote support path (story 16 offer) lands in remote-support-engagement. ## Acceptance criteria - [ ] (story 2) Given monitoring escalates a degraded device (P5-S4), when rescue opens, then P8-S2 shows the device rescue ladder with the device's impact stated in service terms (e.g. "rimu unreachable 38 min · Files & documents lost a copy, still safe on tōtara · Chat is down"). - [ ] (story 10) Given a degraded device, when P8-S2 loads, then the impact is stated first in service terms (which data lost a copy but is still safe, which services are down), then the advised options. - [ ] (story 11) Given a device with an intermittent pattern, when the operator chooses Wait, then the ladder holds and says why it is the right call for that device's pattern (and names when it is not, e.g. "rimu is always-on"). - [ ] (story 12) Given a gone device, when the operator chooses Rehome, then services are placed onto healthy nodes P4-style, capacity-checked before anything moves, and the impact is reviewed before deploy. - [ ] (story 13) Given the operator chooses Remove the device, when the removal would drop the last copy of data, then it hands to provisioning's standing change surface and its LOSES destructive confirm (P4-S3x, ADRs 0060/0063); keys are revoked and secrets rotated if warranted; rescue never grows a second removal path (DDR 0088 §4). - [ ] (story 14) Given the device returns, when it rejoins, then it either rejoins cleanly or re-provisions through provisioning's assess surface (P4-S1). - [ ] (story 15) Given the degraded device is the gateway, when P8-S2 recognises it, then no dashboard can serve this rescue and it summons the operator app's break-glass surface (P8-S3, ADRs 0086/0087). - [ ] (story 16) Given every device option has been tried and named failed, when the ladder is exhausted, then it offers Request remote support (P8-S6) with the evidence bundled. ## Blocked by - #25 — ladder rungs issue clan operations - #87 — escalate hand-off carries the incident - #51 — remove routes through the LOSES confirm ## Task manifest ```yaml task: rescue:device-ladder implements_flow: p8-rescue implements_edge: P5-S4→S2, S2→S2, S2→P4-S1, S2→P4-S3x, S2→S3, S2→S6 wireframe: docs/ux/wireframes/p8-rescue/p8-s2-device-degraded.html interface: rescue orchestrator (control plane) — open a device ladder from an escalated incident; state impact in service terms; offer wait (pattern-aware) / rehome (capacity-checked P4-style) / remove (hand to provisioning's LOSES confirm); route a returned device to P4-S1; summon break-glass when the device is the gateway seam: rescue orchestrator seam tests (control plane, Go) — fake fleet-state provider, fake clan.Clan, per-service HealthCheck fakes, in-memory ladder state; assert removal routes to provisioning's LOSES confirm (never a second removal path) and gateway degradation summons break-glass acceptance: - given: monitoring escalates a degraded device (P5-S4) when: rescue opens then: P8-S2 shows the device ladder with impact stated first in service terms, then advised options - given: an intermittent-pattern device when: Wait is chosen then: the ladder holds and says why it is right for that pattern (and names when it is not) - given: a gone device when: Rehome is chosen then: services are placed P4-style, capacity-checked before moving, impact reviewed before deploy - given: Remove is chosen and it would drop the last copy of data when: the removal runs then: it hands to provisioning's LOSES confirm (P4-S3x); keys revoked and secrets rotated if warranted; no second removal path (DDR 0088 §4) - given: the device returns when: it rejoins then: it rejoins cleanly or re-provisions through provisioning's assess (P4-S1) - given: the degraded device is the gateway when: P8-S2 recognises it then: it summons the operator app's break-glass surface (P8-S3) - given: every device option is tried and named failed when: the ladder is exhausted then: it offers Request remote support (P8-S6) with evidence bundled depends_on: [bootstrap:clan-seam, monitoring:respond-ladder, provisioning:provision-review-impact] out_of_scope: - stories 4–8 service ladder — service-ladder's - stories 17–20 the remote-support engagement itself — remote-support-engagement's - provisioning's change/removal surface and LOSES confirm (P4) — the remove rung hands to it, does not implement it - monitoring's detection and decision to escalate (P5) needs_human_decision: [] ```
Author
Owner

Done in e1b8111 (sandcastle: rescue:device-ladder #95).

Seam — internal/rescue/deviceladder.go (+deviceladder_test.go, 12 tests): the rescue orchestrator's device-track face (ADR 0086, DDR 0088).

  • DeviceLadders.Escalate implements monitoring's RescueIntake — the P5-S4 hand-off lands, the track matching what is actually down (story 2); re-escalation keeps the worked ladder (never a fresh menu).
  • DeviceLadder() states the impact first, in service terms — "rimu unreachable 38 min", data that lost a copy but is still safe (and where), backup copies that stop counting, services down — before the advised options (story 10).
  • Wait holds on the device's own pattern and names when it is not the right call ("It isn't: rimu is always-on"); a tried wait past its window fails honestly (story 11).
  • Rehome is two-phase (story 12): PlanRehome capacity-checks every placement ("tōtara has capacity — checked") and moves NOTHING — no capacity is a failed rung with the reason, never an attempted deploy; Rehome commits the placements, one scoped clan.Deploy, each moved service gated on its own port HealthCheck on its NEW node.
  • Remove (story 13): hands to provisioning's standing change surface — the seam test injects the REAL provision orchestrator and asserts the LOSES row is provisioning's own wording, confirm = P4-S3x, and rescue issued zero clan operations (never a second removal path, DDR 0088 §4); keys always revoked, secrets rotated where warranted.
  • Returned device (story 14): rejoins cleanly, or routes to P4-S1 when its services were rehomed away.
  • Gateway degraded (story 15): SummonsBreakGlass + the honest note — no dashboard can serve this rescue (P8-S3, ADRs 0086/0087).
  • Exhausted (story 16): wait + rehome both named failed → request-remote-support offered with the evidence bundled (escalation + worked rungs).

UI — DeviceRescueSurface + DeviceLadderScreen (P8-S2) to the wireframe's element contract (data-field="device-ladder", remove-rung-handoff, data-status="gateway-degraded", data-action="request-remote-support"), impact block before the ladder, plan-review-then-deploy two-step; 8 Vue tests in dashboard/tests/unit/rescueDeviceLadder.test.ts.

Full suites green (go build/vet/test; vue-tsc, eslint, vitest 317/317). STATUS.md updated in the same commit.

Done in e1b8111 (`sandcastle: rescue:device-ladder #95`). **Seam** — `internal/rescue/deviceladder.go` (+`deviceladder_test.go`, 12 tests): the `rescue` orchestrator's device-track face (ADR 0086, DDR 0088). - `DeviceLadders.Escalate` implements monitoring's `RescueIntake` — the P5-S4 hand-off lands, the track matching what is actually down (story 2); re-escalation keeps the worked ladder (never a fresh menu). - `DeviceLadder()` states the impact **first, in service terms** — "rimu unreachable 38 min", data that lost a copy but is still safe (and where), backup copies that stop counting, services down — before the advised options (story 10). - **Wait** holds on the device's own pattern and names when it is not the right call ("It isn't: rimu is always-on"); a tried wait past its window fails honestly (story 11). - **Rehome** is two-phase (story 12): `PlanRehome` capacity-checks every placement ("tōtara has capacity — checked") and moves NOTHING — no capacity is a failed rung with the reason, never an attempted deploy; `Rehome` commits the placements, one scoped `clan.Deploy`, each moved service gated on its own port `HealthCheck` on its NEW node. - **Remove** (story 13): hands to provisioning's standing change surface — the seam test injects the REAL `provision` orchestrator and asserts the LOSES row is provisioning's own wording, confirm = P4-S3x, and rescue issued **zero** clan operations (never a second removal path, DDR 0088 §4); keys always revoked, secrets rotated where warranted. - **Returned device** (story 14): rejoins cleanly, or routes to P4-S1 when its services were rehomed away. - **Gateway degraded** (story 15): `SummonsBreakGlass` + the honest note — no dashboard can serve this rescue (P8-S3, ADRs 0086/0087). - **Exhausted** (story 16): wait + rehome both named failed → `request-remote-support` offered with the evidence bundled (escalation + worked rungs). **UI** — `DeviceRescueSurface` + `DeviceLadderScreen` (P8-S2) to the wireframe's element contract (`data-field="device-ladder"`, `remove-rung-handoff`, `data-status="gateway-degraded"`, `data-action="request-remote-support"`), impact block before the ladder, plan-review-then-deploy two-step; 8 Vue tests in `dashboard/tests/unit/rescueDeviceLadder.test.ts`. Full suites green (go build/vet/test; vue-tsc, eslint, vitest 317/317). STATUS.md updated in the same commit.
ben closed this issue 2026-07-25 21:26:48 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#95
No description provided.