Skip to content

test(e2e): use real key formats in payment-validation CDP fixtures#1592

Merged
aidandaly24 merged 1 commit into
mainfrom
fix/e2e-payment-validation-fixtures
Jun 18, 2026
Merged

test(e2e): use real key formats in payment-validation CDP fixtures#1592
aidandaly24 merged 1 commit into
mainfrom
fix/e2e-payment-validation-fixtures

Conversation

@aidandaly24

Copy link
Copy Markdown
Contributor

Description

Fixes the E2E Tests (Full Suite) failure on main introduced by #1573.

#1573 added client-side validation that requires the CoinbaseCDP apiKeySecret to be a base64-encoded Ed25519 private key and walletSecret a base64-encoded EC P-256 private key. The full E2E suite runs only on push to main (it needs AWS secrets unavailable to PRs), so its e2e-tests/payment-validation.test.ts fixtures — which seeded those fields with dummy strings like key-secret / wallet-secret / b / c — weren't exercised by #1573's PR CI and started failing post-merge: the add/remove lifecycle tests tripped the new format check instead of testing their intent (e.g. "rejects connector on non-existent manager" returned the apiKeySecret format error instead of "not found").

This generates real Ed25519 / P-256 keys for the CDP secret fields in the four affected tests. The integ-tests/ equivalent was already updated in #1573; this applies the same fix to the e2e-tests/ file.

The whitespace-rejection test (asserts "Missing required options" — the missing-check runs before format validation) and the StripePrivy format tests (assert rejection of non-base64 / too-short keys) are unchanged and still pass.

Related Issue

Follow-up to #1573 (which closed #1564). No separate issue.

Closes #

Documentation PR

N/A

Type of Change

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

Testing

  • I ran npm run test:unit and npm run test:integ
  • I ran npm run typecheck
  • I ran npm run lint
  • If I modified src/assets/, I ran npm run test:update-snapshots and committed the updated snapshots

Notes:

  • Only e2e-tests/payment-validation.test.ts changed. typecheck and prettier pass.
  • Ran the affected e2e file against the freshly-built, globally-installed CLI: all 11 tests pass, including the 4 that were failing in the CI run, the whitespace-rejection test, and the StripePrivy format tests.

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.

PR #1573 added client-side validation that requires the CoinbaseCDP
apiKeySecret to be a base64-encoded Ed25519 key and walletSecret a
base64-encoded EC P-256 key. The full E2E suite (which runs on push to
main, not on PRs) still seeded those fields with dummy strings, so the
add/remove lifecycle tests now tripped the format check instead of
exercising their intent.

Generate real Ed25519 / P-256 keys for the CDP secret fields. The
whitespace-rejection and StripePrivy format tests are unchanged — they
assert rejection and still pass.
@aidandaly24 aidandaly24 requested a review from a team June 18, 2026 19:43
@github-actions github-actions Bot added the size/s PR size: S label Jun 18, 2026
@github-actions github-actions Bot added the agentcore-harness-reviewing AgentCore Harness review in progress label Jun 18, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Jun 18, 2026
@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 Jun 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-0.20.1.tgz

How to install

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

@agentcore-cli-automation agentcore-cli-automation left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM — small, focused fix that mirrors the integ-tests update from #1573. Generated key sizes (Ed25519 PKCS#8 DER ≈48 bytes; EC P-256 PKCS#8 DER ≈138 bytes) fall comfortably inside the validator bands (32–64 and 100–200), so the four updated tests will exercise their actual intent (manager-existence check, add/remove lifecycle) rather than tripping the format validator. Whitespace and StripePrivy format tests are correctly left alone. No telemetry needed for a test-fixture change.

@github-actions github-actions Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Jun 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 36.92% 13501 / 36559
🔵 Statements 36.21% 14356 / 39642
🔵 Functions 31.49% 2310 / 7335
🔵 Branches 30.69% 8917 / 29052
Generated in workflow #3721 for commit 967e1a0 by the Vitest Coverage Report Action

@notgitika notgitika 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.

Thanks for the fix

@aidandaly24 aidandaly24 merged commit 69547c3 into main Jun 18, 2026
34 checks passed
@aidandaly24 aidandaly24 deleted the fix/e2e-payment-validation-fixtures branch June 18, 2026 20:05
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.

[Bug] add client side validation in payment connector

3 participants