Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

docs([issue-3713]): log issue #3713 to changelog

[._.]/ Adam Eivy08a910a247ae
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 1d6153dbfa..eae78e19e8 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -191,4 +191,8 @@
## Internal
+- **[issue-3713] Confirmed that deleting an iCloud-offloaded note is safe, and pinned the decision not to guard it.** [issue-3706] proved that *overwriting* an offloaded file stalls in the kernel exactly like reading one, which left `obsidian.deleteNote`'s `unlink` as the last unguarded write-shaped call on the vault adapter. The POSIX argument ("unlink only drops a directory entry, so there is nothing to download") was not safe to lean on — `link` is pure metadata too and it *does* materialize, and [issue-3706]'s whole lesson was that the intuitive answer about `O_TRUNC` was wrong. Measured instead, on freshly-evicted iCloud fixtures with each syscall timed in a killable child process: `unlink` returned in 0.1 ms at both 512 KB and 5 MB, three runs of three, against 884 ms to `read` the same dataless 5 MB file. So no guard — and not merely because it is unnecessary: the [issue-3706] remedy is to download the file and wait, which here would mean fetching every byte of a note purely to throw it away. A test now pins the *absence* of the screen so a later "add it for symmetry" change has to argue with it. The syscall table in `server/lib/icloudFile.js` gained the `unlink` row.
+
+- Internal: [issue-3713] `brctl evict <path>` turns out to work, correcting a note carried by [issue-3706] and [issue-3716] that recorded programmatic eviction as unavailable to an unentitled CLI (leaving a manual Finder step as the only route). Like `brctl download` it is absent from `brctl --help` but fully functional, refusing only when run as root. That makes the whole evict/measure/heal loop scriptable, so the next iCloud syscall question can be answered without a human at the keyboard; the recipe, and the tooling that genuinely does not work (`fileproviderctl`, `chflags dataless`, `FileManager.evictUbiquitousItem`), is now a section in `server/lib/icloudFile.js`.
+
- **[issue-3716] Dropped the unreachable legacy `.icloud` placeholder probe from the MortalLoom store.** macOS has two possible representations for an iCloud file evicted by "Optimize Mac Storage": the modern APFS *dataless* vnode (path stays put, `stat` reports a real size with zero blocks) and the pre-APFS `.<name>.icloud` sibling stub that *replaces* the file. `mortalLoomStore` guarded both — the stub probe added speculatively alongside a real dataless incident, never observed firing — and the Obsidian vault adapter guarded only the first, so `createNote` would have written a fresh note beside a stub-shadowed one. Before copying the probe into a second adapter, the representation was measured: across 223 iCloud ubiquity containers holding 373 evicted files (macOS 26, APFS), every evicted file was dataless and zero `.icloud` placeholders existed anywhere under the iCloud root or the home directory. The probe is dead code, so it was deleted rather than duplicated — an absent path is now unambiguously absent on both read and write, and `updateStore`'s overwrite guard makes one `existsSync` call instead of three. The finding, and where the probe would have to go if a placeholder is ever actually observed, is recorded in `server/lib/icloudFile.js`. No user-visible behavior change: refusing to overwrite an evicted (dataless) store, and the on-demand `brctl download` pre-warm, are untouched.