Preserve GitHub access repair guidance for MCP callers (#19655)

Return GitHub permission denials as failed MCP tool results with trusted,
connection-specific recovery guidance. Explain the personal-account and
organization App installation boundary without replaying writes or bypassing
provider-content checks. Align the repair steps with the Permissions UI.

Cover enabled model checks and malicious provider failures across direct
calls, connection tests and stored approvals. Repair the CI-exposed synthetic
onboarding environment fixture without weakening cancellation assertions.

Verified 311 targeted tests, six onboarding Playwright tests, server
typecheck, module boundaries, full CI and Apex 5/5 with all threads resolved.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Devin FoleyandPaperclip authored and GitHub committed 2026-11-06 16:32:27 -08:00
1 parent a3eecf1fc9
commit 2a4a001d37
8 files changed
+224 -47

No files matched your search

@@ -39,6 +39,11 @@ describe("GitHub tool access failures", () => {
expect(text).toMatch(/until GitHub access is repaired/);
expect(text).toContain("https://github.com/new");
expect(text).toContain("Refresh access");
expect(text).toContain("Add More Repos on GitHub");
expect(text).toMatch(/personal account/i);
expect(text).toMatch(/organization argument/i);
expect(text).toMatch(/does not.*personal account/i);
expect(text).not.toMatch(/replace.*token|Administration|classic token/i);
}
const other = githubAccessDeniedInstructions("mcp.github:create_issue", "managed");
expect(other).toMatch(/Do not retry/);