rescue: service-ladder — the advised service rescue ladder with tried/failed memory #96

Closed
opened 2026-07-25 05:00:08 +00:00 by ben · 1 comment
Owner

Parent

Feature spec: #21 (rescue).

What to build

When monitoring's respond ladder escalates a downed service it could not fix (P5-S4, or after a fix that did not hold, P5-S4x), the incident arrives in rescue on the service rescue ladder (P8-S1) with its history attached — the incident summary and logs, and any failed-fix evidence carried in rather than discarded. The operator never starts from a blank slate.

The ladder is a stateful rescue object, not a menu (DDR 0088): it shows its rungs in order — restart → redeploy → move to a healthy device → restore the last good snapshot — each with a plain "what this does" line, and it remembers every rung already tried and failed with its timestamp and its own log, so reopening shows the worked ladder, never a fresh menu. Two rungs degrade honestly: a move rung is capacity-checked before it runs (it names the target and states the capacity was checked; a move that cannot be placed is shown as a failed rung with that reason, never an attempted deploy), and the restore rung hands off to backups' restore machinery (P7-S4) naming the dataset and snapshot rather than reinventing restore. A rung that recovers the service audit-logs the action, reports recovered, and resolves the monitoring alert back to watching (P5-S1).

This slice is thin UI over the rescue orchestrator (control plane, ADR 0086); the surface renders states, it does not decide them. The exhausted-ladder → remote support path (story 9) lands in remote-support-engagement, not here.

Acceptance criteria

  • (story 1) Given monitoring's respond ladder escalates a downed service (P5-S4), when rescue opens, then P8-S1 shows the service rescue ladder for that service with the incident summary (e.g. "Chat keeps crashing on rimu — failed to start 3 times since 14:02") and its logs.
  • (story 1) Given monitoring escalates after a fix that did not hold (P5-S4x), when rescue opens, then the failed-fix evidence is carried in and attached to the ladder, not discarded.
  • (story 4) Given a downed service, when P8-S1 loads, then it shows the rungs in order — restart → redeploy → move to a healthy device → restore the last good snapshot — each with a plain "what this does" line.
  • (story 5) Given a rung has been tried, when the operator reopens the rescue, then that rung shows its outcome with a timestamp and its own log (e.g. "Restart — tried at 14:06, crashed again"), and reopening shows the worked ladder, never a fresh menu (DDR 0088 §1).
  • (story 6) Given a "move to a healthy device" rung, when it is offered, then it names the target and states its capacity was checked (e.g. "tōtara has capacity — checked"); a move that cannot be placed is shown as a failed rung with that reason, not an attempted deploy (DDR 0088 §2).
  • (story 7) Given a restore rung, when the operator chooses it, then it names the dataset and snapshot (e.g. "Chat's dataset, yesterday 02:00") and invokes backups' restore machinery (P7-S4), reporting its outcome; rescue never reimplements restore (DDR 0088 §3).
  • (story 8) Given a rung recovers the service, when it passes, then the action is audit-logged, the ladder reports recovered, and the monitoring alert resolves (back to P5-S1).

Blocked by

  • #25 — ladder rungs issue clan operations
  • #87 — escalate hand-off carries the incident
  • #91 — restore rung hands to backups

Task manifest

task: rescue:service-ladder
implements_flow: p8-rescue
implements_edge: P5-S4→S1, P5-S4x→S1, S1→S1, S1→P7-S4, S1→P5-S1, S1→S6
wireframe: docs/ux/wireframes/p8-rescue/p8-s1-service-rescue.html
interface: rescue orchestrator (control plane) — open a service ladder from an escalated incident; offer/attempt a rung (restart, redeploy, capacity-checked move, backups restore hand-off); record tried/failed with timestamp+log; report recovered and resolve the alert
seam: rescue orchestrator seam tests (control plane, Go) — fake fleet-state provider, fake clan.Clan (assert each rung issues the right operation), per-service HealthCheck fakes (held/didn't), in-memory ladder state
acceptance:
  - given: monitoring escalates a downed service (P5-S4), or a fix that did not hold (P5-S4x)
    when: rescue opens
    then: P8-S1 shows the service ladder with the incident summary and logs; failed-fix evidence is carried in, not discarded
  - given: a downed service
    when: P8-S1 loads
    then: rungs show in order restart → redeploy → move → restore, each with a plain "what this does" line
  - given: a rung has been tried
    when: the operator reopens the rescue
    then: that rung shows its outcome with timestamp and its own log; reopening shows the worked ladder, never a fresh menu (DDR 0088 §1)
  - given: a move rung
    when: it is offered
    then: it names the target and states capacity was checked; an unplaceable move is a failed rung with that reason, not an attempted deploy (DDR 0088 §2)
  - given: a restore rung
    when: chosen
    then: it names dataset and snapshot and invokes backups' restore (P7-S4), reporting its outcome; rescue never reimplements restore (DDR 0088 §3)
  - given: a rung recovers the service
    when: it passes
    then: the action is audit-logged, the ladder reports recovered, and the alert resolves (P5-S1)
depends_on: [bootstrap:clan-seam, monitoring:respond-ladder, backups:restore-in-place-replaces]
out_of_scope:
  - story 9 exhausted-ladder → remote support — remote-support-engagement's
  - stories 10–16 device ladder — device-ladder's
  - backups' restore policy/runs/snapshots/UI (P7) — the restore rung invokes it, does not own it
  - monitoring's detection and decision to escalate (P5)
needs_human_decision: []
## Parent Feature spec: #21 (rescue). ## What to build When monitoring's respond ladder escalates a downed service it could not fix (P5-S4, or after a fix that did not hold, P5-S4x), the incident arrives in rescue on the **service rescue ladder** (P8-S1) with its history attached — the incident summary and logs, and any failed-fix evidence carried in rather than discarded. The operator never starts from a blank slate. The ladder is a stateful **rescue** object, not a menu (DDR 0088): it shows its rungs in order — restart → redeploy → move to a healthy device → restore the last good snapshot — each with a plain "what this does" line, and it **remembers** every rung already tried and failed with its timestamp and its own log, so reopening shows the worked ladder, never a fresh menu. Two rungs degrade honestly: a move rung is **capacity-checked before it runs** (it names the target and states the capacity was checked; a move that cannot be placed is shown as a failed rung with that reason, never an attempted deploy), and the restore rung **hands off to backups' restore machinery** (P7-S4) naming the dataset and snapshot rather than reinventing restore. A rung that recovers the service audit-logs the action, reports **recovered**, and resolves the monitoring alert back to watching (P5-S1). This slice is thin UI over the `rescue` orchestrator (control plane, ADR 0086); the surface renders states, it does not decide them. The exhausted-ladder → remote support path (story 9) lands in remote-support-engagement, not here. ## Acceptance criteria - [ ] (story 1) Given monitoring's respond ladder escalates a downed service (P5-S4), when rescue opens, then P8-S1 shows the service rescue ladder for that service with the incident summary (e.g. "Chat keeps crashing on rimu — failed to start 3 times since 14:02") and its logs. - [ ] (story 1) Given monitoring escalates after a fix that did not hold (P5-S4x), when rescue opens, then the failed-fix evidence is carried in and attached to the ladder, not discarded. - [ ] (story 4) Given a downed service, when P8-S1 loads, then it shows the rungs in order — restart → redeploy → move to a healthy device → restore the last good snapshot — each with a plain "what this does" line. - [ ] (story 5) Given a rung has been tried, when the operator reopens the rescue, then that rung shows its outcome with a timestamp and its own log (e.g. "Restart — tried at 14:06, crashed again"), and reopening shows the worked ladder, never a fresh menu (DDR 0088 §1). - [ ] (story 6) Given a "move to a healthy device" rung, when it is offered, then it names the target and states its capacity was checked (e.g. "tōtara has capacity — checked"); a move that cannot be placed is shown as a failed rung with that reason, not an attempted deploy (DDR 0088 §2). - [ ] (story 7) Given a restore rung, when the operator chooses it, then it names the dataset and snapshot (e.g. "Chat's dataset, yesterday 02:00") and invokes backups' restore machinery (P7-S4), reporting its outcome; rescue never reimplements restore (DDR 0088 §3). - [ ] (story 8) Given a rung recovers the service, when it passes, then the action is audit-logged, the ladder reports recovered, and the monitoring alert resolves (back to P5-S1). ## Blocked by - #25 — ladder rungs issue clan operations - #87 — escalate hand-off carries the incident - #91 — restore rung hands to backups ## Task manifest ```yaml task: rescue:service-ladder implements_flow: p8-rescue implements_edge: P5-S4→S1, P5-S4x→S1, S1→S1, S1→P7-S4, S1→P5-S1, S1→S6 wireframe: docs/ux/wireframes/p8-rescue/p8-s1-service-rescue.html interface: rescue orchestrator (control plane) — open a service ladder from an escalated incident; offer/attempt a rung (restart, redeploy, capacity-checked move, backups restore hand-off); record tried/failed with timestamp+log; report recovered and resolve the alert seam: rescue orchestrator seam tests (control plane, Go) — fake fleet-state provider, fake clan.Clan (assert each rung issues the right operation), per-service HealthCheck fakes (held/didn't), in-memory ladder state acceptance: - given: monitoring escalates a downed service (P5-S4), or a fix that did not hold (P5-S4x) when: rescue opens then: P8-S1 shows the service ladder with the incident summary and logs; failed-fix evidence is carried in, not discarded - given: a downed service when: P8-S1 loads then: rungs show in order restart → redeploy → move → restore, each with a plain "what this does" line - given: a rung has been tried when: the operator reopens the rescue then: that rung shows its outcome with timestamp and its own log; reopening shows the worked ladder, never a fresh menu (DDR 0088 §1) - given: a move rung when: it is offered then: it names the target and states capacity was checked; an unplaceable move is a failed rung with that reason, not an attempted deploy (DDR 0088 §2) - given: a restore rung when: chosen then: it names dataset and snapshot and invokes backups' restore (P7-S4), reporting its outcome; rescue never reimplements restore (DDR 0088 §3) - given: a rung recovers the service when: it passes then: the action is audit-logged, the ladder reports recovered, and the alert resolves (P5-S1) depends_on: [bootstrap:clan-seam, monitoring:respond-ladder, backups:restore-in-place-replaces] out_of_scope: - story 9 exhausted-ladder → remote support — remote-support-engagement's - stories 10–16 device ladder — device-ladder's - backups' restore policy/runs/snapshots/UI (P7) — the restore rung invokes it, does not own it - monitoring's detection and decision to escalate (P5) needs_human_decision: [] ```
Author
Owner

Done in 4453d71 (on origin/main).

The service rescue ladder (P8-S1) at the rescue seam (ADR 0086, DDR 0088):

Seam (internal/rescue/serviceladder.go, serviceladder_fakes.go, serviceladder_test.go):

  • ServiceLadders.Escalate implements monitor RescueIntake for a service-track alert (edges P5-S4→P8-S1, P5-S4x→P8-S1) — the incident summary, logs, and failed-fix evidence are carried in, never discarded (story 1).
  • ServiceLadder(service) shows the four rungs in order restart → redeploy → move → restore, each with a plain what-this-does line (story 4), and remembers tried/failed with timestamp + note so reopening shows the worked ladder, never a fresh menu (story 5, DDR 0088 §1).
  • Restart/Redeploy ride one scoped clan.Deploy (ADR 0070); Move is capacity-checked before it runs and names its target, an unplaceable move a failed rung with that reason and no attempted deploy (story 6, §2); Restore hands to backups in-place restore machinery (P7-S4) naming dataset + snapshot and issues zero clan ops (story 7, §3).
  • Every rung is gated on the service health check: a rung that recovers audit-logs (attributed, ADR 0027), reports recovered, and resolves the monitoring alert back to watching via the new AlertResolver port (story 8, edge S1→P5-S1); a rung that does not hold is a failed rung with the evidence (§6); an exhausted ladder offers remote support with the evidence bundled (§7).
  • New ports: Restorer (over backups), AlertResolver (over monitor), AuditSink (+ MemoryAuditSink), Revisions.

Dashboard: ServiceRescueSurface + ServiceLadderScreen (P8-S1) to the wireframe element contract, over FakeServiceRescueClient in lib/rescueService.ts; exported from index.ts.

Tests: 18 Go seam tests + 10 Vue component tests; full Go suite and full dashboard suite (376 tests) green; vue-tsc build + eslint clean.

Out of scope (untouched): remote-support engagement (story 9), the device ladder (#95), backups restore policy/UI (P7), monitoring detection/escalation (P5).

Done in `4453d71` (on `origin/main`). The service rescue ladder (P8-S1) at the `rescue` seam (ADR 0086, DDR 0088): **Seam** (`internal/rescue/serviceladder.go`, `serviceladder_fakes.go`, `serviceladder_test.go`): - `ServiceLadders.Escalate` implements monitor `RescueIntake` for a service-track alert (edges P5-S4→P8-S1, P5-S4x→P8-S1) — the incident summary, logs, and failed-fix evidence are carried in, never discarded (story 1). - `ServiceLadder(service)` shows the four rungs in order restart → redeploy → move → restore, each with a plain what-this-does line (story 4), and remembers tried/failed with timestamp + note so reopening shows the worked ladder, never a fresh menu (story 5, DDR 0088 §1). - Restart/Redeploy ride one scoped `clan.Deploy` (ADR 0070); Move is capacity-checked before it runs and names its target, an unplaceable move a failed rung with that reason and no attempted deploy (story 6, §2); Restore hands to backups in-place restore machinery (P7-S4) naming dataset + snapshot and issues zero clan ops (story 7, §3). - Every rung is gated on the service health check: a rung that recovers audit-logs (attributed, ADR 0027), reports recovered, and resolves the monitoring alert back to watching via the new `AlertResolver` port (story 8, edge S1→P5-S1); a rung that does not hold is a failed rung with the evidence (§6); an exhausted ladder offers remote support with the evidence bundled (§7). - New ports: `Restorer` (over backups), `AlertResolver` (over monitor), `AuditSink` (+ `MemoryAuditSink`), `Revisions`. **Dashboard**: `ServiceRescueSurface` + `ServiceLadderScreen` (P8-S1) to the wireframe element contract, over `FakeServiceRescueClient` in `lib/rescueService.ts`; exported from `index.ts`. **Tests**: 18 Go seam tests + 10 Vue component tests; full Go suite and full dashboard suite (376 tests) green; `vue-tsc` build + eslint clean. Out of scope (untouched): remote-support engagement (story 9), the device ladder (#95), backups restore policy/UI (P7), monitoring detection/escalation (P5).
ben closed this issue 2026-07-26 02:13:10 +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#96
No description provided.