spec: nice-to-have-sweep — S13–S19 from the 2026-07-26 review (rescue, founding, breakglass, backups, app) #147

Closed
opened 2026-07-26 23:02:26 +00:00 by ben · 1 comment
Owner

Parent

Cross-feature sweep over specs #11/#17/#20/#21 — the remaining nice-to-have findings from the 2026-07-26 code-review Spec axis (6596977..9e946b7). Blockers/should-fixes were #110–#123; standards debt is #125–#142; S12 is folded into the durable-attempt-state ticket. Each item below is small and independent; fix each against its origin ticket's spec text.

Items

  • S13 internal/rescue/keys.go:128 (#32): Revoke cuts by holder, not by key — a two-key holder loses the other key's access. Revoke exactly the named key.
  • S14 internal/founding/orchestrator.go:120 (#31/#72): the post-handoff scrub makes Offered() true again, re-offering founding on a machine that already founded — violates ADR 0050. Scrubbed-after-handoff must not look like never-offered.
  • S15 internal/founding/handoff.go:382 (#72): the enrolment token is minted lazily at hand-off read; the spec says it is minted at seeding. Mint at seeding, hand off what was minted.
  • S16 internal/breakglass/tier3.go:564 (#97): the landing asserts "every ceremony step was written to the audit log" but no AuditSink is wired — wire the sink (or make the landing honest about what was recorded).
  • S17 internal/backup/run.go:201 (#88): step labels say "snapshot → replicate → verify" but the actual order is snapshot → verify → replicate. Make labels tell the truth (order is correct; the copy lies).
  • S18 internal/founding/standup.go:486 (#47): switch-Access strands an Approved-never-Enrolled ledger entry and the doc comment misdescribes it. Clean up the abandoned entry (or record it honestly) and fix the comment.
  • S19 scope-creep pruning: internal/backup/pertarget.go:681 (#90) unrequested RemoveTarget — remove or justify against spec; app/src/lib/breakglass.ts:581 synthFailedAction publicly re-implements seam truth UI-side and unconditionally offers beginTier3 (vs #44's gating) — derive from the seam; app/src/lib/founding.ts:902 hard-codes a mirror of brandkit.Presets() — read the seam; founding.ts:1231 own-VPS empty-IP rejection reuses the wrong error copy (#39) — give it its own honest message.

Acceptance criteria

Each checked item: the origin ticket's spec clause holds, with a test where behaviour changed (S13, S14, S15, S16, S18, S19's beginTier3 gating); label/copy fixes (S17, S19 error copy) with the test updated to pin the honest text.

Blocked by

None. Soft note: touches founding/backups/breakglass/rescue seams — if #132 (fakes→testing-seam) lands mid-flight, rebase on it.

Task manifest

task: spec:nice-to-have-sweep
implements_flow: cross-feature (p1, p7, p8 seam truths)
implements_edge: "none new — existing clauses made true"
wireframe: none — seam- and copy-level fidelity
interface: "no new faces; behaviour corrections behind existing seams"
seam: "one test per behaviour change, pinned copy for label fixes"
acceptance: "S13–S19 origin clauses hold as written"
depends_on: []
out_of_scope: [S12 (updates:durable-attempt-state ticket), standards debt (#125–#142), new features]
needs_human_decision: []
## Parent Cross-feature sweep over specs #11/#17/#20/#21 — the remaining nice-to-have findings from the 2026-07-26 code-review Spec axis (`6596977..9e946b7`). Blockers/should-fixes were #110–#123; standards debt is #125–#142; S12 is folded into the durable-attempt-state ticket. Each item below is small and independent; fix each against its origin ticket's spec text. ## Items - [ ] **S13** `internal/rescue/keys.go:128` (#32): `Revoke` cuts by holder, not by key — a two-key holder loses the other key's access. Revoke exactly the named key. - [ ] **S14** `internal/founding/orchestrator.go:120` (#31/#72): the post-handoff scrub makes `Offered()` true again, re-offering founding on a machine that already founded — violates ADR 0050. Scrubbed-after-handoff must not look like never-offered. - [ ] **S15** `internal/founding/handoff.go:382` (#72): the enrolment token is minted lazily at hand-off read; the spec says it is minted at seeding. Mint at seeding, hand off what was minted. - [ ] **S16** `internal/breakglass/tier3.go:564` (#97): the landing asserts "every ceremony step was written to the audit log" but no `AuditSink` is wired — wire the sink (or make the landing honest about what was recorded). - [ ] **S17** `internal/backup/run.go:201` (#88): step labels say "snapshot → replicate → verify" but the actual order is snapshot → verify → replicate. Make labels tell the truth (order is correct; the copy lies). - [ ] **S18** `internal/founding/standup.go:486` (#47): switch-Access strands an `Approved`-never-`Enrolled` ledger entry and the doc comment misdescribes it. Clean up the abandoned entry (or record it honestly) and fix the comment. - [ ] **S19** scope-creep pruning: `internal/backup/pertarget.go:681` (#90) unrequested `RemoveTarget` — remove or justify against spec; `app/src/lib/breakglass.ts:581` `synthFailedAction` publicly re-implements seam truth UI-side and unconditionally offers `beginTier3` (vs #44's gating) — derive from the seam; `app/src/lib/founding.ts:902` hard-codes a mirror of `brandkit.Presets()` — read the seam; `founding.ts:1231` own-VPS empty-IP rejection reuses the wrong error copy (#39) — give it its own honest message. ## Acceptance criteria Each checked item: the origin ticket's spec clause holds, with a test where behaviour changed (S13, S14, S15, S16, S18, S19's beginTier3 gating); label/copy fixes (S17, S19 error copy) with the test updated to pin the honest text. ## Blocked by None. Soft note: touches founding/backups/breakglass/rescue seams — if #132 (fakes→testing-seam) lands mid-flight, rebase on it. ## Task manifest ```yaml task: spec:nice-to-have-sweep implements_flow: cross-feature (p1, p7, p8 seam truths) implements_edge: "none new — existing clauses made true" wireframe: none — seam- and copy-level fidelity interface: "no new faces; behaviour corrections behind existing seams" seam: "one test per behaviour change, pinned copy for label fixes" acceptance: "S13–S19 origin clauses hold as written" depends_on: [] out_of_scope: [S12 (updates:durable-attempt-state ticket), standards debt (#125–#142), new features] needs_human_decision: [] ```
Author
Owner

Done in c66cfda (on origin/main). Each S13–S19 clause fixed against its origin ticket, with a test where behaviour changed:

  • S13 rescue keys.go: Revoke now cuts exactly the named key — a two-key holder keeps access via re-pairing the union of their remaining active keys; both sides cut only on the last active key. (TestRevoke_CutsNamedKeyNotHolder)
  • S14 founding orchestrator.go: a sticky founded latch (set on create + hand-off completion) keeps Offered/Begin honest after the scrub deletes the state file (ADR 0044/0050) — a scrubbed machine no longer re-offers founding. (TestScrub_DoesNotReofferFounding)
  • S15 founding seed.go/handoff.go: the credential-enrolment token is minted at seeding (ADR 0046), held in memory only (ADR 0051), and the passkey step registers with what was minted (re-minting only on expiry/restart-loss). (TestStory27_TokenMintedAtSeedingNotAtHandOff)
  • S16 breakglass tier3.go: the rebuilt landing now writes the ceremony's stand-up steps through the existing Applier.Audit sink (ActionTier3Rebuild) and states the write honestly (AuditLogged) — no claim without a sink. (TestRebuild_WritesCeremonyStepsToAuditLog)
  • S17 backup pertarget.go/run.go + the p7-s3x wireframe: step labels now read snapshot → verify → replicate (the run verifies the snapshot before replicating); pinned in pertarget_test.go.
  • S18 founding standup.go + enroll ledger: new enroll.Ledger.Abandon closes an approved-but-never-enrolled request honestly when switch-Access abandons it after a reachability/deploy failure (spent code stays spent); the spec-gate-fail edge still resumes on the same code. Comment corrected; the two strand-asserting tests updated; TestAbandon_ClosesApprovedRequest added.
  • S19 scope-creep: RemoveTarget justified — it is the p7-s2x wireframe's data-action="remove-target" affordance (dashboard-wired) — and given a Go test; synthFailedAction forks now derive from one seamFailedActionForks rule; the wizard's brand-preset swatches read the seam over a new brand-presets op (brandkit.PresetSwatches()) instead of a hard-coded palette mirror; the own-VPS empty-IP rejection gets its own honest message.

Note on S19's beginTier3 gating: the premise ('unconditionally offers beginTier3 vs #44's gating') is contradicted by the binding contract — DDR 0088 §6 and p8-s4x-action-failed.html both offer begin-tier3 on every failed break-glass action (the escalation door is never a dead end), and the Go seam's failedAction sets it unconditionally too. So no gate was added; instead the fake's forks now derive from a single documented seamFailedActionForks rule (pinned by test) so the fake can't drift from the seam.

Verify: app suite green (214), eslint + vue-tsc clean. Go build+test runs in the seam CI.

Done in c66cfda (on origin/main). Each S13–S19 clause fixed against its origin ticket, with a test where behaviour changed: - **S13** rescue `keys.go`: `Revoke` now cuts exactly the named key — a two-key holder keeps access via re-pairing the union of their remaining active keys; both sides cut only on the last active key. (`TestRevoke_CutsNamedKeyNotHolder`) - **S14** founding `orchestrator.go`: a sticky `founded` latch (set on create + hand-off completion) keeps `Offered`/`Begin` honest after the scrub deletes the state file (ADR 0044/0050) — a scrubbed machine no longer re-offers founding. (`TestScrub_DoesNotReofferFounding`) - **S15** founding `seed.go`/`handoff.go`: the credential-enrolment token is minted at **seeding** (ADR 0046), held in memory only (ADR 0051), and the passkey step registers with what was minted (re-minting only on expiry/restart-loss). (`TestStory27_TokenMintedAtSeedingNotAtHandOff`) - **S16** breakglass `tier3.go`: the rebuilt landing now writes the ceremony's stand-up steps through the existing `Applier.Audit` sink (`ActionTier3Rebuild`) and states the write honestly (`AuditLogged`) — no claim without a sink. (`TestRebuild_WritesCeremonyStepsToAuditLog`) - **S17** backup `pertarget.go`/`run.go` + the p7-s3x wireframe: step labels now read `snapshot → verify → replicate` (the run verifies the snapshot before replicating); pinned in `pertarget_test.go`. - **S18** founding `standup.go` + `enroll` ledger: new `enroll.Ledger.Abandon` closes an approved-but-never-enrolled request honestly when switch-Access abandons it after a reachability/deploy failure (spent code stays spent); the spec-gate-fail edge still resumes on the same code. Comment corrected; the two strand-asserting tests updated; `TestAbandon_ClosesApprovedRequest` added. - **S19** scope-creep: `RemoveTarget` **justified** — it is the p7-s2x wireframe's `data-action="remove-target"` affordance (dashboard-wired) — and given a Go test; `synthFailedAction` forks now derive from one `seamFailedActionForks` rule; the wizard's brand-preset swatches **read the seam** over a new `brand-presets` op (`brandkit.PresetSwatches()`) instead of a hard-coded palette mirror; the own-VPS empty-IP rejection gets its own honest message. **Note on S19's beginTier3 gating:** the premise ('unconditionally offers beginTier3 vs #44's gating') is contradicted by the binding contract — DDR 0088 §6 and `p8-s4x-action-failed.html` both offer `begin-tier3` on every failed break-glass action (the escalation door is never a dead end), and the Go seam's `failedAction` sets it unconditionally too. So no gate was added; instead the fake's forks now derive from a single documented `seamFailedActionForks` rule (pinned by test) so the fake can't drift from the seam. Verify: app suite green (214), eslint + vue-tsc clean. Go build+test runs in the seam CI.
ben closed this issue 2026-07-27 07:02:46 +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#147
No description provided.