Skip to content

Disable npm release-age cooldown for Claude, Codex, and Gemini engine installs#34338

Merged
pelikhan merged 4 commits into
mainfrom
copilot/disable-cooldown-agentic-engine
May 24, 2026
Merged

Disable npm release-age cooldown for Claude, Codex, and Gemini engine installs#34338
pelikhan merged 4 commits into
mainfrom
copilot/disable-cooldown-agentic-engine

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 24, 2026

Agentic engine installs were still applying npm’s default release-age cooldown, which can delay installation of required CLI versions. This change removes cooldown behavior for Claude, Codex, and Gemini installation paths while leaving runtime-level cooldown behavior available where still intended.

  • Installation behavior

    • Claude install now forces cooldown off in its engine installation steps.
    • Codex and Gemini installs now use a dedicated no-cooldown npm install helper.
  • Shared install helper

    • Added BuildStandardNpmEngineInstallStepsNoCooldown(...) in pkg/workflow/nodejs.go.
    • Refactored shared npm install step construction through an internal helper with explicit cooldownEnabled control.
  • Coverage updates

    • Extended engine-specific tests to assert NPM_CONFIG_MIN_RELEASE_AGE is absent for Claude, Codex, and Gemini installs.
    • Added helper-level test coverage for the no-cooldown install path.
  • Compiled workflow output

    • Recompiled avenger.lock.yml so generated workflow output matches updated Claude install step behavior.
// pkg/workflow/gemini_engine.go
npmSteps := BuildStandardNpmEngineInstallStepsNoCooldown(
    "@google/gemini-cli",
    string(constants.DefaultGeminiVersion),
    "Install Gemini CLI",
    "gemini",
    workflowData,
)

Copilot AI and others added 4 commits May 24, 2026 01:05
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Disable cooldown for Claude, Codex, and Gemini installs Disable npm release-age cooldown for Claude, Codex, and Gemini engine installs May 24, 2026
Copilot AI requested a review from pelikhan May 24, 2026 01:14
@pelikhan pelikhan marked this pull request as ready for review May 24, 2026 01:15
Copilot AI review requested due to automatic review settings May 24, 2026 01:15
@pelikhan pelikhan merged commit dcbb397 into main May 24, 2026
1 check passed
@pelikhan pelikhan deleted the copilot/disable-cooldown-agentic-engine branch May 24, 2026 01:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes npm’s default release-age cooldown behavior (NPM_CONFIG_MIN_RELEASE_AGE) from the Claude, Codex, and Gemini engine installation paths so agentic engine CLIs can be installed immediately when needed, while keeping the runtime-level cooldown mechanism available for other installs.

Changes:

  • Added a no-cooldown npm engine install helper and refactored the standard helper to route through a shared internal builder with an explicit cooldownEnabled toggle.
  • Updated Claude/Codex/Gemini installation code to ensure NPM_CONFIG_MIN_RELEASE_AGE is not set for those engine installs.
  • Expanded tests to assert cooldown env omission; recompiled avenger.lock.yml to reflect the updated Claude install behavior.
Show a summary per file
File Description
pkg/workflow/nodejs.go Refactors standard npm engine install-step construction and adds a no-cooldown variant.
pkg/workflow/gemini_engine.go Switches Gemini engine installs to the no-cooldown helper.
pkg/workflow/gemini_engine_test.go Asserts Gemini install steps do not include NPM_CONFIG_MIN_RELEASE_AGE.
pkg/workflow/engine_helpers_test.go Adds coverage for the no-cooldown helper behavior.
pkg/workflow/codex_engine.go Switches Codex engine installs to the no-cooldown helper.
pkg/workflow/codex_engine_test.go Asserts Codex install steps do not include NPM_CONFIG_MIN_RELEASE_AGE.
pkg/workflow/claude_engine.go Forces cooldown off for Claude CLI install steps.
pkg/workflow/claude_engine_test.go Asserts Claude install steps do not include NPM_CONFIG_MIN_RELEASE_AGE.
.github/workflows/avenger.lock.yml Recompiled workflow output reflecting the updated Claude installation behavior.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 9/9 changed files
  • Comments generated: 2

Comment on lines +55 to +56
if strings.Contains(strings.Join([]string(steps[1]), "\n"), "NPM_CONFIG_MIN_RELEASE_AGE") {
t.Errorf("Expected no npm release-age cooldown env for Codex install, got '%s'", strings.Join([]string(steps[1]), "\n"))
Comment on lines +84 to +88
steps := BuildStandardNpmEngineInstallStepsNoCooldown(
"@openai/codex",
string(constants.DefaultCodexVersion),
"Install Codex CLI",
"codex",
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