S1 — Default Museion Home flips to iCloud (CloudDocs), pinned once with legacy guard #171

Closed
opened 2026-11-05 12:04:56 +01:00 by AlexKucera · 0 comments
Owner

Spec source: resolution comment on #170 (map #167). Plain build slice for #145 — not a wayfinder ticket.

What

Flip the default Museion Home to iCloud for NEW installs — pin-once with a legacy-Home guard.

AppGateState (Museion/MuseionApp.swift:47-68): when no stored override exists (UserDefaults museionHome, existing semantics — file URLs only), resolve and PIN once, in this order:

  1. Stored override (unchanged).
  2. Legacy default ~/Documents/Museion EXISTS on disk → existing Home → pin the legacy path (charting settlement: existing Homes migrate manually, never silently).
  3. CloudDocs dir (resolved dynamically — ~/Library/Mobile Documents/com~apple~CloudDocs, unprefixed; never a hard-coded iCloud~ form) exists and is a directory → pin <CloudDocs>/Museion.
  4. Else → silent fallback: pin ~/Documents/Museion. No dialog, no rail pill — the Settings Home field just shows the resolved path.

Pin = written to UserDefaults once, only when no value is stored. The Home never silently moves after pinning.

Constraints

  • Probe seam injectable so hosted tests never touch the machine's real iCloud state; re-pin the existing home default is documents museion test (MuseionTests/PostLibraryTests.swift:199) to the seam.
  • No ubiquity API — the app has no entitlements (ADR-0009); plain FileManager probing.
  • Load SwiftFairy + swift6-concurrency skills before Swift edits; run GitNexus impact on defaultMuseionHome first (repo rule).
  • Zero mover code; repoint-only stands (ADR-0004).

Acceptance

  • Resolution order + pin-once + legacy guard covered by tests through the injected seam.
  • xcodebuild -project Museion.xcodeproj -scheme Museion -destination 'platform=macOS' build and … test green (verify by executed count, not the banner).
  • Devlog per docs/devlog convention.

[Generated by AI]

Spec source: resolution comment on #170 (map #167). Plain build slice for #145 — not a wayfinder ticket. ## What Flip the default Museion Home to iCloud for NEW installs — pin-once with a legacy-Home guard. `AppGateState` (Museion/MuseionApp.swift:47-68): when no stored override exists (UserDefaults `museionHome`, existing semantics — file URLs only), resolve and PIN once, in this order: 1. Stored override (unchanged). 2. Legacy default `~/Documents/Museion` EXISTS on disk → existing Home → pin the legacy path (charting settlement: existing Homes migrate manually, never silently). 3. CloudDocs dir (resolved dynamically — `~/Library/Mobile Documents/com~apple~CloudDocs`, unprefixed; never a hard-coded `iCloud~` form) exists and is a directory → pin `<CloudDocs>/Museion`. 4. Else → silent fallback: pin `~/Documents/Museion`. No dialog, no rail pill — the Settings Home field just shows the resolved path. Pin = written to UserDefaults once, only when no value is stored. The Home never silently moves after pinning. ## Constraints - Probe seam injectable so hosted tests never touch the machine's real iCloud state; re-pin the existing `home default is documents museion` test (MuseionTests/PostLibraryTests.swift:199) to the seam. - No ubiquity API — the app has no entitlements (ADR-0009); plain FileManager probing. - Load SwiftFairy + swift6-concurrency skills before Swift edits; run GitNexus impact on `defaultMuseionHome` first (repo rule). - Zero mover code; repoint-only stands (ADR-0004). ## Acceptance - Resolution order + pin-once + legacy guard covered by tests through the injected seam. - `xcodebuild -project Museion.xcodeproj -scheme Museion -destination 'platform=macOS' build` and `… test` green (verify by executed count, not the banner). - Devlog per docs/devlog convention. [Generated by AI]
AlexKucera added the ready-for-agent label 2026-11-05 12:04:56 +01:00
Sign in to join this conversation.