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
{{ message }}
Repository navigation
Drop temporary ownership immediately after atomic publication #482
Found by exact-SHA runtime and type-safety review.
Expected
After os.replace succeeds, the vacated temporary basename is no longer owned
by the writer. Cleanup must not unlink it, and every directory descriptor must
close even if cleanup itself fails.
Observed
The successful replace leaves temporary_name set. The finally block can
unlink an unrelated entry that concurrently reuses that basename. A cleanup
error is then reported after publication and skips closing the retained
directory descriptor.
Acceptance
Clear temporary ownership immediately after successful replacement.
Never report a cleanup failure for a name no longer owned by this call.
Close all descriptors through nested finally boundaries.
Add a deterministic basename-reuse regression test and descriptor-close
assertion.
Activity
fix: retain atomic temporary ownership (#482 #483)