Fix unnecessary file updates when HTTP source lacks checksum headers - #612
Open
jorhett wants to merge 1 commit into
Open
Fix unnecessary file updates when HTTP source lacks checksum headers#612jorhett wants to merge 1 commit into
jorhett wants to merge 1 commit into
Conversation
Assisted-by: Cascade:SWE-1.6 (Devin Desktop)
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.
Short description
This is I believe a more minimal fix for #581 than what is proposed in #582.
Fixes #581
Replaces #582
Root Cause
The
HttpMetadataclass inhttp_metadata.rbwas setting a default mtime checksum usingTime.nowwhen HTTP servers didn't provide checksum headers (Content-MD5, X-Checksum-*, ETag, or Last-Modified). This default now timestamp checksum changed on every run, triggering unnecessary updates.Solution
Time.nowdefault inHttpMetadata#initializeImpact
Checklist
I have:
Signed-off-byannotation to each of my commitsGenerated-byorAssisted-byannotations to each of my commits created with the help of an AI agentKey considerations
I believe this to be a bug/regression and that this fix should be considered for a patch level update. I can find no documentation that says that files should be treated as updated NOW when a timestamp is unavailable, nor that files should always be replaced when timestamp or checksum metadata are unavailable.
I also believe that this would align with user's expectations, such that fixing it in a patch update would be acceptable.
Assisted-by: Cascade:SWE-1.6 (Devin Desktop)