M0: Provisioning failure alert & retry UX (S2.1) #48

Closed
opened 2026-09-03 18:35:32 +02:00 by AlexKucera · 1 comment
Owner

Parent

#13 (wayfinder map — read its Decisions so far, then each linked ticket's resolution comment)

What to build

The failure path of S2.1 provisioning, fully specified by map #13 — no decisions remain. When the provisioning pass fails (profile create error, copy error, missing payload manifest entry), Museion shows a separate, phase-named alert — the gate never re-opens. Retry re-runs the whole idempotent pass; Not Now defers to the next launch's silent retry. Builds on the success-path pass from #47.

Spec sources:

• #45 — provisioning runs on every gate pass, idempotently (dir-check first; spawn only when something's missing). One alert, phase-named copy ("couldn't set up the writing profile" / "couldn't copy the writing skills"), excerpt behind Technical details (create errors on stdout per #43, copy on stderr). Actions: Retry (re-runs the whole pass — idempotence makes resume pointless) + Not Now (next launch retries silently). state.json stays schemaVersion 1 engine-gate-only; at most one os_log line per failure
• #44 — provisioning writes nothing to the profile config: never writes mcp_servers, no stub, no entry, even after #23 exists. #23 fires hermes mcp add museion-tools itself once the mode actually serves. Negative invariant: no museion-tools entry under mcp_servers after provisioning
• Map Notes — failure posture inherited from #41: provisioning failure = separate alert + retry, never re-raises the gate

Acceptance criteria

  • Failure shows one phase-named alert; the gate never re-raises
  • Retry re-runs the full pass idempotently; Not Now → next launch retries silently
  • Technical details disclosure shows the error excerpt (create errors from stdout, copy errors from stderr)
  • Never writes mcp_servers — negative invariant test: no museion-tools entry after provisioning
  • Missing-payload manifest entry routes into the copy-error alert path
  • state.json stays schemaVersion 1, engine-gate-only; at most one os_log line per failure

Blocked by

  • #47 — M0: Implement provisioning pass — create museion profile & seed writing skills (S2.1)

[Generated by AI]

## Parent #13 (wayfinder map — read its Decisions so far, then each linked ticket's resolution comment) ## What to build The failure path of S2.1 provisioning, fully specified by map #13 — no decisions remain. When the provisioning pass fails (profile create error, copy error, missing payload manifest entry), Museion shows a separate, phase-named alert — the gate never re-opens. Retry re-runs the whole idempotent pass; Not Now defers to the next launch's silent retry. Builds on the success-path pass from #47. Spec sources: • #45 — provisioning runs on every gate pass, idempotently (dir-check first; spawn only when something's missing). One alert, phase-named copy ("couldn't set up the writing profile" / "couldn't copy the writing skills"), excerpt behind Technical details (create errors on stdout per #43, copy on stderr). Actions: Retry (re-runs the whole pass — idempotence makes resume pointless) + Not Now (next launch retries silently). state.json stays schemaVersion 1 engine-gate-only; at most one os_log line per failure • #44 — provisioning writes **nothing** to the profile config: never writes mcp_servers, no stub, no entry, even after #23 exists. #23 fires hermes mcp add museion-tools itself once the mode actually serves. Negative invariant: no museion-tools entry under mcp_servers after provisioning • Map Notes — failure posture inherited from #41: provisioning failure = separate alert + retry, never re-raises the gate ## Acceptance criteria - [ ] Failure shows one phase-named alert; the gate never re-raises - [ ] Retry re-runs the full pass idempotently; Not Now → next launch retries silently - [ ] Technical details disclosure shows the error excerpt (create errors from stdout, copy errors from stderr) - [ ] Never writes mcp_servers — negative invariant test: no museion-tools entry after provisioning - [ ] Missing-payload manifest entry routes into the copy-error alert path - [ ] state.json stays schemaVersion 1, engine-gate-only; at most one os_log line per failure ## Blocked by - #47 — M0: Implement provisioning pass — create museion profile & seed writing skills (S2.1) [Generated by AI]
AlexKucera added the ready-for-agent label 2026-09-03 18:35:32 +02:00
Author
Owner

Resolution

Landed in c0b2cb0 — build + full suite green: 30/30 test cases, xcodebuild test exit 0 (12 gate + 17 provisioning + 1 UI), SwiftFormat/SwiftLint clean.

Acceptance criteria

  • Failure shows one phase-named alert; the gate never re-raises — ProvisioningFailureCard on its own sheet, gated on hasFailure && gateDismissed; no code path from provisioning failure back to the gate
  • Retry re-runs the full pass idempotently; Not Now → next launch retries silently — deferFailure(); test-pinned (defer + re-fail)
  • Technical details shows the error excerpt (create from stdout per #43, stderr fallback — tested both)
  • Never writes mcp_servers — config.yaml byte-identity through failed + successful passes AND fresh-profile no-config tests
  • Missing-payload manifest entry routes into the copy-error alert path — .failed(phase: .copy), test-pinned
  • state.json stays schemaVersion 1 engine-gate-only; at most one os_log line per failure — logFailure, test-pinned

Hardening from the review fanout: manifest entries validated kebab-case at the trust boundary (traversal-shaped entry fails the copy phase instead of escaping the skills dir); orphaned temp dirs from interrupted copies swept at pass start; deleted the unreachable firstAvailableBinary() fallback; Retry-success no longer blanks the card mid-dismiss (snapshot in view state); failure sheet presents only after the gate sheet's dismissal completes (no dropped-sheet race).

Full detail: docs/devlog/20260905-issue48-provisioning-failure-alert-retry-ux_log.md

[Generated by AI]

## Resolution Landed in c0b2cb0 — build + full suite green: **30/30 test cases, `xcodebuild test` exit 0** (12 gate + 17 provisioning + 1 UI), SwiftFormat/SwiftLint clean. ### Acceptance criteria - [x] Failure shows one phase-named alert; the gate never re-raises — `ProvisioningFailureCard` on its own sheet, gated on `hasFailure && gateDismissed`; no code path from provisioning failure back to the gate - [x] Retry re-runs the full pass idempotently; Not Now → next launch retries silently — `deferFailure()`; test-pinned (defer + re-fail) - [x] Technical details shows the error excerpt (create from stdout per #43, stderr fallback — tested both) - [x] Never writes mcp_servers — config.yaml byte-identity through failed + successful passes AND fresh-profile no-config tests - [x] Missing-payload manifest entry routes into the copy-error alert path — `.failed(phase: .copy)`, test-pinned - [x] state.json stays schemaVersion 1 engine-gate-only; at most one os_log line per failure — `logFailure`, test-pinned Hardening from the review fanout: manifest entries validated kebab-case at the trust boundary (traversal-shaped entry fails the copy phase instead of escaping the skills dir); orphaned temp dirs from interrupted copies swept at pass start; deleted the unreachable `firstAvailableBinary()` fallback; Retry-success no longer blanks the card mid-dismiss (snapshot in view state); failure sheet presents only after the gate sheet's dismissal completes (no dropped-sheet race). Full detail: `docs/devlog/20260905-issue48-provisioning-failure-alert-retry-ux_log.md` [Generated by AI]
Sign in to join this conversation.