{{ message }}
test: hermetic cross-machine hashing + MODULE.bazel.lock edit E2E coverage#3
Open
maxwellE wants to merge 3 commits into
Open
test: hermetic cross-machine hashing + MODULE.bazel.lock edit E2E coverage#3maxwellE wants to merge 3 commits into
maxwellE wants to merge 3 commits into
Conversation
…bazel.lock edits Adds two bzlmod E2E tests that lock in the cross-machine reproducibility guarantee bazel-diff relies on when "from" and "to" hashes are produced on different CI agents: - testGenerateHashesIsHermeticAcrossWorkspacePaths: generates hashes for byte-identical sources checked out at two different absolute paths (and thus two different Bazel output bases) and asserts the resulting target-hash maps are identical. Guards against any workspace/output-base path leaking into a digest. - testModuleBazelLockReformatDoesNotImpactTargets: re-serialises MODULE.bazel.lock in one checkout (same resolved module graph, different bytes) and asserts no targets are impacted. bazel-diff keys bzlmod change detection off `bazel mod graph`, not the raw lock bytes, so lock churn that is common across machines stays a no-op. Lock-file companion to the MODULE.bazel comment-only regression test for issue Tinder#83. Both reuse the existing module_bazel_comment fixture and are gated to Bazel 8.6.0+/9.0.1+ to match the other bzlmod E2E tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FLwXzgBTGkZp63N9jv16x8
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.

Summary
Adds two bzlmod E2E tests that lock in the cross-machine reproducibility guarantee bazel-diff relies on when the "from" hashes are produced on one CI agent and the "to" hashes on another. Follow-up to the external-repo content-hash key fix (Tinder#385), which removed the last absolute-path dependency from source-file hashing.
testGenerateHashesIsHermeticAcrossWorkspacePaths— generates hashes for byte-identical sources checked out at two different absolute paths (and thus two different Bazel output bases) and asserts the resulting target-hash maps are identical. Guards against any workspace/output-base path leaking into a digest.testModuleBazelLockReformatDoesNotImpactTargets— re-serialisesMODULE.bazel.lockin one checkout (same resolved module graph, different bytes on disk) and asserts no targets are impacted. bazel-diff keys bzlmod change detection offbazel mod graph, not the raw lock bytes, so lock churn that is common across machines stays a no-op. Lock-file companion to theMODULE.bazelcomment-only regression test for issue Over-triggering with rules_go and Gazelle under certain circumstances Tinder/bazel-diff#83.Notes
module_bazel_commentfixture and are gated to Bazel 8.6.0+/9.0.1+ (sharedassumeBazelSupportsModShowRepohelper), matching the other bzlmod E2E tests. CI runs Bazel 8.x/9.x, so they execute rather than skip.🤖 Generated with Claude Code
Generated by Claude Code