- CLI holds a lock file from load to save, so concurrent commands can't
lose an update; stale locks from crashed runs are taken over
- load() renumbers duplicate ids from the old add() bug instead of
refusing the file
- save() keeps owner, group and setgid on the temp file, and falls back to
an in-place write for hard-linked files, files whose owner/group can't
be kept, and directories that aren't writable
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- save() follows symlinks, keeps permissions, uses a unique temp file and cleans it up on failure
- load() rejects entries that aren't {id, text, done}
- add() finds the max id with reduce (no spread limit)
- CLI accepts only plain digits as ids and reports save errors readably
- Ignore *.tmp
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>