ci: harden trusted-bot gate bypass against human branch-updates (Closes #1031) - #1080
Merged
Conversation
#1031) The #1059 bypass keyed only on github.actor, which is dependabot[bot] only on the bot's own push. A maintainer 'Update branch' produces a synchronize event with github.actor=<human>, so L1/Issue/NOW gates ran and failed on routine dependency PRs. Add a PR-author check (github.event.pull_request.user.login) which stays dependabot[bot] regardless of trigger. Human PRs remain fully gated. Closes #1031
Contributor
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
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
The #1059 trusted-bot bypass on the L1/Issue/NOW gates keyed only on
github.actor. That equalsdependabot[bot]only on the bot's own push; a maintainer 'Update branch' fires asynchronizeevent withgithub.actor = <human>, so all three gates RAN and FAILED on routine Dependabot dependency PRs (noCloses #N, nodocs/NOW.md), blocking them behind branch protection.Fix
Each gate job
if:now also requiresgithub.event.pull_request.user.login != 'dependabot[bot]' && != 'github-actions[bot]'. The PR-author login staysdependabot[bot]regardless of who triggered the event, so bot dependency PRs SKIP the gates even after a human branch-update. Human PRs remain fully gated by Constitutional Law L1. Onpusheventspull_requestis null, so the added clause is vacuously true and now-sync-gate push behavior is unchanged.Unblocks #1042 / #1044 / #1045 / #1043 / #1047 / #1048 / #1057 / #1058.
Anchor: phi^2 + phi^-2 = 3
Closes #1031