You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(worldline): follow atomic write-then-rename to the final filename
Tools (editors, build systems, Claude Code) write files atomically: write a
`<name>.tmp.<rand>` then `rename()` it over the target. worldline observed only
the temp file's write, so its timeline showed `report.txt.tmp.4f3a…` instead of
`report.txt`.
fspy now surfaces a `Renamed` file event — a new `CallbackKind`/`FileEventKind`
carrying source + destination — by interposing the rename family in the preload
backend (`rename`/`renameat`/`renameat2` on Linux; `rename`/`renameat`/
`renamex_np`/`renameatx_np` on macOS). Rename carries no descriptor, so a
placeholder fd keeps the supervisor's receive path unchanged. worldline relabels
any captured write of the rename source to display its destination (content
stays stored under the original key, so reconstruction is unchanged).
The seccomp (musl) and Windows backends don't surface renames yet, so atomic
writes still show the temp name there.
Verified end-to-end (a re-signed hardened claude under worldline now shows
`report.txt`, not the temp). Adds Unix regression tests at the fspy callback
layer and the worldline layer.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments