Repository navigation
Drop the unused hash parameter from locateArchives - #203
Merged
Merged
Conversation
locateArchives never read the computed hash result; it finds a profile's archives by matching the roots recorded in each archive header. The hash computation remains the gate that decides whether a profile can be reset or whether Delete offers archive removal, so callers still run it and branch on its failure. Only the unused value stops being passed along. Also corrects the Reset action's doc comment, which said the hash identifies the profile's files. The ArchiveOfferSelectionTests from #201 are unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Nov 8, 2026
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.
What
locateArchivesnever read itscomputed: ArchiveHash.MultiResultparameter. It finds a profile's archives by matching the roots in each archive header. This removes the parameter and the value threaded through to it:locateArchives(profile:unisonDirectory:localHostname:)resetArchiveCandidatesanddeleteArchiveOfferstill runArchiveHash.computeAlland branch on its failure (the three Reset gates; Delete withholds the offer when it fails), but no longer pass the success value on.Behavior
Unchanged.
ArchiveOfferSelectionTestsfrom #201 passes without edits: local pair, ssh root, the three Reset gates, former-hostname archives, and Delete's withheld offer when another profile shares the roots.Size
Production +9/-9 (the parameter plus the corrected comment), one file. This is step A of the archive cleanup. Step B (reading the profile once instead of twice) is separate and needs these tests as its baseline.
Verified
make teston Heracles: 1549 tests, 0 failures.🤖 Generated with Claude Code