fix(review): assign the PR's linked issues, not just the PR itself - #4412
Merged
Conversation
gittensor:priority propagation (resolveIssueLabelsForPropagation, linked-issue-label-propagation-fetch.ts) requires the PR author to be the linked issue's own author OR an assignee of it -- deliberately stricter than bug/feature, which trust a maintainer-authored issue without formal assignment. The existing auto-assign action (#3182) only ever assigned the PR's opening contributor to the PR itself, never to the issue(s) it closes. Since our issues are almost always opened for open pickup and rarely formally assigned, a contributor picking one up could never actually satisfy the assignee check -- so gittensor:priority could never propagate to a contributor's PR in practice, even when the linked issue clearly carried it. Extends the assign action to also best-effort assign the same login to each linked issue (capped at 10), reusing the same GitHub issues-assignee endpoint the PR-assign call already hits. This makes the existing, already-reviewed "author or assignee" ownership check actually satisfiable for the real-world open-pickup workflow it was designed for, without loosening it.
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 #4412 +/- ##
=======================================
Coverage 93.96% 93.96%
=======================================
Files 401 401
Lines 36902 36909 +7
Branches 13494 13496 +2
=======================================
+ Hits 34676 34683 +7
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
gittensor:prioritypropagation (resolveIssueLabelsForPropagation,linked-issue-label-propagation-fetch.ts) requires the PR author to be the linked issue's own author OR a GitHub assignee of it -- deliberately stricter thangittensor:bug/gittensor:feature, which trust a maintainer-authored issue (trustMaintainerAuthoredIssue: true) without formal assignment, since priority is the scarce, maintainer-hand-picked reward label./issues/{number}/assigneesREST endpoint.gittensory-repo-focus-manifest.tssays this explicitly), a contributor who picks one up and opens a PR against it could never actually satisfy the assignee check -- sogittensor:prioritycould never propagate to a contributor's PR in practice, even when the linked issue clearly carried the label.gittensor:bug/gittensor:featureworked fine (they don't need the assignee check at all), which is exactly the asymmetry reported.assignaction to also best-effort assign the same login to each linked issue (capped at 10 --ASSIGN_LINKED_ISSUES_MAX, since a PR overwhelmingly closes 1-3 issues), reusingensurePullRequestAssigneeas-is (it already hits the generic issues-assignee endpoint; only the issue number passed differs). Each issue's assignment is independent and best-effort, so one failing write never affects another issue's assignment or the PR-assign outcome. This makes the existing, already-reviewed "author or assignee" ownership check actually satisfiable for the real-world open-pickup workflow it was designed for, without loosening the check itself.Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
npm run typechecknpx vitest run test/unit/agent-actions.test.ts test/unit/agent-action-executor.test.ts test/unit/agent-approval-queue.test.ts test/unit/queue.test.ts— 1258/1258 pass, including new planner tests (linkedIssues threaded/absent/empty/capped), new executor tests (assigns each linked issue, one failure doesn't affect others, no-linkedIssues means no extra calls), and a round-trip test through the approval-queue'sactionParams/pendingActionToPlanned.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. Confirmed via grep thatAgentPendingActionParams(the type this PR extends) is not exposed via OpenAPI, so noui:openapiregeneration is needed.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.Notes
gittensor:prioritywasn't propagating to contributor PRs the waygittensor:bug/gittensor:featurereliably do.