Skip to content

Remove copilot-preflight script and associated step generation#21016

Merged
pelikhan merged 2 commits intomainfrom
copilot/remove-copilot-preflight-script
Mar 15, 2026
Merged

Remove copilot-preflight script and associated step generation#21016
pelikhan merged 2 commits intomainfrom
copilot/remove-copilot-preflight-script

Conversation

Copy link
Contributor

Copilot AI commented Mar 15, 2026

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 — removed generateCopilotPreflightDiagnosticStep() and its call site; Copilot GetExecutionSteps now returns 1 step instead of 2
  • actions/setup/sh/copilot_preflight_diagnostic.sh — deleted
  • Tests — removed TestCopilotPreflightDiagnosticStep, replaced requireCopilotPreflightAndExecutionSteps (2-step helper) with requireCopilotExecutionStep (1-step), updated all steps[1]steps[0] and len == 2len == 1 across 9 test files
  • Golden files — removed preflight step block from 3 WASM golden fixtures
  • Lock files — recompiled all 173 workflows

Copilot AI and others added 2 commits March 15, 2026 02:05
…pile

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review March 15, 2026 02:30
Copilot AI review requested due to automatic review settings March 15, 2026 02:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.sh script 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")

@pelikhan pelikhan merged commit 1cb4a5a into main Mar 15, 2026
87 of 88 checks passed
@pelikhan pelikhan deleted the copilot/remove-copilot-preflight-script branch March 15, 2026 02:34
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.

3 participants