feat(cli): add catalog versions kind and use it in the copilot-cli workflow#1471
Merged
Conversation
…rkflow Replace the fragile indented python heredoc in the Copilot CLI SafeOutputs Contract workflow (which failed with an unquoted-heredoc EOF error) with a deterministic query against the compiler. Add a 'versions' kind to 'ado-aw catalog' that surfaces the pinned semver constants (copilot_cli, awf, mcpg) as the single source of truth, and have the workflow read it via 'cargo run -- catalog --kind versions --json | jq -r .versions.copilot_cli'. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8acc4e17-2dc8-4db5-a250-f8469d7c1b7c
Contributor
🔍 Rust PR ReviewSummary: Looks good — clean, minimal fix for a real CI breakage with no correctness or security concerns. Findings✅ What Looks Good
|
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.
Problem
The
Copilot CLI SafeOutputs Contractworkflow failed at the Resolve compiler-pinned Copilot CLI version step (run 29150669094):Root cause: the step scraped
COPILOT_CLI_VERSIONfromsrc/engine.rsusing an indentedpython3 - <<'PY'heredoc nested inside a$( … )command substitution. YAMLrun: |preserves the indentation, but an unquoted heredoc (<<'PY', not<<-) requires the closingPYat column 0, so bash never finds the terminator. Regex-scraping Rust source from CI is also brittle.Fix — the compiler is the single source of truth
src/inspect/catalog.rs: newversionskind forado-aw catalogexposing only genuine semver version constants:copilot_cliengine::COPILOT_CLI_VERSIONawfcommon::AWF_VERSIONmcpgcommon::MCPG_VERSIONContainer image references and the default model name are intentionally excluded.
.github/workflows/copilot-cli-safeoutputs.yml: the step now runscargo run --quiet -- catalog --kind versions --json | jq -r '.versions.copilot_cli'with a null/empty guard. No heredoc, no source scraping. The build is cached and reused by the later
cargo teststep.Docs + help text updated (
docs/cli.md,site/.../setup/cli.mdx,README.md, clap help, mcp-author descriptions). The mcp-authorcatalogtool routes throughcatalog_kind, soversionsworks there automatically.Why not override
--versionclap's
--versionprints the crate version and is consumed byupdate_check.rs;catalogis the existing JSON introspection surface (--kind,--json), so a new kind is the idiomatic, low-risk fit.Validation
cargo clippy --all-targets --all-features— cleanado-aw catalog --kind versions --jsonemits{ "versions": { "copilot_cli": "1.0.69", "awf": "0.27.28", "mcpg": "0.4.1" } }