field note № 5 · when "local" is the single point of failure

Local is a dependency

Sixty scripts hardcoded one local folder. It worked for years — until an unattended job could write to it but not read it, and failed silently every day. Migrating away from local isn't a cleanup. It's removing the most invisible coupling there is.

The weakness

A fleet of scheduled jobs on one Mac wrote everything — reports, caches, browser drops, even a couple of secrets — into a single folder: ~/Downloads. Around sixty scripts hardcoded Path.home() / "Downloads" directly. Nobody decided this; it accreted. The folder did three unrelated jobs at once, and no code owned the convention, so it could never be moved.

Then one job went red. A daily hygiene check that cross-references a corpus of audit files began reporting it could not enumerate the directory. The cause wasn't the code. macOS protects ~/Downloads under its privacy layer (TCC), and a background launchd process without Full-Disk-Access can still write a file there — but the moment it tries to list the folder, the read is denied.

The real failure mode

Writes succeeded. Reads were denied. So every job that globbed that folder got back an empty list instead of an error — and carried on. The reports still wrote. The dashboard still went green. The cross-checks were just quietly running against nothing. Same signature as field note № 1: stale-green is the failure that compounds, because it looks exactly like success until the day you need the thing it was supposed to be checking.

The wrong fix (the one the OS invites)

The obvious fix is to make the dependency cooperate: grant each LaunchAgent Full-Disk-Access so it can read the protected folder. It even works — for a while. But it's the same trap as hardening a flaky vendor:

Granting access accepts the framing that the folder is the problem. The folder was never the problem.

The coupling wasn't ~/Downloads. It was that sixty scripts each believed, privately, that a specific local path would always be there and always be readable. Local was an un-provisioned, un-restorable dependency threaded through the whole fleet.

The reframe

This Mac is a single point of failure. The real requirement isn't "make the folder readable" — it's "when this machine dies, a new one restores cleanly." Under that lens, a hardcoded local path is not a convenience; it's a dependency you can neither see, version, nor reproduce. The job isn't to fix a permission. It's to turn the machine's layout into a contract — something a fresh machine can rebuild on purpose.

The removal

Four moves, each taking the coupling out rather than bracing it:

The proof — and what verifying it surfaced

Removing a coupling only counts if you prove the system is stronger, not just rearranged. Two things earned that confidence — one expected, one not.

~60 → 1
scripts that knew the path, collapsed to one contract module. Unset-env resolves to today, byte-for-byte.
41 jobs
relocated by one injected variable — zero per-job edits, one-line rollback.
green → red
a sibling check that partial migration broke — the lesson that lockstep isn't optional.

The unexpected proof came from a near-miss. A first, partial relocation moved one job's output but not a sibling script that independently hardcoded the old path — and a previously-green check went red. That's the whole argument for lockstep migration plus a verification gate: you move every producer and consumer of a path together, then run the real fleet and prove zero silent failures before you trust it. The regression wasn't a setback; it was the system telling the truth about a hidden coupling, cheaply, before it mattered.

Auditing the fleet to migrate it also revealed couplings the path-grep alone missed: a cluster of dashboard scripts that quietly exchanged data through the shared local folder, so they had to move as one atomic unit or break each other; and seventeen scripts carrying a stale path reference left over from an earlier home, working only by accident. You don't find those by assuming a uniform sweep. You find them by looking — which is the same discipline as measuring throughput instead of guessing it.

The principle, generalised

This was one folder on one Mac, but the moves aren't about folders:

Migrating away from local isn't housekeeping. It's converting an accident — a path everyone assumed and no one owned — into a contract a new machine can honour. The folder still exists. It just stopped being load-bearing.

antifragile.gf.cx · field note № 5 · published 2026-06-27 · drawn from a live gf.cx filesystem-contract migration · imports assets.gf.cx favicon + card primitives