Repository navigation
fix(triage): keep the policy's group order when the hub stores a pull request's mail (CL-12197) - #856
Merged
TheGreatAxios merged 2 commits intoNov 5, 2026
Conversation
… request's mail (CL-12197)
Contributor
|
Triage: Pass No changes needed from you. A maintainer will review this pull request. Notes:
|
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
An author belongs to the first policy group they match, in the file's order. The pack held groups as a mapping, and the hub stores each pull request's mail in a jsonb column, which re-sorts keys. A listed maintainer who is a GitHub contributor could then land in
outside: code review was skipped and outsider steps applied.{ name, ...group }[]); the policy file format is unchanged.Verification
apps/hub/src/manager-state.postgres.test.ts: a policy withapproved(users) thenoutside(CONTRIBUTOR) goes through the hub's mail storage; a CONTRIBUTOR listed inapprovedis inapprovedand anoutsidestep does not hold. It failed on main (outside) and passes now.bun run check,bun run lintbun --conditions=intx-src test ./packages/triage-contracts ./packages/triage-workflows ./packages/triage-manager ./tests/model ./tests/policy-corpus: 483 passapps/hubsrc/manager-state.postgres.test.tsandsrc/githubon local Postgres: 106 passDuring a deploy, managers still on the old code fail closed on repositories whose policy defines groups: they report that the policy cannot be read and never assign a wrong group. Mail stored before this change whose policy has two or more groups also fails closed, until Triage runs on the pull request again.
No docs change: what people write and see is unchanged.
Closes CL-12197