Skip to content

fix(ci): test stdin handling on Node 20.12 - #2777

Merged
nborges-aws merged 1 commit into
v1.xfrom
fix/windows-node20-stdin-ci
Nov 6, 2026
Merged

nborges-aws merged 1 commit into
v1.xfrom
fix/windows-node20-stdin-ci

Conversation

@nborges-aws

Copy link
Copy Markdown
Contributor

Description

Pin verification to the CLI minimum Node version, 20.12.0. Update the stdin regression test to wait for the READY marker and tolerate the warning Node 20 may print before it.

Upgrading minimum Node version should be considered as the long term fix for this issue. This PR aims to unblock the workflow in the interim

Type of Change

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

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 6, 2026 17:19
@github-actions github-actions Bot added the size/s PR size: S label Nov 6, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added claude-security-reviewing Claude Code /security-review in progress agentcore-harness-reviewing AgentCore Harness review in progress labels Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-1.0.2.tgz

How to install

gh release download pr-2777-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-1.0.2.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 claude-security-reviewing Claude Code /security-review in progress agentcore-harness-reviewing AgentCore Harness review in progress labels Nov 6, 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

Checked against base v1.x. Both changes hold up:

  • .github/workflows/verify.yml — the pin (20.12.0) matches engines.node (>=20.12.0), the action SHA (949feb2… / v7.1.0) is the same one already used in canary.yml, e2e-test.yml, and pr-automation.yml, and setup-node is already proven on the same image:windows-1.0 CodeBuild runner class by e2e-test.yml. Nothing else in the job depends on a newer Node — build/pack/compile/smoke-test all run through Bun, and the Codecov action brings its own runtime — so dropping the ambient Node to 20.12 only affects the tests that spawn node (src/io/source.test.ts, src/io/exec.test.ts, src/io/exec-arguments.test.ts), none of which use post-20 syntax or APIs. Both verify callers (ci.yml, release-main-and-preview.yml) pick up the pin, and both jobs in the file were updated.
  • src/io/source.test.ts — gating on the READY marker instead of the first stderr chunk is strictly more correct than the old once(child.stderr, "data"), and rejecting on early close/error turns a would-be timeout into a diagnosable failure with the captured stderr. The late-rejection of an already-settled promise by the close listener is a harmless no-op, and the subsequent once(child, "close") still gets its event.

Two non-blocking observations, take or leave:

  • expect(errors).toContain("READY\n") (src/io/source.test.ts) is now tautological — await ready only resolves when errors includes that marker, so the assertion cannot fail. The real regression signal is still code === 0 and output === "late value", which do catch a child that threw after printing READY, so coverage is intact; the line is just redundant.
  • The comment "Node 20 can warn while importing Ink" doesn't name the warning. Naming it (or linking the issue) would let a future reader tell when it's safe to tighten the assertion back to an exact match, especially given the PR frames the Node-version bump as the long-term fix.

One coverage trade-off worth being aware of: verify is the only workflow that runs bun test, so after this PR the node branch of this regression test runs only on 20.12.0 — the newer Node the runners previously provided is no longer exercised by it (e2e runs Node 24, but not this test). If cross-version behavior of the stdin path matters, a two-entry Node matrix would be the follow-up; the interim unblock as written is fine.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.50%. Comparing base (ddb6807) to head (692a87e).
⚠️ Report is 1 commits behind head on v1.x.

Additional details and impacted files
@@           Coverage Diff           @@
##             v1.x    #2777   +/-   ##
=======================================
  Coverage   96.50%   96.50%           
=======================================
  Files         709      709           
  Lines       58865    58865           
=======================================
+ Hits        56805    56806    +1     
+ Misses       2060     2059    -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 merged commit 10371a5 into v1.x Nov 6, 2026
27 of 28 checks passed
@nborges-aws
nborges-aws deleted the fix/windows-node20-stdin-ci branch November 6, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants