Repository navigation
Preserve history and exports with isolated buffered file replacement - #40
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
History saves used a fixed
history.tsv.tmpneighbor. A successful save could consume a pre-existing file at that path, and a failed save could delete it. Two running instances also shared the staging file. CSV staging appended a GUID to the full destination filename, causing otherwise valid long filenames to exceed Windows' component limit.Changes
.taskmgr-{GUID}.tmpsibling.Verification
The previous history writer was extracted and reproduced consuming a sentinel neighbor on both successful and failed saves. The replacement passes local strict-warning GCC/UBSan checks: 31 history fixture checks and 15 atomic-file boundary/failure checks. Independent review covered ownership, destruction order, write failure handling and exact history serialization.
New native fixtures exercise pre-existing neighbors, locked destinations, directory and missing-parent failures, abandoned staging cleanup, two simultaneous staging files, concurrent complete-snapshot saves, full-width unsigned timestamps and a valid long CSV filename. Concurrent saves preserve one complete winning snapshot; this does not add history merging between instances.
The corrected head passed Windows verification run 38209554455: 12/12 CTests, all 21 suite cases, Python tests on both platforms, release guards, production checks and packaging. The initial diagnostic-only shadowing warning was corrected without relaxing /WX.
The retained artifact matches GitHub SHA-256
02fd1620c36853d68fa7c95ebdd49068e6c582080668f46b629b9a4881280047. All 31 diagnostic JSON reports pass. All 25 UI reports (7 CTest and 18 suite) havesortingPassed=trueand an empty failure field; the history and CSV fixtures run unconditionally in that gate. This verifies the long filename, complete concurrent snapshots, exact serialized bytes, destination preservation and cleanup on Windows. Individual successful fixture-assertion counts are not emitted, so the source labels are not presented as additional independent runtime test counts.This patch is based on the fully verified combined source merged in #39; the paired performance experiment was not repeated for this persistence-only change.