Skip to content

Skip Copilot CLI release-age cooldown when version matches compiler default - #78787

Merged
pelikhan merged 1 commit into
mainfrom
copilot/update-cli-installation-script
Nov 17, 2026
Merged

pelikhan merged 1 commit into
mainfrom
copilot/update-cli-installation-script

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

install_copilot_cli.sh --cooldown-days N queries 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_age returns early when the version equals DEFAULT_COPILOT_VERSION, with or without a leading v. It logs a notice to stderr when it does.
    • DEFAULT_COPILOT_VERSION is the script's copy of the compiler default. scripts/sync-compat.sh keeps it in sync with constants.DefaultCopilotVersion.
    • Applies to both the toolcache and download paths.
    • Unchanged: latest, all other versions, and SHA256 manifest verification.
  • Tests (pkg/cli/install_copilot_cli_cooldown_test.go)

    • New matchesDefault flag rewrites the script's default to 1.2.3 for the case under test.
    • New cases cover a cached install with a recent release, a cached install with no release metadata, a download with a recent release, and a v1.2.3 request. Each asserts the installer succeeds without calling api.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.

@pelikhan
pelikhan marked this pull request as ready for review November 17, 2026 17:19
Copilot AI adaptive review requested due to automatic review settings November 17, 2026 17:19
@pelikhan
pelikhan merged commit ec083d7 into main Nov 17, 2026
64 of 65 checks passed
@pelikhan
pelikhan deleted the copilot/update-cli-installation-script branch November 17, 2026 17:19
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~5 AIC · ⌖ ~2 AIC · ⊞ 6.7K · ◷

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

PR Code Quality Reviewer

Outcome: reported_action

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.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.5K · ◷

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated by Ponytail Reviewer for #78787 · codex · routed: gpt61 medium · ~4 AIC · ⌖ ~1 AIC · ⊞ 185 · ◷

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

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 analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ⊞ 7.2K · ◷

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_no_action

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.

Generated by PR Specification Reviewer for #78787 · copilot · gpt56 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.6K · ◷

Copilot AI 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.

🔵 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)

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.3.1

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.

3 participants