rescue: operator-key-ledger — standing ledger to mint/revoke operator keys #32
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
Reference
Matou/idss#32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
Feature spec: #21 (rescue).
What to build
The standing operator-key ledger (reached from Rescue → Operator keys, surfaced on P8-S7) lets the community see, add, and revoke who can rescue the fleet. It lists every operator key — standing operators and time-boxed supporters alike — with mint date, status and expiry, and lets the operator mint or revoke (ADR 0089).
Minting or revoking is one honest action across both sides: a mint pairs the mesh identity and the SSH side (recipient-set membership + SSH principals, the S13 Q3 model); a revoke cuts both paths together (ADR 0087), so an operator's departure is a single dashboard action. The ledger is also the fix for a lockout: an operator whose key was revoked (the P8-S3x variant-A route) has their access restored from a live control plane — another operator opens the ledger and "restore your access" mints them a fresh operator key. And a members operator-role grant does not mint keys itself — it invokes this ledger's mint (ADR 0089), so one ledger and one revocation discipline serve everywhere, mirroring the enrollment-code ledger's.
This slice reuses enroll's ledger/state-machine family (mint/revoke) and is upstream of remote-support-engagement, share-ceremony, and members' operator-grant. Thin UI over the
rescueorchestrator.Notes: this is a standing ledger surface, consumed by S3x variant-A restore and by members' operator grant.
Acceptance criteria
Blocked by
Task manifest
enrollpackage + in-memory fakeDone — the standing operator-key ledger shipped as a control-plane slice of the
rescueorchestrator (ADR 0089), seam-tested in Go. Commitd5ee070.What landed (
internal/rescue/):keys.go— theKeyringorchestrator:List/Mint/Revoke, plusRestoreAccessandGrantOperator. Lists every operator key — standing operators (KindOperator, no expiry) and time-boxed supporters (KindSupporter, TTL) alike — with mint date, read-time-derived status (active/expired/revoked), and expiry.keys_side.go— theIdentitySideport: one interface with paired verbs so a mint or revoke cannot touch one path and forget the other.keys_ledger.go—OperatorKey(first-class, never deleted),KeyLedger+ JSON-round-trippingMemoryKeyLedger,StatusAtderiving status.keys_fakes.go—FakeIdentitySideholding the mesh recipient set and the SSH principals as separate maps, so a one-sided mint/revoke is caught.keys_test.go— 6 Given/When/Then seam tests.Acceptance criteria:
TestStory21_LedgerListsStandingAndSupporterKeys: lists both a standing operator key and a time-boxed supporter key, each with mint date, status, expiry; mint/revoke offered.TestStory22_MintPairsRevokeCutsBothSides: a mint pairs the mesh recipient-set membership and the SSH principals (S13 Q3); a revoke cuts both together (ADR 0087). (TestRevoke_UnknownAndDoubleRevokeErrorcovers the honesty edges.)TestStory23_RestoreAccessRemintsAfterRevoke: a revoked-out holder is restored when another operator opens the same standing ledger —RestoreAccessmints a fresh key and re-pairs both sides; the revoked key stays for the audit trail.TestStory31_MembersOperatorGrantInvokesMint:GrantOperatoris exactly the ledger's mint (one ledger, one revocation discipline) — the granted key lands in the one ledger and is revocable by the same discipline.Verification:
go test ./internal/rescue/(all pass),go vet,gofmtclean.Out of scope (left to their slices): the thin dashboard UI over this orchestrator; remote-support's engagement lifecycle (auto-revoke at expiry / close-revokes-all — consumes supporter keys minted here); members' operator-grant UI + role machinery; recovery shares / share ceremony. No dedicated operator-key wireframe exists (p8-s7 is the recovery-shares ledger), so this shipped against the manifest's Go seam contract as the interface.
rehearsal-cslug with no pre-rent reservation sweep, andoc_standing_teardownbins the claim secret on a red re-found — the name is now permanently wedged (GOTCHAS #80 / #757) #896rehearsal-cslug wedged, device target has no pre-rent sweep #897rehearsal-e.idss.nzreds "already taken" — the single-sourcedREHEARSAL_SLUGis permanently held by the device target's LIVE standing community #1401rehearsal-e.idss.nzreds "already taken" — the single-sourcedREHEARSAL_SLUGis permanently held by the device target's LIVE standing community #1401rehearsal-e.idss.nzreds "already taken" — the single-sourcedREHEARSAL_SLUGis permanently held by the device target's LIVE standing community #1401