fix(review): compose additive linked-issue label matches with the exclusive winner - #4417
Merged
Merged
Conversation
…lusive winner resolvePrTypeLabel's propagation loop returned on the FIRST mapping the linked issue's labels satisfied, so an additive mapping (e.g. gittensor:priority, a reward tag meant to coexist with whichever type already applies) was silently unreachable whenever the SAME issue also carried a label an earlier, exclusive mapping (bug/ feature) matched -- the overwhelmingly common case, since our issues routinely carry both a type label and priority together. Priority appeared to work in isolation but was actually being dropped on nearly every real PR. Now collects every satisfied mapping: the first exclusive match still wins the single type-label slot (same bug-vs-feature precedence as before), and every additive match composes alongside it instead of losing to whichever exclusive mapping happened to be checked first in the array. Also flips gittensor:priority's own removeOtherTypeLabels to false (additive) in every config that models it (the repo's own .gittensory.yml + bundled fallback + both public example templates) -- priority is a reward dimension, not a type of its own, so it should never have competed with bug/feature for the same exclusive slot in the first place.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4417 +/- ##
=======================================
Coverage 93.96% 93.97%
=======================================
Files 401 401
Lines 36913 36918 +5
Branches 13497 13499 +2
=======================================
+ Hits 34687 34692 +5
Misses 1570 1570
Partials 656 656
🚀 New features to boost your workflow:
|
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
resolvePrTypeLabel's propagation loop returned on the FIRST mapping the linked issue's labels satisfied, so an ADDITIVE mapping (e.g.gittensor:priority-- a reward tag meant to coexist with whichever type already applies) was silently unreachable whenever the SAME issue also carried a label an earlier, EXCLUSIVE mapping (bug/feature) matched. Sincebug/featureare checked beforepriorityin the mappings array, and our issues routinely carry a type label AND priority together (confirmed live: issue feat(enrichment): detect Mixedbread and Sourcegraph local access tokens #3348 in metagraphed carried bothgittensor:featureandgittensor:priority), priority appeared to work when tested in isolation but was actually being dropped -- and REMOVED, since it's in the same exclusive-cleanup set -- on nearly every real PR. This is the actual root cause behind "priority labels aren't detected/propagating," a live, reproducible bug (screenshot:gittensory-orbrepeatedly stripped a maintainer's manually-appliedgittensor:priority/gittensor:featureand replaced them withgittensor:bugfrom title classification alone).gittensor:priority's ownremoveOtherTypeLabelstofalse(additive) in every config that models it: the repo's own.gittensory.yml, the bundled fallback (src/config/gittensory-repo-focus-manifest.ts), and both public example templates (.gittensory.yml.example,config/examples/gittensory.full.yml). Priority is a reward dimension, not a type of its own -- it should never have competed with bug/feature for the same exclusive slot in the first place.Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
npm run typechecknpm run manifest:drift-check/npm run docs:drift-check— both clean (the repo-root.gittensory.ymland the bundledGITTENSORY_REPO_FOCUS_MANIFEST_YAMLfallback are kept in sync, as required)npx vitest run test/unit/pr-type-label.test.ts test/unit/pr-type-label-engine.test.ts— 74/74 pass. All 18 pre-existingresolvePrTypeLabelcases traced by hand against the new logic and confirmed unaffected; 5 new regression tests added for the actual composition bug (issue carrying bug+priority, feature+priority, priority-alone, multiple additive matches, and two-exclusive-candidates-plus-additive to confirm first-exclusive-still-wins).npx vitest run test/unit/queue.test.ts— full suite, 754/754 pass. One pre-existing integration test's expectations were updated:JSONbored/gittensory's own bundled-manifest fallback now correctly composesgittensor:bug(title) +gittensor:priority(additive) instead of the old exclusive-onlygittensor:priorityalone.npm run actionlint/npm run test:workers/npm run build:mcp/npm run test:mcp-pack/npm run ui:openapi:check/npm run ui:lint/npm run ui:typecheck/npm run ui:build/npm audit— not run locally for this focused change; relying on CI (validate) for the full gate.If any required check was skipped, explain why:
npm run test:cigate is left to CI per the repo's own established practice for this size of change.Safety
UI Evidencesection. — N/A, no UI changes..gittensory.ymlexample templates corrected alongside the code fix, so new self-hosters don't copy the same bug.Notes
gittensory-orbrepeatedly removing a maintainer's manually-appliedgittensor:feature/gittensor:prioritylabels and replacing them withgittensor:bugon PR feat(miner-hands): CLI-subprocess CodingAgentDriver #4531 (metagraphed), whose linked issue feat(enrichment): detect Mixedbread and Sourcegraph local access tokens #3348 carried bothgittensor:featureandgittensor:priority.