Files
orca/.github/workflows
Brennan Benson e0b44cdd6f fix(daemon): make pid-record publish atomic via claim-then-link
A crash, power loss, or forced kill mid-write left a torn, unparseable
daemon-vN.pid at the canonical path. For a retired protocol version nothing
ever heals that record (stale-kill only reclaims the current version's), so
the corrupt file became a permanent veto on pruning that version.

Publish now writes a per-pid/per-uuid claim, fsyncs it, and hard-links it
into place: readers see a complete record or none, and EEXIST ownership
conflicts are preserved (rename would silently replace). Filesystems that
refuse hard links degrade to the previous exclusive direct write. Claims are
cleaned on every in-process failure path; crash-orphaned claims are reaped
at the launch funnel, gated on the owner pid being provably dead (ESRCH),
never on age.
2026-08-27 18:34:38 -07:00
..