Skip to content

agentHost: show required checks that never reported on PR artifacts - #347193

Open
Benjamin Christopher Simmonds (benibenj) wants to merge 1 commit into
mainfrom
agents/vscode-automerge-fix-debug
Open

Benjamin Christopher Simmonds (benibenj) wants to merge 1 commit into
mainfrom
agents/vscode-automerge-fix-debug

Conversation

@benibenj

Copy link
Copy Markdown
Contributor

Problem

When a check that the base branch requires never reports on the pull request's head (for example, the PR Gate job was never created for a workflow run), GitHub keeps the merge state BLOCKED. The GitHub pull request artifact built its check list only from reported checks, so it showed every check as passing while "Merge Automatically When Ready" silently waited. The disabled Merge action only gave a generic reason.

Changes

  • pullRequestRequiredChecks.ts: add toMissingRequiredCheck, a placeholder for a required check that has not reported, shown as EXPECTED like GitHub does.
  • githubPullRequestArtifact.ts: getPullRequestArtifactChecks includes missing required checks as pending; add getPullRequestArtifactMissingRequiredChecks.
  • githubPullRequestArtifactIntegration.ts: the disabled Merge action names the missing required checks and suggests rerunning their workflow.

The merge gate is unchanged: merging while GitHub reports BLOCKED would fail anyway.

Testing

  • tsc --project ./src/tsconfig.json --skipLibCheck: passed
  • mocha test/unit/node/index.js --delay --ui=tdd --exit --run src/vs/platform/agentHost/test/common/githubPullRequestArtifact.test.ts --run src/vs/platform/agentHost/test/node/githubPullRequestArtifactIntegration.test.ts --run src/vs/platform/agentHost/test/common/agentMerge.test.ts --run src/vs/platform/github/test/common/pullRequestRequiredChecks.test.ts: 152 passing, including a new test for a required check that never reports
  • eslint on changed files: passed

A required check that never reports on the head (for example a gate job GitHub failed to create) keeps GitHub's merge state BLOCKED, while the artifact showed every check passing and auto-merge silently waited. List such checks as expected/pending and name them in the Merge action's disabled reason.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 9, 2026 21:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the changes that surface missing required checks and clarify why merging is blocked.

No open issues 🎉

What changed in this PR

This PR makes Agent Host pull request artifacts show required checks that never reported, so the check list reflects why GitHub is blocking a merge. Existing merge eligibility rules remain unchanged.

Changes:

  • Add EXPECTED placeholders for missing required checks and display them as pending.
  • Name missing checks in the disabled Merge explanation and suggest rerunning their workflow.
  • Add a regression test covering pending placeholders, missing-check names, and blocked auto-merge.
File Description
src/​vs/​platform/​github/​common/​pullRequestRequiredChecks.ts Adds a placeholder factory for missing required checks.
src/​vs/​platform/​agentHost/​test/​common/​githubPullRequestArtifact.test.ts Tests artifact behavior when a required check never reports.
src/​vs/​platform/​agentHost/​node/​artifactIntegrations/​githubPullRequestArtifactIntegration.ts Adds a specific disabled Merge explanation for missing checks.
src/​vs/​platform/​agentHost/​common/​githubPullRequestArtifact.ts Includes missing checks in the artifact list and exposes their names.

Review effort: Balanced

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants