Repository navigation
fix(history): keep review artifacts from crossing checkouts - #402
Merged
Merged
Conversation
The history reader picked the newest file in the basename directory, so a checkout sharing its root name with another one read that checkout's review. Both read-latest-history.sh copies now match each entry on its path: header, resolving symlinks on both sides; a single-file --only header matches the directory holding the file, and an existing nested same-basename checkout never matches through its parent. The pi skill describes the same rule. Concurrent saves could choose the same millisecond filename and overwrite one another. History filenames now include a random suffix to keep those entries separate. The timeout fallback in the three skill copies looks only at the user's own revdiff-output-* files from the last two hours, following a symlinked TMPDIR. Two live reviews by the same user can still both match, and the skills say so. Fixed #331
…n skill The reader tests had at most one matching entry per case, so a loop keeping the first or the last match passed. The revdiff-plan skill now carries the same caveat as the revdiff skills about what the narrowed output lookup can still match.
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.
Implements the three fixes agreed in #331.
read-latest-history.shcopies pick the newest entry whosepath:header (read from the metadata block only) names the current checkout, comparing symlink-resolved paths. A single-file--onlyheader without git matches the directory holding the file; an existing nested same-basename checkout never matches through its parent. The pi skill describes the same rule.2006-01-02T15-04-05.000-<8 hex>.md), still written throughAtomicWriteFile.revdiff-output-*files from the last two hours (find -H, so a symlinkedTMPDIRsuch as macOS/tmpworks). This is a mitigation: a recent leftover or a second live review by the same user can still be the newest match, and the skills say so.Tests: the reader runs against real repos for foreign, nested, symlinked, file-style and body-only headers plus newest-of-several; the fallback command is extracted from all three skills and executed; a concurrent-save test loses entries on the old naming.
Fixed #331