You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Preserve the canonical snapshot digest for diff scans so generated git_diff manifests satisfy the scan contract for working-tree, single-commit, and revision-range targets.
After a broader adversarial review, I no longer recommend merging this implementation.
This patch derives committed-diff identity only from kind, baseRevision, and headRevision. That fixes the immediate missing-field failure, but it does not bind the digest to the rendered diff bytes or cover mutable Git replacement/config state, completion-time drift, SHA-256 repository empty trees, or bounded-memory hashing of large binary diffs.
#241 addresses the same failure with the stronger content-bound design and the related revalidation cases. Please treat #373 as superseded by #241.
After comparing this patch against #241 and its review coverage, I’m withdrawing this PR in favor of #241. This change fixes the immediate missing snapshotDigest, but deriving it only from kind/base/head does not bind the actual rendered diff and leaves mutable Git state, SHA-256 empty-tree handling, completion-time revalidation, and large-diff streaming uncovered. #241 is the more complete direction.
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
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.
Fixes #299.
Preserve the canonical snapshot digest for diff scans so generated
git_diffmanifests satisfy the scan contract for working-tree, single-commit, and revision-range targets.Tests:
bun test tests-ts/compact-diff-scan.test.ts