[BUG] Temporary-file cleanup remains armed after publication #5

Closed
opened 2026-10-17 14:29:22 +02:00 by erikinkinen · 0 comments
Owner

Summary

The Linux publisher left temporary-file cleanup armed after a successful rename.
Dropping the guard could then remove a new file created at the vacated name.

Reproduction

The regression control publishes its own file, recreates its old temporary name,
then drops the guard. It checks that the published output and the new file both
remain. This uses only test-owned files and requires no timing race.

Expected and actual behavior

Successful publication must disarm cleanup of the old name. The earlier guard
always attempted removal. A refused rename must still clean the unpublished
file without changing the destination.

Environment and identity

Affected: 3040a592e2a8745b0149ade92b5f4204321445b3, Linux src/output.rs.
Fixed in 220c364b7cdbdc20688211c18a7a2e1039f18cec; current head is
50e22cb05ac2e2fd460ea83ca9c0e80fb484af98.

Evidence and prior checks

Both new controls pass in debug and release; all 31 tests in each profile and
strict Clippy pass without warnings. The documented contract still requires a
stable parent directory, and destructor cleanup remains best effort.

Tracking

Related: #1 and #2.

  • Disarm temporary-name cleanup immediately after successful rename.
  • Cover name reuse and refused-rename cleanup in both build profiles.
  • Document the parent-directory and cleanup assumptions.
## Summary The Linux publisher left temporary-file cleanup armed after a successful rename. Dropping the guard could then remove a new file created at the vacated name. ## Reproduction The regression control publishes its own file, recreates its old temporary name, then drops the guard. It checks that the published output and the new file both remain. This uses only test-owned files and requires no timing race. ## Expected and actual behavior Successful publication must disarm cleanup of the old name. The earlier guard always attempted removal. A refused rename must still clean the unpublished file without changing the destination. ## Environment and identity Affected: `3040a592e2a8745b0149ade92b5f4204321445b3`, Linux `src/output.rs`. Fixed in `220c364b7cdbdc20688211c18a7a2e1039f18cec`; current head is `50e22cb05ac2e2fd460ea83ca9c0e80fb484af98`. ## Evidence and prior checks Both new controls pass in debug and release; all 31 tests in each profile and strict Clippy pass without warnings. The documented contract still requires a stable parent directory, and destructor cleanup remains best effort. ## Tracking Related: #1 and #2. - [x] Disarm temporary-name cleanup immediately after successful rename. - [x] Cover name reuse and refused-rename cleanup in both build profiles. - [x] Document the parent-directory and cleanup assumptions.
erikinkinen 2026-10-17 14:29:23 +02:00
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:33:33 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/boot-tool#5
No description provided.