grant-operator: the operator grant's rescue key mint is unwired on a real gateway — restingIdentitySide.Pair fails loud, so the ledger flips to operator but no key, no audit and no door fan-out land #1570
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
2 participants
Notifications
Due date
No due date set.
Reference
Matou/idss#1570
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?
The failure
Drive
20260917T150409Z(roles proof, targetrented-services) ran 28 legs green and red at leg 29grant-operatorafter 70 s (artifacts/legs.json,artifacts/verdict.jsonfirstRedLeg), commit1d46b7fb:This is the FIRST drive to actually click the grant. The two prior reds on this signature (
182edfd1cc0f) never got that far:34172059fixed the missing precondition (the member was never activated, socan_grantwas withheld and the button never rendered) and61d8d507fixed the empty access matrix. Both of those heals worked — the trace shows[data-action="grant-operator"]visible and clicked at trace-time 883424 (app/tests/e2e/fixtures/panelMembers.ts:122-127). The leg has advanced to a NEW, deeper fault.The evidence — the grant reached the seam and tore in half
The droplet was kept (
REHEARSAL_KEEP_RED_DROPLET,209.38.25.217). Its state is unambiguous:members.jsonnow reads:…but
member-audit.jsonends ataudit-4(15:42:16, the by-hand create's reconcile). There is nogranted the operator roleaudit line, andlogs/droplet-journal.txthas NOT ONE entry between the panel's detail read at 15:42:25 (GET /v1/person/proof-operator) and the harvest ssh at 15:43:32 — no kanidm group write, no control-plane line. Re-confirmed live on the box withjournalctl --since 15:42:20 --until 15:43:35.Walk
internal/member/roles.go:84-118against those three facts:roles.go:102-105—ls.Members[i].Role = RoleOperator; o.ledger.Save(ls)→ this is the 15:42:25.375 write.roles.go:107-109—if err := o.rescue.GrantOperatorKey(personID); err != nil { return err }→ returned here.roles.go:110Audit(…, "granted the operator role …")→ never ran (no audit line).roles.go:117ReconcileRoles→ never ran (no kanidm traffic).The defect
memberRescue.GrantOperatorKey(control-plane/cmd/control-plane/compose.go:105-115) →rescue.Keyring.GrantOperator(internal/rescue/keys.go:236) →Keyring.Mint(internal/rescue/keys.go:69-107), whose first act is:(
internal/rescue/keys.go:84-87)The injected
sideisrestingIdentitySide{}— the fail-loud stub:(
control-plane/cmd/control-plane/rescue_surfaces.go:90-93;errRescueEngineUnwired = errors.New("the rescue engine is not wired yet")atrescue_surfaces.go:43)And it is injected by both compositions — the resting root AND the whole (founded-gateway) root:
control-plane/cmd/control-plane/whole_composition.go:295—keyring := rescue.NewKeyring(keyLedger, restingIdentitySide{}, clock)control-plane/cmd/control-plane/resting_composition.go:444— sameA repo-wide search for a non-test
IdentitySideturns up exactly two implementations: this stub andinternal/rescue/testing/keys_fakes.go:33-45. There is no production mesh+SSH identity side.docs/status-archive.md:14439names it as deliberately deferred — "every write that reaches an unwired rescue engine adapter (the live-fleet var store, the mesh+SSH identity side, the durable share/key ledgers — the engine-adapters arc) fails loud (ADR 0100 / #132)", with "the rescue engine adapters arc" listed as an explicit follow-up.So: members' P6-S4 operator grant (ADR 0089, spec #1535/#1547) can never succeed on a real founded community. Every grant fails at the mint. The drive did its job and found it.
Second, separable defect — the torn write
GrantOperatorsaves the ledger role BEFORE the mint is known to have succeeded (roles.go:102-105then:107). When the mint fails, the community is left in a state that no surface can explain and no retry repairs:"role": "operator"(proven above, live on the box),roles.go:96-97if ls.Members[i].Role == RoleOperator { return nil }— the idempotent early return now reports success for a grant that never completed. The next click would return 204 and the OPERATOR line would flip tooperatoron a member holding no key and admin nowhere. That is worse than the current red.Compare
Mint's own stated discipline (internal/rescue/keys.go:65-68): "If the identity side fails, nothing is recorded — the ledger never claims a key the mesh + SSH sides do not back."GrantOperatordoes not hold that line for the members ledger.Third — why the UI showed nothing move
MemberDetailScreen.vue:382-387:A throwing verb skips
load(), soviewstays the pre-grant read anddata-status(MemberDetailScreen.vue:83) holdsordinary-member— which is why the locator resolved 123× to the stale span.useAsyncGuarddoes render the failure (issue #304), so an operator would see the error; the leg's assertion is on the OPERATOR line, which correctly refused to lie. This part is working as designed — do not "fix" it.Suspected layer
The rescue engine-adapters arc — specifically the unbuilt production
rescue.IdentitySide(the mesh recipient-set membership + SSH principals pairing, ADR 0087/0089) — plus the write-ordering defect ininternal/member/roles.go:102-109.Why this was refused in-lane (refusal rule 3 — design / one-way door)
The only fix that turns this leg green is to give
rescue.Keyringa realIdentitySideon a founded gateway. That is a security-posture decision, not a mechanical repair: it settles what a standing operator key actually pairs (which mesh recipient set, which SSH principals file, on which nodes), where that material is written, and how it is cut — the material a break-glass path depends on (ADR 0087). It is also plainly over the rule-2 cap (a new adapter, its wiring in both composition roots, and its tests). A healer must not invent that posture in-lane, and the alternative — relaxing the leg's assertion — is refusal rule 1.A ruling is needed before a swarm worker can act. The options, as I read them:
IdentitySidein the rescue engine-adapters arc, wired intocomposeWhole(and left resting incomposeResting). The honest fix; needs the posture ruled.Independently actionable, whatever the ruling (mechanical, small)
The torn write should be repaired regardless, and does not depend on the ruling: move the mint (
roles.go:107) above the role assignment +ledger.Save(roles.go:102-105), so a failed mint leaves the member an ordinary member and the retry atroles.go:96-97stays honest.internal/memberhas the seam coverage to pin it red-first (FakeRescue.GrantOperatorKey,internal/member/removal.go:793-797, is already failable). Note this alone will NOT green the leg — the grant still fails at the mint — so it must not be shipped as the fix for this red.Reproduce
The kept box at
209.38.25.217still carries the torn state (/var/lib/idss/members.jsonvs/var/lib/idss/member-audit.json) until the broker TTL reaps it. In-repo, anymember.Orchestrator.GrantOperatorcomposed againstrestingIdentitySide{}reproduces it without a droplet.advances #1547.
drive
20260917T150409Zred atgrant-operator:the OPERATOR line never flipped to operator after the grant expect(locator).toHaveAttribute(expected) failed Locator: locator('[data-field="operator-note"]') Expected: "operator" Received: "ordinary-mevidence:
/home/dev/swarm/Matou/idss/test-results/drive-rented-services/20260917T150409Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedRuled by agent under ADR 0174 — veto anytime. Session on
matou-workstation(standing-session drainer, ADR 0174). This ticket splits cleanly into a two-way half (landed) and a one-way-door half (routed to Ben) — the split the report itself proposed.Landed — the torn write (two-way door, revertible + provable)
Commit
954dda7eonmain.member.GrantOperator(internal/member/roles.go) savedrole: operatorto the ledger beforerescue.GrantOperatorKeywas known to succeed. When the mint fails loud on a real gateway, that left the community exactly as harvested off209.38.25.217: the ledger claimingoperator, no key, no audit line, no door fan-out — and the idempotent early return (roles.go:96-97) then reported that phantom as a success on retry (204, OPERATOR line flips on a member holding no key — worse than the red).Fix: reorder so the mint runs first and the role is written only once the key is minted — mirroring
rescue.Keyring.Mint's own discipline ("the ledger never claims a key the mesh + SSH sides do not back"). A failed mint now leaves the member an ordinary member and the retry stays honest.TestGrantOperator_MintFailsLoud_NoTornWrite(internal/member/komiti_test.go), via a newFakeRescue.FailGranthook. Confirmed RED on the old ordering (role readoperator, retry returnednil), GREEN after the reorder. Fullinternal/membersuite green;go build ./...+go vetclean.STATUS.mdupdated in the same commit.Why human
The leg's real block is a security-posture one-way door (ADR 0174 §3 — a security-posture widening / new material a break-glass path depends on), over the rule-2 cap, and cannot be ruled in-lane:
There is no production
rescue.IdentitySideon a founded gateway — both composition roots injectrestingIdentitySide{}, whosePair/Cutfail loud (errRescueEngineUnwired). Somember.GrantOperator→rescue.Keyring.Mint→restingIdentitySide.Pairtears every real operator grant in half. The engine-adapters arc is deliberately deferred (docs/status-archive.md:14439, ADR 0100/#132).Building the real side settles which mesh recipient set, which SSH principals file, on which nodes a standing operator key pairs, where that material is written, and how it is cut — the material a break-glass path depends on (ADR 0087/0089). That is a posture decision, not a mechanical repair; a healer must not invent it.
Proposed default rulings (ADR 0174 §4 — for a session or Ben to adopt):
IdentitySidein the rescue engine-adapters arc (mesh recipient-set membership + SSH principals pairing), wired intocomposeWhole, left resting incomposeResting, with its tests. The honest fix; needs the posture ruled.Relabelled
ready-for-session→ready-for-human(droppedagent-working).advances #1547/#1570.Ruled by Ben (in session, 2026-09-17): option 3. Landed as
deaef925+ ADR 0249.On a gateway whose key engine is unwired, the grant now LANDS:
role: operator+operator_key_outstandingin the ledger, an audit line and a detail note that say the standing operator key is OUTSTANDING and the operator holds no break-glass access, and the spec #1535 door fan-out runs.member.ErrOperatorKeyUnavailableis the ONE mint answerGrantOperatordoes not veto on — the control plane's rescue adapter returns it when the mint reachesrestingIdentitySide; every other mint error still refuses the grant whole (954dda7e's test unchanged). A repeat grant retries the mint and clears the mark once it mints; a revoke clears it with the role.Seam proof:
TestGrantOperator_KeyEngineUnwired_GrantLandsKeyOutstanding. The realIdentitySide(options 1/2) and the settle sweep are owed by #1572. The #1547 drive re-fires from the armed cron queue to re-prove the leg live; closing this so the blocker lifts.