iCloud Home facts — companion visibility, eviction, conflicts, first-run posture #168
Notifications
Due Date
No due date set.
Blocks
#169 Companion + storage location — Obsidian vault vs iCloud Drive proper
AlexKucera/museion
Reference: AlexKucera/museion#168
Reference in new issue
Block a user
Part of #167
Question
Which iCloud storage location do the facts actually support for a Museion Home, and what exactly must a best-effort v1 tolerate there? Facts to pin (all source-cited, macOS-27 unsandboxed client per ADR-0009, plain files under one Home per ADR-0004):
~/Library/Mobile Documents/iCloud~md~obsidian/Documents/) via the Files app / document picker, or is that container Obsidian-only on iOS? (Obsidian mobile's container-only vault rule is already pinned: vaults outsideiCloud Drive/Obsidiannever open on iPhone/iPad.).icloudplaceholder names, dataless APFS files), what does a plainFileManagerread do (blocking download? error offline?), does per-folder "Keep Downloaded" pin reliably, and what does that mean for Museion's folder watcher + full rescan model (evicted piece = missing post.md = row drops out).~/Library/Mobile Documents/need any TCC consent? What exists when iCloud Drive is disabled (path absent? container dirs present but stale?)? Path-form discrepancy to resolve:iCloud~com~apple~CloudDocsvscom~apple~CloudDocs(both seen on this machine).iCloud Drive/Museion(CloudDocs proper) as the product default for NEW Homes.Deliverable: factsheet as the resolution comment on this ticket (scratch copy at
~/.hermes/cache/scratch/wf145/icloud-home-companions.md);docs/research/landing rides an authorized build commit. No branches, no pushes (repo standing rule).[Generated by AI]
iCloud Home facts — companion visibility, eviction, conflicts, first-run posture
Resolves #168 (child of #167). Method: read-only local probes on this machine (macOS 27.0.1, iCloud Drive on) + primary docs + reputable forum/support threads. Probe lines are quoted from terminal transcripts, 2026-11-05. Nothing on this machine was modified or downloaded by the probes.
1. Companion visibility — can Textastic reach files inside Obsidian's iCloud container?
iCloud Drive/Obsidian(iCloud) and/orOn My iPhone/Obsidian(local)" (https://forum.obsidian.md/t/switching-to-a-different-vault/53372; https://obsidian.md/help/sync-notes "ensure your vault is stored in the correct location").Answer: the container is NOT Obsidian-only on iOS. Third-party editors with document-picker access (Textastic, Taio) can browse, open, and edit-in-place inside
iCloud Drive/Obsidian— including.obsidian. Access is picker-mediated (no iOS app gets blanket background access to another app's container), but for a human-driven companion workflow it works today.2. Eviction mechanics from macOS
.icloudstub names on modern macOS. Whole-tree probe:find "$HOME/Library/Mobile Documents" -name '*.icloud' | wc -l→0. Evicted files keep their real name and size. (Probe 2026-11-05.) Name-mangled stubs (".name.icloud") were the pre-Sonoma mechanism; Sonoma moved iCloud Drive to FileProvider dataless files. Sources: https://eclecticlight.co/2024/03/11/icloud-drive-in-sonoma-optimise-mac-storage-or-not/ ("eviction replaced the local file with a hidden stub file" — past tense, pre-Sonoma), https://eclecticlight.co/2023/10/29/last-week-on-my-mac-dataless-files-arrive/man launchd.plist(verified on this machine) —MaterializeDatalessFiles: "This optional key specifies the dataless file materialization policy… If this key is not set, the default system policy for dataless files will be used. See setiopolicy_np(3)." Processes running the default-off policy get an immediate EDEADLK instead of a download (TN3150 documents EDEADLK forIOPOL_MATERIALIZE_DATALESS_FILES_OFF).os.open()+os.read()on the 460-byte dataless file →errno=11 (EDEADLK) strerror='Resource deadlock avoided', blocks stayed 0, no download. (Probe 2026-11-05.)read(): "Materializing a dataless file can take time if the file is large or there are poor network conditions"; symptoms include hangs,ETIMEDOUT, watchdog terminations; evenfileExists(atPath:)and directory enumeration can materialize intermediate dataless folders. Source: TN3150 (URL above).evictsubcommand removed fromfileproviderctland Finder's "Make available online only" sometimes missing on bulk folder selection (https://developer.apple.com/forums/tags/fileprovider).Implication for Museion's watcher + full rescan (facts): an evicted post.md still appears in directory listings with its real name and size (probe:
ls/statshow it; only blocks are 0) — a listing-based rescan does not lose the row; only content reads block (app context) or fail fast (background/EDEADLK context). The "evicted = missing post.md = row drops out" failure mode belongs to the legacy.icloudname-mangling era — zero such files exist on this machine. What v1 must tolerate instead: slow/hanging first reads, EDEADLK if any code path runs from a daemon context, and TN3150's guidance to detect dataless status (SF_DATALESS) and read off the main thread.3. Conflict behavior
filename (1),(2), … (iCloud for Windows client) — https://forum.obsidian.md/t/icloud-sync-issues/28320; "Note 2.md, or a name containing 'conflicted copy'" (community plugin docs describing macOS/iOS iCloud behavior) — https://community.obsidian.md/plugins/jemzsync. No first-party doc pins the exact plain-file (non-document-app) duplicate naming; Apple's documented pattern is the numbered suffix.original (Conflicted copy device-name YYYYMMDDHHMM).md. Source: https://obsidian.md/help/sync/troubleshootAnswer: a two-device edit race yields two files (original + numbered/conflicted sibling), not a queued merge. Museion should treat numbered/conflict-pattern sibling files as a normal, recoverable state, not corruption.
4. First-run / availability posture (unsandboxed app)
~/Library/Mobile Documents/hits the per-app Files and Folders → iCloud Drive consent (not Full Disk Access).iCloud Drive/Museionand writing new files into it does not prompt.~/Library/Mobile Documents/com~apple~CloudDocs(real dir, inode 298525);ls -lad …/iCloud~com~apple~CloudDocs→ "No such file or directory". TheiCloud~prefix is the ubiquity-container convention (iCloud~<bundle-id>:iCloud~md~obsidian, and Apple system containers likeiCloud~com~apple~DocumentsApp,iCloud~com~apple~shortcuts~runtime— all in the probe's top-level listing). Corroborated: "At a file system level, iCloud Drive appears in the path/Library/Mobile Documents/comapple~CloudDocs" (https://eclecticlight.co/2026/08/25/an-icloud-primer/). Code must target the unprefixed form (or resolve the URL dynamically rather than hard-coding).com~apple~CloudDocscontents became inaccessible/gone (https://stackoverflow.com/questions/79657785). Stale per-app containers persist indefinitely regardless — the probe's top-level listing contains dozens of containers from long-uninstalled apps. Partially UNRESOLVED: no first-party doc pins the exact CloudDocs directory lifecycle when Drive is toggled off (empty vs. stale vs. absent); treat all three as runtime possibilities and probe at first run.5. Reliability record (plain files + iCloud)
(1),(2), files stuck in pending upload states, "the entire vault was duplicated once" — https://forum.obsidian.md/t/icloud-sync-issues/28320; duplicates from sync clashes and from running iCloud together with Obsidian Sync — https://forum.obsidian.md/t/icloud-duplicates/271386. Default-path support —
iCloud Drive/Museion(CloudDocs) for NEW HomesFacts FOR:
iCloud Drive/Museionis frictionless for new Homes.Facts AGAINST (tolerances a v1 must absorb if CloudDocs is the default):
iCloud Drive (Archive)) — the Home path can evaporate.What this means for the decision
~/Library/Application Support/obsidian/obsidian.json) shows live vaults in bothcom~apple~CloudDocs/…andiCloud~md~obsidian/Documents/…on this machine.iCloud Drive/Obsidian). Companion editors (Textastic/Taio) can reach inside it on iOS, but every access is picker-mediated. Eviction, conflict, and TCC behavior are identical — the same FileProvider machinery backs both (probe found dataless files in both).[Generated by AI]