Commit 5c703c5
Add priority-based impact reason ordering
Summary:
btd v1 checks change reasons in priority order (Inputs > Labels > Hash >
CiSrcs > Package > Rule) in a single pass, so the highest-priority reason
wins. btd v2 discovers changes in two phases — graph update finds
Labels/Hash/Rule first, then owners query finds Inputs later. With
first-writer-wins in record_impact, Hash was winning over Inputs.
This adds priority() to RootImpactKind and makes record_impact override
lower-priority reasons with higher-priority ones. Now when the owners query
finds a target already marked as Hash, it overrides with Inputs, matching
v1's attribution.
Also fixes deduplicate_target_categories to remove targets from
non_recursive_targets when they also appear in recursive_targets (e.g.
Labels overridden by Inputs changes non-recursive to recursive).
Reviewed By: aniketmathur
Differential Revision: D93274880
fbshipit-source-id: b0bb6a0f66b5c90fe62c4c519dd52a7ef01dafc11 parent 6c6bd42 commit 5c703c5
1 file changed
+14
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
251 | 265 | | |
252 | 266 | | |
253 | 267 | | |
| |||
0 commit comments