Skip to content

fix(controller): preserve AllTargetsFiles change types for BUG-015 - #298

Open
sbalabanov wants to merge 1 commit into
mainfrom
sbalabanov/bug-015
Open

fix(controller): preserve AllTargetsFiles change types for BUG-015#298
sbalabanov wants to merge 1 commit into
mainfrom
sbalabanov/bug-015

Conversation

@sbalabanov

@sbalabanov sbalabanov commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix BUG-015 by preserving NEW and DELETED change types when an AllTargetsFiles global trigger changes.

Previously, global invalidation could overwrite every result as CHANGED. For example, if .bazelrc changes in the same revision that adds //service:new and deletes //service:old, callers must still receive NEW for the added target and DELETED for the removed target; only targets present in both revisions should be promoted to distance-zero CHANGED.

The fix applies the same classification behavior to chunk-backed and TGB-backed graph comparisons.

Test Plan

  • Unit tests cover unchanged, hash-changed, added, and deleted targets for both graph formats.

Issues

T3-BUG-015

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@sbalabanov
sbalabanov marked this pull request as ready for review August 26, 2026 18:32
@sbalabanov
sbalabanov requested review from a team as code owners August 26, 2026 18:32
@sbalabanov
sbalabanov marked this pull request as draft August 26, 2026 19:17

@sbalabanov sbalabanov left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplify the PR description, include use case example of the bug the PR fixes

@sbalabanov

Copy link
Copy Markdown
Contributor Author

Simplified the PR description and added a concrete .bazelrc example showing that a global trigger must preserve NEW and DELETED classifications while promoting only shared targets to CHANGED. Current HEAD: 1eeb5a17a9e527f6db6ad36ea5a67b60b10726fc.

[addressed by agent]

Comment thread controller/getchangedtargets.go
Summary:
BUG-015 preserves protocol ChangeType semantics when an AllTargetsFiles global trigger fires.

Intent:
- Keep revision membership changes distinguishable from global invalidation.
- Return complete old and new target payloads for targets present in both revisions.

Changes:
- Retain ordinary NEW and DELETED results before promoting shared targets to distance-zero CHANGED.
- Apply identical classification behavior to chunk-backed and TGB-backed comparisons.
- Cover stable, hash-changed, added, and deleted targets across both graph formats.

---

<sub>Generated by the 🪄 pr-create skill in devexp-agent-marketplace</sub>
@sbalabanov
sbalabanov marked this pull request as ready for review August 27, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants