rescue: breakglass-variant-honesty — key-absent is not "no replica" (#44) #120

Closed
opened 2026-07-26 19:41:11 +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). Should-fix: internal/breakglass/material.go:204 falls through to VariantNoReplica when the real fault is key-absent (replica present, no valid peer key) — a dishonest state versus #44 story 37's honest-state requirement, and the combination is untested.

Acceptance criteria

  • Given a present replica with no valid peer key, then break-glass shows the key-absent honest state (what exists, what is missing, what that means) — never "no replica".
  • The replica-present/key-absent combination is tested.

Blocked by

None.

Task manifest

task: rescue:breakglass-variant-honesty
implements_flow: p8-rescue
implements_edge: "S3x honest-state variant selection"
wireframe: docs/ux/wireframes/p8-rescue/p8-s3x-no-usable-tier1-material.html
interface: "variant selection fix in internal/breakglass material (distinct key-absent state)"
seam: "Go test for replica-present/key-absent; app S3x renders the distinct state from seam data"
acceptance: "#44 story 37's honest-state clause holds for the key-absent case (see Acceptance criteria above)"
depends_on: []
out_of_scope: [tier-3 ceremony (built), action ladder (built)]
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`). Should-fix: `internal/breakglass/material.go:204` falls through to `VariantNoReplica` when the real fault is key-absent (replica present, no valid peer key) — a dishonest state versus #44 story 37's honest-state requirement, and the combination is untested. ## Acceptance criteria - [ ] Given a present replica with no valid peer key, then break-glass shows the key-absent honest state (what exists, what is missing, what that means) — never "no replica". - [ ] The replica-present/key-absent combination is tested. ## Blocked by None. ## Task manifest ```yaml task: rescue:breakglass-variant-honesty implements_flow: p8-rescue implements_edge: "S3x honest-state variant selection" wireframe: docs/ux/wireframes/p8-rescue/p8-s3x-no-usable-tier1-material.html interface: "variant selection fix in internal/breakglass material (distinct key-absent state)" seam: "Go test for replica-present/key-absent; app S3x renders the distinct state from seam data" acceptance: "#44 story 37's honest-state clause holds for the key-absent case (see Acceptance criteria above)" depends_on: [] out_of_scope: [tier-3 ceremony (built), action ladder (built)] needs_human_decision: [] ```
Author
Owner

Done in 590a05d (on origin/main).

Fix: internal/breakglass/material.go Material now selects a distinct VariantKeyAbsent whenever the operator key is absent while the config replica is present — a new laptop that synced the repo but was never granted a key. The honest state names what exists (the replica), what is missing (the operator key), and who can act (another operator holding a valid key + the operator-key ledger grant), and withholds Clone (the replica is already here). The no-replica branch is untouched when the replica is genuinely absent (fresh-install-no-replica stays variant B).

AC1 (present replica, no valid peer key → key-absent honest state, never "no replica"): the branch fires on key.State == KeyAbsent && replicaHere; the headline names the missing operator key and never says "no replica". App renders it at data-status="key-absent" in NoTier1MaterialScreen.vue; the P8-S3x wireframe now draws the fourth frame (rule 2b, the binding contract).

AC2 (combination tested): TestMaterialKeyAbsentReplicaHereIsKeyAbsentNotNoReplica and TestMaterialKeyAbsentReplicaHereNoValidPeerKey (internal/breakglass/material_test.go); component tests in app/tests/unit/noTier1MaterialScreen.test.ts assert the honest state, absence of "no replica"/Clone, and Check-again → Situation on regained material.

Verification: go test ./internal/breakglass green; app vitest 197 passed; vue-tsc clean; eslint 0.

Done in 590a05d (on origin/main). **Fix:** `internal/breakglass/material.go` `Material` now selects a distinct `VariantKeyAbsent` whenever the operator key is absent while the config replica is present — a new laptop that synced the repo but was never granted a key. The honest state names what exists (the replica), what is missing (the operator key), and who can act (another operator holding a valid key + the operator-key ledger grant), and withholds Clone (the replica is already here). The `no-replica` branch is untouched when the replica is genuinely absent (fresh-install-no-replica stays variant B). **AC1** (present replica, no valid peer key → key-absent honest state, never "no replica"): the branch fires on `key.State == KeyAbsent && replicaHere`; the headline names the missing operator key and never says "no replica". App renders it at `data-status="key-absent"` in `NoTier1MaterialScreen.vue`; the P8-S3x wireframe now draws the fourth frame (rule 2b, the binding contract). **AC2** (combination tested): `TestMaterialKeyAbsentReplicaHereIsKeyAbsentNotNoReplica` and `TestMaterialKeyAbsentReplicaHereNoValidPeerKey` (`internal/breakglass/material_test.go`); component tests in `app/tests/unit/noTier1MaterialScreen.test.ts` assert the honest state, absence of "no replica"/Clone, and Check-again → Situation on regained material. **Verification:** `go test ./internal/breakglass` green; app vitest 197 passed; vue-tsc clean; eslint 0.
ben closed this issue 2026-07-26 20:14:19 +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#120
No description provided.