Summary
Add three feature flags that allow per-workflow version overrides for testing purposes. These enable smoke-testing new releases of the Copilot CLI, MCP gateway, and AWF firewall before bumping the pinned defaults in version_constants.go.
Feature Flags
1. latest-copilot: true
Override the pinned Copilot CLI version (DefaultCopilotVersion, currently 1.0.21) and install the latest version instead.
features:
latest-copilot: true
Compiler behavior:
- When enabled, the Copilot CLI npm install step should use
@latest instead of the pinned version from DefaultCopilotVersion
- Affects
copilot_engine.go → GetInstallationSteps()
- Constant:
LatestCopilotFeatureFlag FeatureFlag = "latest-copilot"
2. mcpg-version: <string>
Override the default MCP gateway version (DefaultMCPGatewayVersion, currently v0.2.26).
features:
mcpg-version: "v0.2.27"
Compiler behavior:
- When set, use the specified version for the
ghcr.io/github/gh-aw-mcpg Docker image tag instead of DefaultMCPGatewayVersion
- Requires reading the string value (not just boolean) from the features map
- Constant:
MCPGVersionFeatureFlag FeatureFlag = "mcpg-version"
3. firewall-version: <string>
Override the default AWF firewall version (DefaultFirewallVersion, currently v0.25.26).
features:
firewall-version: "v0.25.27"
Compiler behavior:
- When set, use the specified version for all three firewall container images (
agent, api-proxy, squid) instead of DefaultFirewallVersion
- Constant:
FirewallVersionFeatureFlag FeatureFlag = "firewall-version"
Implementation Notes
The feature flag system (pkg/workflow/features.go) already supports string values — isFeatureEnabled checks for non-empty strings. A new helper like getFeatureValue(flag, workflowData) string could extract the string value for the version overrides.
Files to modify
pkg/constants/feature_constants.go — add three new constants
pkg/workflow/features.go — add getFeatureValue() helper for string-valued flags
pkg/workflow/copilot_engine.go — check latest-copilot in GetInstallationSteps()
pkg/workflow/docker.go or pkg/workflow/awf_helpers.go — check firewall-version when building AWF command
pkg/workflow/mcp_setup_generator.go or pkg/workflow/mcp_renderer.go — check mcpg-version when selecting gateway image tag
Example smoke test workflow
---
engine: copilot
features:
latest-copilot: true
mcpg-version: "v0.2.27"
firewall-version: "v0.25.27"
tools:
github:
toolsets: [repos]
---
Use Case
These flags enable a pre-bump testing workflow:
- Create a smoke test workflow with the version override feature flag
- Run it to verify the new version works in the AWF sandbox
- If it passes, bump the default in
version_constants.go
- Remove the feature flag from the smoke test
This avoids the current pattern of bumping defaults blindly and discovering breakage across all workflows.
Summary
Add three feature flags that allow per-workflow version overrides for testing purposes. These enable smoke-testing new releases of the Copilot CLI, MCP gateway, and AWF firewall before bumping the pinned defaults in
version_constants.go.Feature Flags
1.
latest-copilot: trueOverride the pinned Copilot CLI version (
DefaultCopilotVersion, currently1.0.21) and install the latest version instead.Compiler behavior:
@latestinstead of the pinned version fromDefaultCopilotVersioncopilot_engine.go→GetInstallationSteps()LatestCopilotFeatureFlag FeatureFlag = "latest-copilot"2.
mcpg-version: <string>Override the default MCP gateway version (
DefaultMCPGatewayVersion, currentlyv0.2.26).Compiler behavior:
ghcr.io/github/gh-aw-mcpgDocker image tag instead ofDefaultMCPGatewayVersionMCPGVersionFeatureFlag FeatureFlag = "mcpg-version"3.
firewall-version: <string>Override the default AWF firewall version (
DefaultFirewallVersion, currentlyv0.25.26).Compiler behavior:
agent,api-proxy,squid) instead ofDefaultFirewallVersionFirewallVersionFeatureFlag FeatureFlag = "firewall-version"Implementation Notes
The feature flag system (
pkg/workflow/features.go) already supports string values —isFeatureEnabledchecks for non-empty strings. A new helper likegetFeatureValue(flag, workflowData) stringcould extract the string value for the version overrides.Files to modify
pkg/constants/feature_constants.go— add three new constantspkg/workflow/features.go— addgetFeatureValue()helper for string-valued flagspkg/workflow/copilot_engine.go— checklatest-copilotinGetInstallationSteps()pkg/workflow/docker.goorpkg/workflow/awf_helpers.go— checkfirewall-versionwhen building AWF commandpkg/workflow/mcp_setup_generator.goorpkg/workflow/mcp_renderer.go— checkmcpg-versionwhen selecting gateway image tagExample smoke test workflow
Use Case
These flags enable a pre-bump testing workflow:
version_constants.goThis avoids the current pattern of bumping defaults blindly and discovering breakage across all workflows.