Repository navigation
Skip Copilot CLI release-age cooldown when version matches compiler default - #78787
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
🔵 Needs a closer look
Human review is needed because exempting the baked-in default release from configured minimum-age checks replaces runtime age enforcement with maintainer trust for both cached and downloaded executables.
No open issues 🎉
What changed in this PR
This PR avoids unnecessary GitHub release metadata requests when gh-aw installs the Copilot CLI version matching the setup script’s baked-in compiler default.
Changes:
- Skip release-age checks for the default version, with or without a leading
v, and log the exemption to stderr. - Add cached and downloaded install tests confirming default-version installs make no release metadata API calls.
- Leave cooldown checks for other versions and SHA256 verification unchanged.
| File | Description |
|---|---|
pkg/cli/install_copilot_cli_cooldown_test.go |
Tests the default-version exemption across cache, download, and version-prefix cases. |
actions/setup/sh/install_copilot_cli.sh |
Implements and documents the default-version cooldown exemption. |
Review effort: Balanced (adaptive)
|
🎉 This pull request is included in a new release. Release: |
install_copilot_cli.sh --cooldown-days Nqueries the GitHub releases API for every install. This PR skips that check when the version being installed is the compiler default. That version is reviewed and gets a manifest pin whenever it is bumped, so the API call adds nothing for it.Installer (
actions/setup/sh/install_copilot_cli.sh)check_copilot_release_agereturns early when the version equalsDEFAULT_COPILOT_VERSION, with or without a leadingv. It logs a notice to stderr when it does.DEFAULT_COPILOT_VERSIONis the script's copy of the compiler default.scripts/sync-compat.shkeeps it in sync withconstants.DefaultCopilotVersion.latest, all other versions, and SHA256 manifest verification.Tests (
pkg/cli/install_copilot_cli_cooldown_test.go)matchesDefaultflag rewrites the script's default to1.2.3for the case under test.v1.2.3request. Each asserts the installer succeeds without callingapi.github.com.Review note: the comparison uses the script's baked-in default, not the compiled workflow's version. If the action and compiler ever ship out of sync, the skip applies to the action's default.