Repository navigation
Have the built-in policy pick one of two competing labels, not both or neither - #241
Merged
Merged
Conversation
…r neither "Add every repository label the item strongly supports" put both `bug` and `enhancement` on pull requests that sit between the two, and on a close call Haiku sometimes added neither. One added line says an item takes only one of the labels that their names and descriptions make alternatives to each other: the best fit, even when the choice is close.
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.
Why
On Haiku, the built-in policy got two label decisions wrong, both on pull requests that sit between two labels such as
bugandenhancement:139("Center the block page") gotenhancementandbug, because its body has a "Fix:" section. "Add every repository label…" (AutoTriage224) asks for every label with strong support and says nothing about labels that compete.143("Make Go back a real history step so Forward returns to the block page") got nothing. Its summary said "The PR is a bug fix, but it is not clearly a report of something not working… The evidence is not clear enough to add 'bug' or 'enhancement' with confidence". Being unsure which of two labels fits better became a reason to add neither.What
One line is added to the built-in policy, right after "Add every repository label…":
Measurements
These are dry replays on
claude-haiku-5-5: 846 calls, nothing written to GitHub. Each item was rebuilt as the bot first saw it, with its labels, title, body and timeline as of that moment, and run through the action's own prompts, schema and client. "Old" is the policy onmain.Both labels
139, 20 runsbugandenhancementin 16enhancementalone in 20148, 20 runsenhancementalone in 10bug12,enhancement8)No label
Teichos
143itself didn't reproduce. Old and new both addbugin 40 of 40 runs, 20 of them on the production run's saved prompt, so that miss was a rare one.The same miss does show up across 20 pull requests that the bot labeled
bugorenhancementand the owner kept, from Teichos, DesktopClock, Network-Monitor, RadialActions, SentryDeck and Nuntia, at 8 runs each:The old misses read like the production one. On DesktopClock
192: "The bug and enhancement labels both plausibly fit, but neither is clearly justified over the other".Labels that are right today
documentation,dependencies), 3 runs each: 50 of 51 as kept before, where the odd one added both labels to DesktopClock178, and 51 of 51 after.146, which the owner had already labeled: nothing added in 20 of 20, before and after.Three Nuntia pull requests are left out. Their kept label is
github_actions, which is archived now, so neither policy can add it.A second variant also shortened the last line to "If no new label fits…". It fixed the same items but labeled more of the 14 unlabeled ones, with nothing added in only 16 of 42, so it isn't in this PR.
Verification
npm run verifypasses, with 331 tests.mainonly by the added sentence, which is the wording that was measured.Risk
142, which gotbugin 3 of 8 runs where the owner keptenhancement.148kept both labels and now gets one. A repository that wants both can say so in the labels' descriptions, but that wasn't measured.