fix: trust bot-applied labels on entrius/* mirror repos (#911) - #913
Merged
anderdc merged 6 commits intoMay 1, 2026
Conversation
Adds trusted_label_pipeline flag to RepositoryConfig and threads it through mirror label resolution so the entrius agentic-maintainer labeling worker (actor_association=NULL since it has no contributor_repo_roles row) can set scoring labels on entrius/* repos. Default-off keeps the maintainer-association gate in place for community repos that run attacker-controllable auto-labelers.
…lper - Restore additional_acceptable_branches dropped during rebase (jupyterlab, FastGPT, monero, nextcloud/desktop, nextcloud/server, zed) — added upstream in entrius#831 and lost when this branch was based on a stale snapshot. - Add entrius/das-github-mirror at weight 0.2 with trusted_label_pipeline (deliverable entrius#4 from issue entrius#911). - Inline _label_actor_trusted into _resolve_maintainer_set_label per the codebase's single-use-helper convention (entrius#818/entrius#811/entrius#801); drop the now-redundant TestLabelActorTrusted truth table since coverage lives in TestLabelResolution end-to-end.
Covered end-to-end by test_calculate_multipliers_threads_trusted_flag, which exercises both flag values plus the multiplier application.
…test - Shorten RepositoryConfig docstring; threat model lives in _resolve_maintainer_set_label so don't restate it. - Drop test_trusted_label_pipeline_explicit_true: only verifies dataclass kwarg passthrough; True path is already covered by the loader test and the live-config invariant on entrius/* repos.
10 tasks
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
Closes #911. Bot-applied scoring labels on
entrius/*mirror repos are dropped at scoring time because the agentic-maintainer labeling worker has no row incontributor_repo_roles, so its label events surface withactor_association=NULLand fail the maintainer-association gate in_resolve_maintainer_set_label.This adds an opt-in
trusted_label_pipelineflag onRepositoryConfigand threads it through mirror label resolution. Default is off, so community repos running attacker-controllable auto-labelers (release-drafter, actions/labeler, etc.) keep the maintainer gate. Flipped on for the four existingentrius/*mirror repos whose labels come from an internal worker.Changes
RepositoryConfig: addtrusted_label_pipeline: bool = Falsewith a docstring spelling out the threat model and when it's safe to flip on.mirror/scoring.py: extract_label_actor_trusted(label, repo_config)helper;_resolve_maintainer_set_labelnow takesrepo_configas a required arg and consults the helper.master_repositories.json: settrusted_label_pipeline: trueonentrius/allways,entrius/allways-ui,entrius/gittensor,entrius/gittensor-ui. No other repo or weight changes._label_actor_trusted(every actor_association × trusted/untrusted), end-to-end check that_calculate_pr_multipliersthreads the flag, and a live-config invariant that any futureentrius/*repo must opt in.Related Issues
Fixes #911
Type of Change
Testing