Skip to content

fix(ci): test CLI on supported Node 22 floor - #2770

Draft
nborges-aws wants to merge 1 commit into
v1.xfrom
fix/windows-node-stdin-ci
Draft

nborges-aws wants to merge 1 commit into
v1.xfrom
fix/windows-node-stdin-ci

Conversation

@nborges-aws

Copy link
Copy Markdown
Contributor

Description

This PR raises the CLI's minimum Node.js version from 20.12 to 22. CLI dependencies (namely Ink 7) require Node 22 or newer, which we currently do not meet. Our windows CI runner has been failing recently, which diagnosis traces back to compatibility issue with Node 20.12. We now install Node 22 in our jobs, and update documentation to match the new Node floor.

Additionally, updated the stdin regression test (which was the failing windows case) to show stderr before sending the exit code, to make root causing during future debugging simpler.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe): version update

Testing

How have you tested the change?

  • I ran bun test
  • I ran the relevant end-to-end tests with bun run test:e2e, or explained why they are not applicable
    (CI does not run them for you)
  • I ran bun run typecheck
  • I ran bun run lint:check
  • I ran bun run format:check
  • I ran bun run audit
  • I ran bun run secrets:check
  • I ran bun run build
  • If I modified src/assets/, I updated affected snapshots with bun test <test-file> --update-snapshots and committed them
  • If I re-recorded fixtures or golden files, every change beyond account identifiers is explained
    by this PR
  • This PR does not change command.md (the release workflow regenerates it)

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.

@nborges-aws
nborges-aws requested a review from a team November 5, 2026 21:31
@github-actions github-actions Bot added the size/xs PR size: XS label Nov 5, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added agentcore-harness-reviewing AgentCore Harness review in progress claude-security-reviewing Claude Code /security-review in progress labels Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-1.0.1.tgz

How to install

gh release download pr-2770-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-1.0.1.tgz

@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Nov 5, 2026

@agentcore-devx-automation agentcore-devx-automation Bot 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.

AgentCore Harness Review

Verdict: Looks good

I verified the premise and the mechanics against the PR's base branch (v1.x):

  • ink@7.1.0 does declare engines.node: ">=22" on npm, so the floor bump is justified and the verify.yml comment accurately explains why the stdin regression test needs a pinned Node.
  • verify.yml is the only workflow that runs bun test, and both jobs (verify matrix and verify-macos) now get setup-node@22, so the spawn-node path in src/io/source.test.ts is covered on Linux, Windows, and macOS.
  • No stale reference to the old floor is left behind: 20.12 only remains in src/assets/templates/runtime-docs/typescript/* and src/core/project/runtimeBuild.test.ts, which are about the Node version of generated runtime projects, not the CLI itself.
  • The reworded publish-job comment is still correct — Node 22 ships npm 10.9.x, so npm install -g npm@11 is still needed for trusted publishing.
  • No command.md churn, and the assertion reorder in source.test.ts genuinely surfaces the child's stderr before the exit code, which is the useful failure message.

Two non-blocking notes for the author to decide on:

  1. package.json engines.node: ">=22" is a consumer-visible support drop. The commit is typed fix(ci): and the "Breaking change" box is unchecked, so this will ship as a patch while dropping Node 20/21 installs (npm will emit EBADENGINE, and anyone with engine-strict will fail outright). CONTRIBUTING.md asks that breaking changes be called out. Options: retype/annotate the commit so the release notes mention the new floor, or add an explicit note in the PR description/release notes that v1 now requires Node 22.
  2. .github/workflows/pr-automation.yml:181 still pins node-version: "20.x" for the npm-lockfile path, which is now below the declared engines floor. Harmless today (npm only warns), but it is the one remaining job that contradicts "we now install Node 22 in our jobs" if you wanted consistency.

Neither requires a change before merge from my side.

@agentcore-devx-automation agentcore-devx-automation Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Nov 5, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.55%. Comparing base (49fa285) to head (5cc02f1).
⚠️ Report is 1 commits behind head on v1.x.

Additional details and impacted files
@@           Coverage Diff           @@
##             v1.x    #2770   +/-   ##
=======================================
  Coverage   96.55%   96.55%           
=======================================
  Files         707      707           
  Lines       58675    58675           
=======================================
+ Hits        56653    56654    +1     
+ Misses       2022     2021    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nborges-aws
nborges-aws marked this pull request as draft November 5, 2026 22:05

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants