Remove copilot-preflight script and associated step generation#21016
Merged
Remove copilot-preflight script and associated step generation#21016
Conversation
…pile Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
pelikhan
March 15, 2026 02:30
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the Copilot pre-flight diagnostic step (and its shell script) so Copilot execution is generated as a single GitHub Actions step, and updates tests/fixtures/workflow locks accordingly.
Changes:
- Removed
generateCopilotPreflightDiagnosticStep()and the preflight step emission from Copilot execution step generation. - Deleted the
copilot_preflight_diagnostic.shscript and removed the preflight step from WASM golden fixtures and workflow lock files. - Updated tests to expect a single Copilot execution step and adjusted helper(s) and indices accordingly.
Reviewed changes
Copilot reviewed 91 out of 91 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/copilot_engine_execution.go | Removes preflight step generation/call site so Copilot emits only the execution step. |
| actions/setup/sh/copilot_preflight_diagnostic.sh | Deletes the preflight diagnostic script that is no longer referenced. |
| pkg/workflow/copilot_engine_test.go | Updates unit tests to assert a single Copilot execution step and adjusts indexing. |
| pkg/workflow/enable_api_proxy_test.go | Replaces the 2-step helper with a 1-step requireCopilotExecutionStep helper and updates Copilot test usage. |
| pkg/workflow/engine_agent_import_test.go | Updates expectations/indexing from 2 Copilot steps to 1. |
| pkg/workflow/firewall_args_test.go | Updates helper usage to retrieve the single Copilot execution step. |
| pkg/workflow/firewall_blocked_domains_test.go | Updates helper usage to retrieve the single Copilot execution step. |
| pkg/workflow/firewall_log_level_test.go | Updates helper usage to retrieve the single Copilot execution step. |
| pkg/workflow/gh_cli_mount_test.go | Updates helper usage to retrieve the single Copilot execution step. |
| pkg/workflow/mcp_scripts_firewall_test.go | Updates helper usage to retrieve the single Copilot execution step. |
| pkg/workflow/sandbox_mounts_test.go | Updates indexing to read the Copilot execution step at steps[0]. |
| pkg/workflow/tools_timeout_test.go | Updates indexing to read the Copilot execution step at steps[0]. |
| pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/basic-copilot.golden | Removes the preflight step block from the golden workflow fixture. |
| pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/smoke-copilot.golden | Removes the preflight step block from the golden workflow fixture. |
| pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/with-imports.golden | Removes the preflight step block from the golden workflow fixture. |
| .github/workflows/ace-editor.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/agent-persona-explorer.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/bot-detection.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/chroma-issue-indexer.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/ci-doctor.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/code-simplifier.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/contribution-check.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/constraint-solving-potd.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/daily-cli-tools-tester.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/daily-firewall-report.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/daily-performance-summary.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/daily-regulatory.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/daily-semgrep-scan.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/daily-team-status.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/dependabot-burner.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/dependabot-go-checker.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/example-permissions-warning.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/firewall.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/functional-pragmatist.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/github-remote-mcp-auth-test.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/glossary-maintainer.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/gpclean.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/grumpy-reviewer.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/hourly-ci-cleaner.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/issue-monster.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/issue-triage-agent.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/jsweep.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/layout-spec-maintainer.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/mcp-inspector.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/mergefest.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/metrics-collector.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/notion-issue-summary.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/org-health-report.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/pdf-summary.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/plan.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/poem-bot.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/portfolio-analyst.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/pr-nitpick-reviewer.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/pr-triage-agent.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/python-data-charts.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/q.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/refiner.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/release.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/repo-audit-analyzer.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/repo-tree-map.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/repository-quality-improver.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/research.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/security-compliance.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/security-review.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/slide-deck-maintainer.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/smoke-copilot-arm.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/smoke-copilot.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/smoke-multi-pr.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/smoke-project.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/smoke-temporary-id.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/smoke-test-tools.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/smoke-workflow-call-with-inputs.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/smoke-workflow-call.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/stale-repo-identifier.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/sub-issue-closer.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/super-linter.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/technical-doc-writer.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/terminal-stylist.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/test-dispatcher.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/test-project-url-default.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/test-workflow.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/tidy.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/ubuntu-image-analyzer.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/video-analyzer.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/weekly-editors-health-check.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/weekly-issue-summary.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/weekly-safe-outputs-spec-review.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/workflow-generator.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/workflow-health-manager.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/workflow-normalizer.lock.yml | Removes the preflight step from the compiled workflow lock. |
| .github/workflows/workflow-skill-extractor.lock.yml | Removes the preflight step from the compiled workflow lock. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
309
to
+316
| // Get execution steps | ||
| executionSteps := engine.GetExecutionSteps(workflowData, "/tmp/test.log") | ||
| if len(executionSteps) < 2 { | ||
| t.Fatal("Expected at least 2 execution steps (preflight + execution)") | ||
| if len(executionSteps) < 1 { | ||
| t.Fatal("Expected at least 1 execution step") | ||
| } | ||
|
|
||
| // Get the execution step (second step, after preflight) | ||
| stepContent := strings.Join([]string(executionSteps[1]), "\n") | ||
| // Get the execution step | ||
| stepContent := strings.Join([]string(executionSteps[0]), "\n") |
Comment on lines
264
to
272
| engine := NewCopilotEngine() | ||
| steps := engine.GetExecutionSteps(workflowData, "test.log") | ||
|
|
||
| if len(steps) < 2 { | ||
| t.Fatal("Expected at least 2 execution steps (preflight + execution)") | ||
| if len(steps) < 1 { | ||
| t.Fatal("Expected at least 1 execution step") | ||
| } | ||
|
|
||
| stepContent := strings.Join(steps[1], "\n") | ||
| stepContent := strings.Join(steps[0], "\n") | ||
|
|
This was referenced Mar 15, 2026
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.
Removes the Copilot pre-flight diagnostic step that ran before Copilot CLI execution to check licensing/token validity and GHES configuration. This step is no longer needed.
Changes
copilot_engine_execution.go— removedgenerateCopilotPreflightDiagnosticStep()and its call site; CopilotGetExecutionStepsnow returns 1 step instead of 2actions/setup/sh/copilot_preflight_diagnostic.sh— deletedTestCopilotPreflightDiagnosticStep, replacedrequireCopilotPreflightAndExecutionSteps(2-step helper) withrequireCopilotExecutionStep(1-step), updated allsteps[1]→steps[0]andlen == 2→len == 1across 9 test files