Skip to content

Fix: Disable container validation by default, require --validate flag - #2550

Merged
pelikhan merged 3 commits into
mainfrom
copilot/validate-docker-images-flag
Oct 26, 2025
Merged

Fix: Disable container validation by default, require --validate flag#2550
pelikhan merged 3 commits into
mainfrom
copilot/validate-docker-images-flag

Conversation

CopilotAI commented Oct 26, 2025

Copy link
Copy Markdown
Contributor

Container image validation was running by default and displaying validation messages when using --verbose, contrary to the intended behavior where validation should only occur with the --validate flag.

Change

Set --validate flag default from true to false in cmd/gh-aw/main.go:

// BeforecompileCmd.Flags().Bool("validate", true, "Enable GitHub Actions workflow schema validation (default: true)")
// After compileCmd.Flags().Bool("validate", false, "Enable GitHub Actions workflow schema validation and container image validation")

Behavior

  • Without --validate: Schema and container validation skipped (no validation messages)
  • With --validate: Full validation runs, messages shown when --verbose enabled
Original prompt

In the "compile" command, validate the docker images ONLY when the --validate flag is enabled. Without default, those images are not validated.

ℹ ✓ Container image validated: mcp/ast-grep:latest

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

CopilotAI self-assigned this Oct 26, 2025
…ainer validation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
CopilotAI changed the title [WIP] Validate docker images when --validate flag is enabledFix: Disable container validation by default, require --validate flagOct 26, 2025
CopilotAI requested a review from pelikhanOctober 26, 2025 14:01
@pelikhan
pelikhan marked this pull request as ready for review October 26, 2025 15:48
CopilotAI review requested due to automatic review settings October 26, 2025 15:48

CopilotAI 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.

Pull Request Overview

This PR fixes the unintended default behavior where container image validation was running automatically. The change ensures validation (both schema and container image) only occurs when explicitly requested via the --validate flag.

Key Changes:

  • Changed default value of --validate flag from true to false
  • Updated flag description to clarify it controls both schema and container image validation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

Copy link
Copy Markdown
Contributor

Agentic Changeset Generator triggered by this pull request.

@pelikhan
pelikhan merged commit e235e78 into mainOct 26, 2025
4 checks passed
@pelikhan
pelikhan deleted the copilot/validate-docker-images-flag branch October 26, 2025 15:53
github-actionsBot added a commit that referenced this pull request Oct 27, 2025
Update documentation to reflect recent CLI changes:
- Document init command's new workflow creation guidance
- Clarify --validate flag behavior (disabled by default)
- Reorganize workflow creation section for better clarity
Changes based on:
- PR #2567: Init command now guides users to activate create-agentic-workflow prompt
- PR #2550: --validate flag now defaults to false for faster compilation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
@github-actionsgithub-actionsBot mentioned this pull request Mar 30, 2026
Sign up for freeto 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

@pelikhan