fix(itg): stabilize cycle hashing for BUG-028 - #304
Draft
sbalabanov wants to merge 1 commit into
Draft
Conversation
Summary: Intent: - Make BUG-028 incremental cycle hashing independent of invalidation map iteration. - Preserve the cycle entry points used by full graph recomputation. Changes: - Hash invalidated topological roots and root-unreachable cycles in canonical target-name order. - Add property-based coverage over randomized invalidation insertion orders for rooted and rootless cycles. --- <sub>Generated by the 🪄 [pr-create](https://sg.uberinternal.com/code.uber.internal/uber-code/devexp-agent-marketplace/-/blob/claude-code/plugins/dev/uber-dev/skills/pr-create/SKILL.md) skill in devexp-agent-marketplace</sub>
|
|
sbalabanov
marked this pull request as ready for review
August 26, 2026 18:32
sbalabanov
marked this pull request as draft
August 26, 2026 19:17
Contributor
Author
|
simplify description and describe a use case showing a bug it fixes |
Contributor
Author
|
Updated the BUG-028 description to focus on deterministic incremental cycle hashing and added a concrete rooted-cycle invalidation use case showing how the previous behavior could differ from a full recomputation. Current HEAD: [addressed by agent] |
sbalabanov
commented
Aug 27, 2026
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
Fix BUG-028 by making incremental graph hashing deterministic when invalidated targets contain dependency cycles.
Use case
A graph contains a cycle between
//pkg:aand//pkg:b, with//pkg:rootdepending on the cycle. After a target changes, the old incremental update could traverse invalidated targets in Go map order and enter the cycle at a different target than a clean full recomputation. That produced different hashes for the same graph, leading to inconsistent incremental results and cache keys. This change hashes invalidated targets in canonical target-name order so both paths agree.Test Plan
bazel test //core/itg/graph:go_default_test.Revert Plan
Revert this PR.
Issues
BUG-028