rescue: the display reads discard SweepExpired's cut failure — a key shown expired while the supporter may retain access #289

Closed
opened 2026-08-05 23:10:23 +00:00 by ben · 2 comments
Owner

internal/rescue/remotesupport.go:387 and :409 — both display reads call _ = e.keys.SweepExpired(). That sweep is what actually severs a supporter (internal/rescue/keys.go:208 → Cut on mesh + SSH), and the comment at line 385 says the re-poll "is what makes 'auto-revoked at expiry' real" — then discards that mechanism's only failure signal. StatusAt (internal/rescue/keys_ledger.go:76-85) derives KeyExpired purely from the clock, so a failed cut renders "expired, auto-revoked" while live mesh + SSH access persists.

(The identity side is a resting refusal in today's whole composition — see the rescue-adapters slice ticket — so this is about the surface being honest once it's real, and about the read not lying meanwhile.)

Acceptance

  • A failed sweep is not silent: the status surface distinguishes "expired and severed" from "expired — severing failed, access may persist" (or the read propagates the error).
  • The three mutating call sites' existing propagation unchanged.
  • Test: failing Cut ⇒ the rendered status does not claim the key is revoked.

Filed from the 2026-08-05 fail-loud audit (three-agent pre-production sweep; findings verified against code).

`internal/rescue/remotesupport.go:387` and `:409` — both display reads call `_ = e.keys.SweepExpired()`. That sweep is what actually severs a supporter (`internal/rescue/keys.go:208` → `Cut` on mesh + SSH), and the comment at line 385 says the re-poll "is what makes 'auto-revoked at expiry' real" — then discards that mechanism's only failure signal. `StatusAt` (`internal/rescue/keys_ledger.go:76-85`) derives `KeyExpired` purely from the clock, so a failed cut renders "expired, auto-revoked" while live mesh + SSH access persists. (The identity side is a resting refusal in today's whole composition — see the rescue-adapters slice ticket — so this is about the surface being honest once it's real, and about the read not lying meanwhile.) **Acceptance** - A failed sweep is not silent: the status surface distinguishes "expired and severed" from "expired — severing failed, access may persist" (or the read propagates the error). - The three mutating call sites' existing propagation unchanged. - Test: failing `Cut` ⇒ the rendered status does not claim the key is revoked. --- _Filed from the 2026-08-05 fail-loud audit (three-agent pre-production sweep; findings verified against code)._
Author
Owner

The rescue-adapters slice referenced in the body is #306 — in today's whole composition the identity side is a resting refusal, so the sweep always errors; this ticket is about the display read being honest about that, and staying honest once #306 wires the real side.

The rescue-adapters slice referenced in the body is #306 — in today's whole composition the identity side is a resting refusal, so the sweep always errors; this ticket is about the display read being honest about that, and staying honest once #306 wires the real side.
Author
Owner

Fixed in c7ccd18 (on origin/main).

The remote-support display reads (Engagement, EngagementForService) still fire SweepExpired() best-effort, but project now reads the ledger key's own cut stamps: an expired supporter key with neither a hand-revocation (Revoked) nor an auto-revocation (AutoRevoked) stamp was never confirmed cut, so the projected SupporterKeyGrant carries SeveringUnconfirmed: true + note ("expired — severing failed, access may persist") and no revocation stamp. Because the three mutating call sites (grant/revoke/close) propagate their sweep error before reaching project, this state only ever reflects a genuinely unlanded cut — their existing propagation is unchanged.

Dashboard surface: the supporter-key line renders a live warning pill (data-status="supporter-key-severing-unconfirmed") with the note instead of "auto-revoked at expiry".

Tests (red-first): seam internal/rescue/remotesupport_test.go::TestStory19_FailedExpirySweepDoesNotClaimRevoked — a failing Cut ⇒ the rendered status carries no revocation stamp and reads SeveringUnconfirmed; a recovered sweep then cuts for real and clears it. Dashboard dashboard/tests/unit/rescueRemoteSupport.test.ts. go test (rescue, controlapi) + vitest/eslint/vue-tsc green.

Fixed in c7ccd18 (on origin/main). The remote-support display reads (`Engagement`, `EngagementForService`) still fire `SweepExpired()` best-effort, but `project` now reads the ledger key's own cut stamps: an expired supporter key with neither a hand-revocation (`Revoked`) nor an auto-revocation (`AutoRevoked`) stamp was never confirmed cut, so the projected `SupporterKeyGrant` carries `SeveringUnconfirmed: true` + note ("expired — severing failed, access may persist") and no revocation stamp. Because the three mutating call sites (grant/revoke/close) propagate their sweep error before reaching `project`, this state only ever reflects a genuinely unlanded cut — their existing propagation is unchanged. Dashboard surface: the supporter-key line renders a live warning pill (`data-status="supporter-key-severing-unconfirmed"`) with the note instead of "auto-revoked at expiry". Tests (red-first): seam `internal/rescue/remotesupport_test.go::TestStory19_FailedExpirySweepDoesNotClaimRevoked` — a failing `Cut` ⇒ the rendered status carries no revocation stamp and reads `SeveringUnconfirmed`; a recovered sweep then cuts for real and clears it. Dashboard `dashboard/tests/unit/rescueRemoteSupport.test.ts`. go test (rescue, controlapi) + vitest/eslint/vue-tsc green.
ben closed this issue 2026-08-06 02:06:50 +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.

Dependencies

No dependencies set.

Reference
Matou/idss#289
No description provided.