feat: add --hash-debug flag for per-target hash component logging#8
Open
honnix wants to merge 2 commits into
Open
feat: add --hash-debug flag for per-target hash component logging#8honnix wants to merge 2 commits into
honnix wants to merge 2 commits into
Conversation
When --hash-debug is passed, logs each target's hash inputs to stderr: - Source files: label, absolute path, and content hash - Rules: each rule input's label and hash, then the rule's final hash with its class, skylark env hash, and configuration This enables diagnosing non-deterministic hashes across CI agents by comparing the debug output from two runs on the same commit.
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 a
--hash-debugCLI flag that logs per-target hash component breakdown to stderr:Motivation
We're debugging non-deterministic target hashes across CI agents in the data monorepo. The
bazel query --output=protooutput is byte-identical between agents, yet the hash-persister produces different hashes. This flag will let us diff the hash computation trace between two runs to pinpoint the diverging component.Usage
The output goes to stderr (via Go
logpackage), so it can be redirected independently of the hash file.🤖 Generated with Claude Code