feat(home): pin iCloud Home for fresh installs (#171)
CI / ci (push) Canceled after 0s
CI / ci (push) Canceled after 0s
With no stored Home override, launch resolves once and PINS the winner, so the Home never silently moves: a legacy ~/Documents/Museion directory wins (existing Homes migrate manually, never silently), else <CloudDocs>/Museion when iCloud Drive is present (dynamically resolved unprefixed path, plain FileManager — no ubiquity entitlements, ADR-0009), else the silent Documents fallback. Repoint-only stands (ADR-0004), zero mover code. The ladder + probes live in HomeResolution.swift (own file — MuseionApp.swift stays under the lint line cap); init takes an injectable probe/defaults seam, and default constructions under hosted tests take an early return so the runner app's real iCloud state and defaults are never touched. 9 seam-driven tests replace the old default-Home pin; implement + finish-audit reviews landed the legacy-probe dir gate, the non-destructive hosted no-write guard, and the flip-verified CloudDocs spelling pin. Suite 628/628 (xcresult executed count). DOX: Museion/AGENTS.md, MuseionTests/AGENTS.md, GLOSSARY.md; devlog + INDEX + CHANGELOG. Closes #171 Co-Authored-By: Cipher <cipher@hermes.local>
This commit is contained in:
1 parent
c485cfac60
commit
ad021b5267
10 files changed
+282
-34
No files matched your search
@@ -6,6 +6,8 @@ All notable changes to this project will be documented in this file. The format
|
||||
|
||||
### Changed
|
||||
|
||||
- **home:** Fresh installs default to iCloud (#171, resolution of #170/map #167 — plain build slice for #145) — with no stored Home override, launch resolves once and PINS the winner so the Home never silently moves: a legacy `~/Documents/Museion` directory wins (existing Homes migrate manually, never silently; a stray plain file is not a Home and falls through), else `<CloudDocs>/Museion` when iCloud Drive is present (dynamically resolved unprefixed `Library/Mobile Documents/com~apple~CloudDocs` path, plain FileManager probing — no ubiquity entitlements per ADR-0009), else the silent Documents fallback. No dialog, no rail pill — Settings just shows the resolved path. Repoint-only stands (ADR-0004), zero mover code. The probe/defaults seam is injectable and default constructions under hosted tests neither probe nor pin — the runner app's real iCloud state and defaults are never touched. +9 tests incl. the flip-verified CloudDocs spelling pin and the non-destructive hosted no-write guard. Suite 628 (issue #171)
|
||||
|
||||
- **cold-turkey:** The writing lock (#162, wayfinder map #158 — Build S2; wires #161's goal engine + #160's contract into the app) — Cold Turkey is live: armed from a quiet dot in focus mode's bottom-right corner (hover-labeled) or View ▸ Start Cold Turkey…, the arm-bar carries a chip that blends into the focus ground (ground color, faintest hairline, no shadow — the bare seat let document text show through) with minutes|words selector, ± steppers AND a directly typeable value (parsed and clamped at every read; what you type is what arms — 1…1000 words / 1…60 min, defaults 250/5); Start enters the macOS app-kiosk per the #159 factsheet (7-option presentation combo + fullscreen, the window restored on completion) and the readout follows — numerals + 2px hairline, terracotta inside the last 20%, on the same blending chip. While the block holds: ⌥⌘F/reading/new-buffer paths refused (the open Piece stays the counted one), library + mentor hover zones suppressed (editor-only), ⌘W/⌃⌘F/⌘N swallowed by a key-code-matched monitor (charactersIgnoringModifiers is layout- and Caps-Lock-blind while AppKit menus match the physical key — the audit-caught hole; no .closeItem placement exists and SwiftUI owns the window delegate), and ⌘Q asks once (#163's ruling): "Walk away from the block?" — Walk Away quits cleanly, Keep Writing holds. Typing is never interrupted by the unlock: lock ⇒ focus freezes the view branch under the editor, chrome mounts as overlays only, and the fullscreen round trip preserves the first responder. Completion returns quietly to focus with a fading mono note ("● 250 words · 14:02"). Nothing persists — the block dies with the session. Glossary term landed; +19 tests incl. flip-verified refusal-key, parse-fallback, and canArm-mirror pins; finish-audit fanout (3 reviewers) landed the key-match fix, a ticker-race test seam, chip dedup, and window-capture-on-exit. Suite 620 (issue #162)
|
||||
|
||||
- **cold-turkey:** Pure goal engine (#161, wayfinder map #158 — Build S1 of the Cold Turkey writing lock) — `WritingGoal` (`words(Int)` | `minutes(Int)`, one goal per block, fixed at arm) + `WritingGoalRun`, the armed block: `update(text:)` takes whole-document text and `netNewWords` falls out of the delta (deleting costs — net, not gross; a 2000-word paste counts), and `now` is injected into every call, so the countdown cannot pause by construction. The minutes deadline is arm+minutes (inclusive boundary), `isMet` is live truth, unlatched (deleting below target un-mets; the lock completes on the first true tick), `progress(now:)` is the clamped 0…1 fraction the readout hairline rides, and word counting goes through the new internal `DraftStats.words(in:)` — net-words and first-draft stats share one tokenizer and can never drift ("writer's" is two words, headings are body text, frontmatter never reaches the editor body). Finish-audit fanout (3 reviewers): the `Int()` conversion trap in `secondsRemaining` fixed at the seam (isFinite guard + `Double(Int.max).nextDown` cap — the naive `Double(Int.max)` cap is itself off-by-one at 2^63 and still traps; flip-verified pin), two unpinnable `> 0` guards in `progress` deleted (degenerate zero targets already fall out to 1 through the Double math), `baselineWords` narrowed to `let`; the S2 throttle note landed on #162 (never feed the word count per keystroke). Suite 602 (issue #161)
|
||||
|
||||
Reference in new issue
Block a user