Detect MCP policy errors and surface actionable guidance in failure issues#25819
Detect MCP policy errors and surface actionable guidance in failure issues#25819
Conversation
…ure issues Add detection for "MCP servers were blocked by policy:" errors from Copilot CLI. This is a persistent enterprise/org policy issue that should not be retried. Changes: - copilot_driver.cjs: detect MCP policy errors and skip retry - detect_mcp_policy_error.sh: agent job detection script - mcp_policy_error.md: actionable error template with progressive disclosure - copilot_engine_execution.go: add detection step generation - compiler_main_job.go: add mcp_policy_error output - notify_comment.go: wire GH_AW_MCP_POLICY_ERROR to conclusion job - handle_agent_failure.cjs: add buildMCPPolicyErrorContext function - agent_failure_comment.md/agent_failure_issue.md: add placeholder - Tests for all new code paths Agent-Logs-Url: https://github.com/github/gh-aw/sessions/421e0187-731d-47df-a0e5-ba405a044c59 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Merge logic of inference_access_error and MCP policy error bash scripts into the copilot driver javasceipt. Remove the steps with bash scripts. @copilot |
|
@copilot merge Merge the logic of inference_access_error and MCP policy error bash scripts as a single step in JavaScript (not shell) |
… into single JS step Replace two separate bash scripts (detect_inference_access_error.sh, detect_mcp_policy_error.sh) with a single JavaScript file (detect_copilot_errors.cjs) that scans the agent log for both error patterns and sets both outputs in one step. Go changes: - Replace generateInferenceAccessErrorDetectionStep() and generateMCPPolicyErrorDetectionStep() with single generateCopilotErrorDetectionStep() - Update step ID references: detect-inference-error/detect-mcp-policy-error → detect-copilot-errors - Update job output expressions to reference new unified step Removed: - actions/setup/sh/detect_inference_access_error.sh - actions/setup/sh/detect_mcp_policy_error.sh Agent-Logs-Url: https://github.com/github/gh-aw/sessions/8c007043-8759-4254-8090-c1d69df68878 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 33046f0. Merged both Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
This PR improves Copilot-engine workflow failure handling by detecting MCP policy blocks and inference-access failures in a single step, surfacing actionable remediation guidance, and avoiding wasteful retries when the failure is a persistent policy configuration.
Changes:
- Add MCP policy blocked detection to the Copilot CLI driver and skip resume retries for that error class.
- Replace per-error bash detection with a unified Node-based
detect-copilot-errorsstep that sets bothinference_access_errorandmcp_policy_erroroutputs. - Propagate
mcp_policy_errorinto the conclusion job and include a new failure context template in failure issues/comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/testdata/wasm_golden/WasmBinary/with-imports.golden | Updates generated workflow fixture to use unified Copilot error detection step + outputs. |
| pkg/workflow/testdata/wasm_golden/WasmBinary/basic-copilot.golden | Updates generated workflow fixture to use unified Copilot error detection step + outputs. |
| pkg/workflow/testdata/TestWasmGolden_CompileFixtures/with-imports.golden | Updates compile-fixture golden to include unified detection outputs and step. |
| pkg/workflow/testdata/TestWasmGolden_CompileFixtures/smoke-copilot.golden | Updates smoke-fixture golden to include unified detection outputs and step. |
| pkg/workflow/testdata/TestWasmGolden_CompileFixtures/basic-copilot.golden | Updates compile-fixture golden to include unified detection outputs and step. |
| pkg/workflow/notify_comment.go | Passes mcp_policy_error from agent job outputs into conclusion job env for Copilot engine. |
| pkg/workflow/mcp_policy_error_test.go | Adds Go tests asserting unified detection step presence and env wiring for Copilot engine only. |
| pkg/workflow/inference_access_error_test.go | Updates existing Go tests to assert unified detection step and updated output wiring. |
| pkg/workflow/copilot_engine_execution.go | Replaces inference-only detection step generator with unified Copilot error detection step. |
| pkg/workflow/compiler_yaml_main_job.go | Emits unified Copilot error detection step for Copilot engine workflows. |
| pkg/workflow/compiler_main_job.go | Adds mcp_policy_error (and updates inference output) to main job outputs for Copilot engine. |
| actions/setup/sh/detect_inference_access_error.sh | Removes legacy bash-based inference access error detector script. |
| actions/setup/md/mcp_policy_error.md | Adds a new failure-context template describing MCP policy blocks and remediation steps. |
| actions/setup/md/agent_failure_issue.md | Includes {mcp_policy_error_context} in failure issue template interpolation. |
| actions/setup/md/agent_failure_comment.md | Includes {mcp_policy_error_context} in failure comment template interpolation. |
| actions/setup/js/handle_agent_failure.test.cjs | Adds unit tests for building MCP policy error context (template + fallback behavior). |
| actions/setup/js/handle_agent_failure.cjs | Adds MCP policy error context builder and wires it into failure issue/comment rendering. |
| actions/setup/js/detect_copilot_errors.test.cjs | Adds unit tests for unified Copilot error log pattern matching and combined detection results. |
| actions/setup/js/detect_copilot_errors.cjs | Adds unified detector that scans agent-stdio.log and sets both error outputs. |
| actions/setup/js/copilot_driver.test.cjs | Adds tests validating MCP policy blocked pattern and that it prevents retries. |
| actions/setup/js/copilot_driver.cjs | Detects MCP policy blocks and breaks out of retry loop immediately with logging. |
| .github/workflows/workflow-skill-extractor.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/workflow-normalizer.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/workflow-health-manager.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/workflow-generator.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/weekly-safe-outputs-spec-review.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/weekly-issue-summary.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/weekly-editors-health-check.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/weekly-blog-post-writer.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/video-analyzer.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/update-astro.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/ubuntu-image-analyzer.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/tidy.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/test-workflow.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/test-quality-sentinel.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/test-project-url-default.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/test-dispatcher.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/terminal-stylist.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/technical-doc-writer.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/super-linter.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/sub-issue-closer.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/stale-repo-identifier.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/smoke-workflow-call.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/smoke-workflow-call-with-inputs.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/smoke-update-cross-repo-pr.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/smoke-test-tools.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/smoke-temporary-id.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/smoke-service-ports.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/smoke-project.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/smoke-multi-pr.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/smoke-create-cross-repo-pr.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/smoke-copilot.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/smoke-copilot-arm.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/slide-deck-maintainer.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/security-review.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/security-compliance.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/research.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/repository-quality-improver.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/repo-tree-map.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/repo-audit-analyzer.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/release.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/refiner.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/refactoring-cadence.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/q.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/python-data-charts.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/pr-triage-agent.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/pr-nitpick-reviewer.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/portfolio-analyst.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/poem-bot.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/plan.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/pdf-summary.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/org-health-report.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/notion-issue-summary.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/metrics-collector.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/mergefest.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/mcp-inspector.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/layout-spec-maintainer.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/jsweep.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/issue-triage-agent.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/issue-monster.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/gpclean.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/glossary-maintainer.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/github-remote-mcp-auth-test.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/functional-pragmatist.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/firewall.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/firewall-escape.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/example-permissions-warning.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/draft-pr-cleanup.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/docs-noob-tester.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/discussion-task-miner.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/dictation-prompt.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/dev.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/dev-hawk.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/dependabot-go-checker.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/dependabot-burner.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/delight.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/dead-code-remover.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-workflow-updater.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-testify-uber-super-expert.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-team-status.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-syntax-error-quality.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-semgrep-scan.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-secrets-analysis.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-safe-output-integrator.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-repo-chronicle.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-regulatory.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-performance-summary.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-news.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-mcp-concurrency-analysis.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-malicious-code-scan.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-issues-report.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-integrity-analysis.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-firewall-report.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-file-diet.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-compiler-quality.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-community-attribution.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-cli-tools-tester.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-cli-performance.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-assign-issue-to-user.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/daily-architecture-diagram.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/craft.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/copilot-token-optimizer.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/copilot-token-audit.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/copilot-pr-prompt-analysis.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/copilot-pr-nlp-analysis.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/copilot-pr-merged-report.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/copilot-cli-deep-research.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/contribution-check.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/constraint-solving-potd.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/code-simplifier.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/code-scanning-fixer.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/cli-consistency-checker.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/ci-coach.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/breaking-change-checker.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/brave.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/bot-detection.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/auto-triage-issues.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/artifacts-summary.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/architecture-guardian.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/archie.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/agentic-observability-kit.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/agent-persona-explorer.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/agent-performance-analyzer.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
| .github/workflows/ace-editor.lock.yml | Updates workflow lock to use detect-copilot-errors outputs/step and pass MCP policy error into conclusion env. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 145/145 changed files
- Comments generated: 0
Generated by Design Decision Gate workflow for PR #25819. Captures the decision to consolidate inference_access_error and mcp_policy_error detection into a single JavaScript step and to skip retries for persistent MCP policy configuration errors.
|
Commit pushed:
|
🏗️ Design Decision Gate — ADR RequiredThis PR makes significant changes to core business logic ( AI has analyzed the PR diff and generated a draft ADR to help you get started: 📄 Draft ADR: The draft captures three interlocked design decisions found in the diff:
What to do next
Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision. Why ADRs Matter
ADRs create a searchable, permanent record of why the codebase looks the way it does. Future contributors (and your future self) will thank you. 📋 Michael Nygard ADR Format ReferenceAn ADR must contain these four sections to be considered complete:
All ADRs are stored in
|
There was a problem hiding this comment.
This PR requires an Architecture Decision Record (ADR) before it can merge. The PR adds 239 new lines of code in pkg/ (core business logic) and makes three significant design decisions — consolidating two bash detection scripts into a single JavaScript step, choosing Node.js over bash for log-scanning, and introducing an explicit no-retry policy for MCP policy errors — none of which are documented.
A draft ADR has been generated and committed to your branch at docs/adr/25819-unified-copilot-error-detection-step.md. Please review, complete, and link it in the PR body. See the comment above for instructions.
🧪 Test Quality Sentinel ReportTest Quality Score: 72/100
Test Classification Details📋 All 27 tests (click to expand)
Flagged Tests — Requires Review
|
There was a problem hiding this comment.
✅ Test Quality Sentinel: 72/100. Test quality is acceptable — 7.4% of new tests are implementation tests (threshold: 30%). Two non-blocking suggestions posted in the comment above: de-duplicate the MCP pattern tests in copilot_driver.test.cjs that shadow detect_copilot_errors.test.cjs, and have the retry-logic tests import from the real production module rather than an inlined copy.
|
@copilot review all comments |
The 3 inline review comments from |
On GHE instances, Copilot CLI blocks MCP servers when the "MCP servers in Copilot" enterprise/org policy is disabled, producing
! 2 MCP servers were blocked by policy: 'github', 'safeoutputs'. The agent runs without tools (wasting tokens) and the user gets no actionable feedback.Driver: skip retry for policy errors
Policy errors are persistent configuration issues — retrying is wasteful.
MCP_POLICY_BLOCKED_PATTERNincopilot_driver.cjsUnified error detection step (replaces separate bash scripts)
Both
inference_access_errorandmcp_policy_errordetection are now handled by a single JavaScript step instead of two separate bash scripts:detect_copilot_errors.cjs— scansagent-stdio.logfor both inference access errors and MCP policy errors, sets both outputs in one stepgenerateCopilotErrorDetectionStep()in Go — emits a singledetect-copilot-errorsstep for Copilot engine only (replacesgenerateInferenceAccessErrorDetectionStep()+generateMCPPolicyErrorDetectionStep())inference_access_errorandmcp_policy_erroroutputs wired from agent job → conclusion job env varsRemoved:
detect_inference_access_error.shdetect_mcp_policy_error.shFailure issue/comment context
buildMCPPolicyErrorContext()inhandle_agent_failure.cjs— reads template, falls back to inline messagemcp_policy_error.mdtemplate with progressive disclosure:Tests
mcp_policy_error_test.go+inference_access_error_test.go— unified detection step present, outputs wired, excluded from non-Copilot enginesdetect_copilot_errors.test.cjs— pattern matching for both error types, combined detectionbuildMCPPolicyErrorContextwith/without template