fix(github): treat completed third-party action_required checks as failing/manual-hold - #4414
Merged
JSONbored merged 1 commit intoJul 9, 2026
Conversation
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 #4414 +/- ##
=======================================
Coverage 93.96% 93.96%
=======================================
Files 401 401
Lines 36892 36892
Branches 13490 13490
=======================================
Hits 34667 34667
Misses 1569 1569
Partials 656 656
🚀 New features to boost your workflow:
|
JSONbored
deleted the
codex/fix-incorrect-handling-of-action_required-checks
branch
July 9, 2026 11:27
andriypolanski
pushed a commit
to andriypolanski/gittensory
that referenced
this pull request
Jul 9, 2026
…tead of auto-closing (JSONbored#4414) A completed action_required check-run from a third-party app was treated as a hard CI failure regardless of whether it was an actual branch-protection required context. Superagent posts "Contributor trust" alongside its own required "Superagent Security Scan" check, but "Contributor trust" itself is never required -- so real contributor PRs were auto-closed on a signal branch protection never asked for. reduceLiveCiAggregate now only hard-fails a third-party action_required check when isRequired() confirms it's an actual required context. A non-required one is routed to the existing nonRequiredFailingDetails bucket instead -- never flipping ciState/blocking merge, but still rendered under its own "Flagged checks (non-blocking)" section in the PR comment so it's never silently dropped either.
This was referenced Jul 10, 2026
JSONbored
added a commit
that referenced
this pull request
Jul 10, 2026
…ng PRs on repos with no branch protection (#4735) (#4736) reduceLiveCiAggregate gated a third-party app's own action_required verdict (e.g. Superagent's advisory-only "Contributor trust" check) on isRequired(name), which defaults to true for every check name whenever a repo has NO branch-protection required-status-checks configured at all (enforceRequiredOnly false). That silently reopened #4414 for any such repo: confirmed live, JSONbored/metagraphed's required_status_checks .contexts is [], and PR #4812 there was auto-closed this morning with the literal reason "CI is failing (Contributor trust)" despite every real CI check green and the review panel's own gate result correctly reading "Advisory; not blocking". Adds isConfirmedRequired (enforceRequiredOnly && requiredContexts.has), the deliberate opposite default from isRequired, and uses it only for this one branch. isRequired() itself is untouched -- a genuine CI failure should still fail closed when required-ness is unconfirmed; a third-party app's advisory opinion should not.
6 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.
Motivation
conclusion === "action_required"as non-blocking/passing, allowing the agent to auto-approve and auto-merge PRs even when an external app requested human action.github-actionswhile treating completed third-partyaction_requiredverdicts as adverse/manual-hold signals so they cannot be bypassed by auto-maintain logic.Description
src/github/backfill.ts: addisThirdPartyActionRequiredFailureand treat a completed non-github-actionsaction_requiredcheck-run as a failing/manual-hold result by pushing it intofailingDetailsinstead of letting it count as passing or pending.github-actionsspecial-case so an Actions workflow awaiting "Approve and run" remains pending.CI_FAILING_CONCLUSIONSto reflect the new semantics for third-party tools.test/unit/backfill.test.tsto expectciState === "failed"and a correspondingfailingDetailsentry for a completed third-partyaction_requiredcheck (the test previously assertedpassed).Testing
npx vitest run test/unit/backfill.test.ts -t "action_required" --reporter=dot, which executed the targeted regression tests for the changed behavior and they passed.npm run typecheckwhich completed successfully.git diff --checkwhich reported no whitespace/conflict issues.npx vitest run test/unit/backfill.test.ts --reporter=dotin this environment hit unrelated timing failures (two existing tests timed out) that are not related to the change; those environment timeouts should be re-run in CI or locally with increased test timeout if needed.Codex Task