test(e2e): reproducer for #510 (fine-grained change missed through non-root-visible wrapper) - #511
Draft
tinder-maxwellelliott wants to merge 1 commit into
Draft
tinder-maxwellelliott wants to merge 1 commit into
tinder-maxwellelliott wants to merge 1 commit into
Conversation
…non-root-visible wrapper Adds the hidden_wrapper_external_repo fixture from the issue: //:consumer -> @facade//:export -> @@middle+//:wrapped -> @leaf//:value, where `middle` is declared only by `facade` (as `private_wrapper`), so it is not in the root repo mapping. With --fineGrainedHashExternalRepos=@leaf, a change to leaf/value.txt impacts only @leaf//:value{,.txt}; //:consumer is missed. //external:leaf changes but //external:facade does not, because query_bzlmod_repos only lowers repos from the root's `mod dump_repo_mapping`, so @@middle+ never becomes a synthetic node and the facade -> middle -> leaf edge is dropped. The reproducer case fails on master by design. A companion control case shows that naming @leaf,@facade,@@middle+ explicitly propagates the change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Reproducer for #510.
Fixture
tests/resources/workspaces/hidden_wrapper_external_repo, the issue's layout:middleis declared only byfacade(asprivate_wrapper), so unlike the #197 fixture (wrapped_external_repo) it is not in the root's repo mapping.Cases (
tests/e2e/regressions.rs)hidden_wrapper_external_repo_change_reaches_main_consumer_reproducer_for_issue_510: fails on master by design. With--fineGrainedHashExternalRepos=@leaf, changingleaf/value.txtimpacts only{"@leaf//:value", "@leaf//:value.txt"}, and//:consumeris missed. It also asserts//:controlstays unimpacted.hidden_wrapper_external_repo_change_propagates_with_explicit_chain: a control that passes. It names@leaf,@facade,@@middle+and shows the fixture's edges are real.Root cause (observed)
//external:leafchanges between the snapshots, but//external:facadedoesn't.query_bzlmod_repos(src/bazel.rs) lowers only the repos inbazel mod dump_repo_mapping ""(root-visible). So@@middle+never becomes a//external:node, and inlower_repositoriesthefacade -> middlemodule edge is dropped by themodule_to_canonicallookup.//:consumer's input@facade//:exportis rewritten to//external:facade, whose hash doesn't reflect the leaf change. In #197 both repos are root-visible, so the edge survives.Possible fix direction: lower every repo from
bazel mod graph(or the transitive repo mappings) instead of only the root's, keyed by canonical name, so chains through non-root-visible modules stay connected.🤖 Generated with Claude Code