Skip to content

test: raise timeouts on Windows-slow remove and memory wizard tests - #2965

Merged
jariy17 merged 1 commit into
v1.xfrom
test/windows-timeouts
Nov 30, 2026
Merged

jariy17 merged 1 commit into
v1.xfrom
test/windows-timeouts

Conversation

@jariy17

@jariy17 jariy17 commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Description

Raises three test timeouts that the Windows runner exceeds:

  • project remove > removing a credential deletes its .env.local entry and reports it and --json reports a removal and its cleaned environment keys: 15s test timeout (default 5s).
  • project add memory wizard > collects a name, strategies and retention, then writes the memory: 5s wait for the "added memory" frame (default 1s). The test already had a 15s test timeout.

The second remove test fails only because of the first. bun does not cancel a timed-out test, so its pending remove credential --name svc-key keeps running after the next test has chdired into its own project, throws no credential named 'svc-key', and bun reports it as an unhandled error against the next test.

Seen on the Windows verify job: https://github.com/aws/agentcore-cli/actions/runs/46477723719/job/142056312064

Related Issue

None filed.

Documentation PR

Not applicable.

Type of Change

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

Testing

How have you tested the change?

  • I ran bun test (the two changed files, on Linux)
  • 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): not applicable, unit tests only
  • 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.

On the Windows runner the two credential remove tests can pass bun's 5s
default, and the memory wizard's save can take over the 1s waitForText
default. A timed-out remove test keeps running after bun moves on, so its
leftover remove lands in the next test's project and fails that one too.
@jariy17
jariy17 requested a review from a team November 30, 2026 18:25
@github-actions github-actions Bot added the size/xs PR size: XS label Nov 30, 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 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-1.3.0.tgz

How to install

gh release download pr-2965-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-1.3.0.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 30, 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

Test-timeout-only change; it checks out against base v1.x.

  • waitForText(lastFrame, text, timeoutMs = 1000) in src/testing/renderScreen.tsx:196 does take an explicit timeout (delegating to waitFor, which throws WaitForTimeoutError), so the new third argument is correct and the described 1s default is accurate.
  • 15s per-test timeouts and explicit 5s waitForText waits are already the convention in this suite (create.screen.test.tsx:124, config-bundle.screen.test.tsx, and four other tests in memory.screen.test.tsx), so nothing new is being introduced here.
  • The added comment gives a reason (Windows write latency) rather than paraphrasing the call, and no production code, fixture, snapshot, or command.md is touched.

One non-blocking note for a follow-up, not a merge blocker:

The fix is scoped to exactly the waits that were observed failing, but the same wait exists on the same spec-write path in sibling tests that were left at the 1s default — memory.screen.test.tsx:122 (added memory 'events_only' to 'TestProject') and :150 (added memory 'ordered_memory' to 'TestProject') — and in remove/index.test.ts:218 (removing a secret-reference credential leaves .env.local alone), which does the same initProject + add credentials sequence as the two tests being bumped. Given the described failure mode (a timed-out test keeps running and poisons the next test), these are the next candidates to flake on the Windows runner. Bumping them too, or raising the timeoutMs default in waitForText/waitForFlatText, would cover the class rather than the two instances CI happened to surface.

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

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.68%. Comparing base (f54e68c) to head (f006ebb).

Additional details and impacted files
@@           Coverage Diff           @@
##             v1.x    #2965   +/-   ##
=======================================
  Coverage   96.68%   96.68%           
=======================================
  Files         735      735           
  Lines       61626    61626           
=======================================
+ Hits        59583    59584    +1     
+ Misses       2043     2042    -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.

@jariy17
jariy17 merged commit a3866b0 into v1.x Nov 30, 2026
25 of 27 checks passed
@jariy17
jariy17 deleted the test/windows-timeouts branch November 30, 2026 19:02
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.

3 participants