Files
hermes-agent/utils
BearHuddleston 554944092a fix(gateway): publish a no-link RoomLink secret with a no-clobber rename on Windows
The no-hard-link fallback held a flock across its exists() check and its
os.replace, but skipped the lock where fcntl is missing. That is Windows,
where a FAT/exFAT or SMB home refuses os.link, so two first users there
could both pass the check, both replace, and keep different signing keys.

The fallback moves into utils.files.publish_new_file: Windows publishes
with os.rename, which never replaces an existing file (FileExistsError),
and POSIX keeps the sibling flock. The first-use race test now also widens
the check-to-publish window and runs on every OS lane.
2026-11-28 01:58:02 -06:00
..
…
…
…