Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 19, 2025

The compiler was emitting CLI version information in aw-info.json for all builds, including development and test builds where the version is meaningless (e.g., "dev", commit hashes with "dirty", or "test" versions).

Changes

Modified generateCreateAwInfo in pkg/workflow/compiler_yaml.go:

  • Added isReleasedVersion() helper function to centralize version filtering logic
  • Only emit cli_version field for released builds
  • Excludes versions containing "dev", "dirty", or "test"
  • Development and test builds now skip the field entirely

Updated test coverage:

  • Added test cases verifying cli_version is excluded for dev, dirty, and test builds
  • Existing tests confirm released versions still include the field
  • Fixed TestBothVersionsInAwInfo to use valid version string

Examples

Development build (version="dev"):

const awInfo = {
  engine_id: "copilot",
  agent_version: "0.0.369",
  workflow_name: "Test",
  // cli_version field omitted
  ...
}

Dirty build (version="708d3ee-dirty"):

const awInfo = {
  engine_id: "copilot",
  agent_version: "0.0.369",
  workflow_name: "Test",
  // cli_version field omitted
  ...
}

Test build (version="1.0.0-test"):

const awInfo = {
  engine_id: "copilot",
  agent_version: "0.0.369",
  workflow_name: "Test",
  // cli_version field omitted
  ...
}

Released build (version="1.2.3"):

const awInfo = {
  engine_id: "copilot",
  agent_version: "0.0.369",
  cli_version: "1.2.3",
  workflow_name: "Test",
  ...
}
Original prompt

Update compiler to only emit cli version information in aw-info.json for released builds of the compiler. Otherwise skip.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@pelikhan
Copy link
Contributor

@copilot filter out version if "dirty" is present too

@pelikhan
Copy link
Contributor

@copilot merge main

@pelikhan
Copy link
Contributor

@copilot also do not emit "test" version

Copilot AI changed the title [WIP] Update compiler to emit CLI version info for released builds Skip CLI version in aw-info.json for development builds Dec 19, 2025
Copilot AI requested a review from pelikhan December 19, 2025 14:51
Copy link
Contributor Author

Copilot AI commented Dec 19, 2025

@copilot merge main

Done in commit d8be668. Successfully merged main branch.

@copilot also do not emit "test" version

Done in commit 7729ea1. Versions containing "test" are now filtered out along with "dev" and "dirty".

Copilot AI changed the title Skip CLI version in aw-info.json for development builds Skip CLI version in aw-info.json for development and test builds Dec 19, 2025
@pelikhan pelikhan marked this pull request as ready for review December 19, 2025 15:17
@pelikhan pelikhan merged commit 385ef1b into main Dec 19, 2025
4 checks passed
@pelikhan pelikhan deleted the copilot/update-aw-info-json-handling branch December 19, 2025 15:17
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.

2 participants