rescue: supporter-expiry-revocation — expiry actually cuts mesh + SSH together (#98) #111

Closed
opened 2026-07-26 19:40:49 +00:00 by ben · 1 comment
Owner

Parent

Feature spec: #21 (rescue). Follow-up filed by the 2026-07-26 review sweep (code-review Standards/Spec + design-verify Design axes over 6596977..9e946b7). Blocker: supporter-key expiry is display-only — internal/rescue/remotesupport.go:331 Close only revokes keys still KeyActive; nothing revokes at expiry, so an "auto-revoked" supporter keeps both mesh and SSH access while the ledger claims "nothing remained granted".

What to fix

Make expiry real: at the expiry time the supporter's key is revoked on both the mesh and SSH sides together, and the ledger reflects it truthfully — #98's "auto-revoked at expiry … cutting the mesh and SSH sides together". TestStory20_CloseAfterAutoRevokeResolvesAlert must actually assert the cut. Dashboard side: RemoteSupportScreen.vue renders expiry once from a static expiresInSeconds — make the countdown live (ticker/re-poll) so expiry is reflected without a manual reload.

Acceptance criteria

  • Given a supporter grant that reaches its expiry, then the key is revoked at expiry with mesh and SSH cut together, and a test asserts both cuts (not just the ledger text).
  • Given an operator closing an engagement after a grant expired mid-engagement, then "nothing remained granted" is true in fact, not only in the ledger copy.
  • Given the Remote-support screen with an active grant, then the remaining-time display counts down and the screen reflects expiry/revocation without a manual reload.

Blocked by

None.

Task manifest

task: rescue:supporter-expiry-revocation
implements_flow: p8-rescue
implements_edge: "S6 grant-expiry → revoked (mesh + SSH), reflected on S6"
wireframe: docs/ux/wireframes/p8-rescue/p8-s6-remote-support.html
interface: "expiry-time revocation in internal/rescue remote-support (mesh + SSH cut together) + a live countdown/refresh on the dashboard Remote-support screen"
seam: "Go tests asserting both access paths are cut at expiry; component test asserting the screen reflects expiry without reload"
acceptance: "#98's auto-revocation clauses become true end-to-end (see Acceptance criteria above)"
depends_on: []
out_of_scope: [new grant flows, engagement-email content (#98 ruling stands)]
needs_human_decision: []
## Parent Feature spec: #21 (rescue). Follow-up filed by the 2026-07-26 review sweep (code-review Standards/Spec + design-verify Design axes over `6596977..9e946b7`). Blocker: supporter-key expiry is display-only — `internal/rescue/remotesupport.go:331` `Close` only revokes keys still `KeyActive`; nothing revokes at expiry, so an "auto-revoked" supporter keeps both mesh and SSH access while the ledger claims "nothing remained granted". ## What to fix Make expiry real: at the expiry time the supporter's key is revoked on both the mesh and SSH sides together, and the ledger reflects it truthfully — #98's "auto-revoked at expiry … cutting the mesh and SSH sides together". `TestStory20_CloseAfterAutoRevokeResolvesAlert` must actually assert the cut. Dashboard side: `RemoteSupportScreen.vue` renders expiry once from a static `expiresInSeconds` — make the countdown live (ticker/re-poll) so expiry is reflected without a manual reload. ## Acceptance criteria - [ ] Given a supporter grant that reaches its expiry, then the key is revoked at expiry with mesh and SSH cut together, and a test asserts both cuts (not just the ledger text). - [ ] Given an operator closing an engagement after a grant expired mid-engagement, then "nothing remained granted" is true in fact, not only in the ledger copy. - [ ] Given the Remote-support screen with an active grant, then the remaining-time display counts down and the screen reflects expiry/revocation without a manual reload. ## Blocked by None. ## Task manifest ```yaml task: rescue:supporter-expiry-revocation implements_flow: p8-rescue implements_edge: "S6 grant-expiry → revoked (mesh + SSH), reflected on S6" wireframe: docs/ux/wireframes/p8-rescue/p8-s6-remote-support.html interface: "expiry-time revocation in internal/rescue remote-support (mesh + SSH cut together) + a live countdown/refresh on the dashboard Remote-support screen" seam: "Go tests asserting both access paths are cut at expiry; component test asserting the screen reflects expiry without reload" acceptance: "#98's auto-revocation clauses become true end-to-end (see Acceptance criteria above)" depends_on: [] out_of_scope: [new grant flows, engagement-email content (#98 ruling stands)] needs_human_decision: [] ```
Author
Owner

Done in c1e158d (on origin/main).

Expiry now cuts for real. The blocker was that internal/rescue/remotesupport.go Close only revoked keys still KeyActive, and nothing ever called IdentitySide.Cut at expiry — StatusAt derived KeyExpired from the clock while the mesh recipient-set membership and the SSH principals stayed paired. An auto-revoked supporter kept both paths.

  • Seam: new Keyring.SweepExpired (internal/rescue/keys.go) cuts both sides together (ADR 0087) the moment a time-boxed key is observed past its expiry, stamping the new idempotent OperatorKey.AutoRevoked at the expiry moment (status stays KeyExpired). Engagements reconciles on every read (Engagement/EngagementForService — the dashboard re-poll makes expiry real with no background timer) and every action (GrantSupporterKey/RevokeSupporterKey/Close, error-propagating), so Closes "nothing remained granted" is true in fact.
  • Tests assert both cuts, not the ledger text: TestStory19_SupporterKeyCountsDownAndAutoRevokes checks the mesh + SSH sides are dropped after expiry; TestStory20_CloseAfterAutoRevokeResolvesAlert asserts the supporter is no longer paired and the revocation copy is honest.
  • Dashboard (P8-S6): RemoteSupportScreen.vue counts expiresInSeconds down with a per-second ticker and emits refresh at zero; RemoteSupportSurface.vue re-reads the engagement by id, so the auto-revocation shows without a manual reload. New fake-timer component test in rescueRemoteSupport.test.ts proves the live countdown (03→02→01) and the expiry re-read.

All three acceptance clauses satisfied. go test ./internal/rescue/ and the full dashboard vitest suite (433 tests) pass; the changed files lint clean.

St(out of scope): the one existingpnpm linterror is indashboard/src/components/provisioning/UpdatesSurface.vue` from #112 (commit 0ac036f), untouched by this slice.

Done in `c1e158d` (on `origin/main`). **Expiry now cuts for real.** The blocker was that `internal/rescue/remotesupport.go` `Close` only revoked keys still `KeyActive`, and nothing ever called `IdentitySide.Cut` at expiry — `StatusAt` derived `KeyExpired` from the clock while the mesh recipient-set membership and the SSH principals stayed paired. An auto-revoked supporter kept both paths. - **Seam:** new `Keyring.SweepExpired` (`internal/rescue/keys.go`) cuts both sides together (ADR 0087) the moment a time-boxed key is observed past its expiry, stamping the new idempotent `OperatorKey.AutoRevoked` at the expiry moment (status stays `KeyExpired`). `Engagements` reconciles on every read (`Engagement`/`EngagementForService` — the dashboard re-poll makes expiry real with no background timer) and every action (`GrantSupporterKey`/`RevokeSupporterKey`/`Close`, error-propagating), so `Close`s "nothing remained granted" is true **in fact**. - **Tests assert both cuts, not the ledger text:** `TestStory19_SupporterKeyCountsDownAndAutoRevokes` checks the mesh + SSH sides are dropped after expiry; `TestStory20_CloseAfterAutoRevokeResolvesAlert` asserts the supporter is no longer paired and the revocation copy is honest. - **Dashboard (P8-S6):** `RemoteSupportScreen.vue` counts `expiresInSeconds` down with a per-second ticker and emits `refresh` at zero; `RemoteSupportSurface.vue` re-reads the engagement by id, so the auto-revocation shows without a manual reload. New fake-timer component test in `rescueRemoteSupport.test.ts` proves the live countdown (03→02→01) and the expiry re-read. All three acceptance clauses satisfied. `go test ./internal/rescue/` and the full dashboard vitest suite (433 tests) pass; the changed files lint clean. St` (out of scope): the one existing `pnpm lint` error is in `dashboard/src/components/provisioning/UpdatesSurface.vue` from #112 (commit 0ac036f), untouched by this slice.
ben closed this issue 2026-07-26 22:12:49 +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#111
No description provided.