feat(payment): add session and instrument mutations - #2281
Closed
aidandaly24 wants to merge 5 commits into
Closed
Conversation
aidandaly24
added this pull request to stack #2278
September 11, 2026 14:22
aidandaly24
had a problem deploying
to
e2e-testing
September 11, 2026 14:22 — with
GitHub Actions
Failure
This was referenced Sep 11, 2026
Contributor
There was a problem hiding this comment.
AgentCore Harness Review
Verdict: Looks good
Nice, self-contained addition. The new create/delete handlers for payment session and payment instrument mirror existing patterns in the module cleanly:
- SDK enums are pinned with
as const satisfies readonly ..., so a newPaymentInstrumentType,CryptoWalletNetwork, orCurrencywill surface as a compile-time diff. - Validation is done up-front in the handlers (including the nice detail of rejecting
--instrument-detailsalongside shorthand flags before touching stdin, which the test asserts viareadableLength). max-spendis kept as a string all the way through to avoid float coercion; the tests explicitly cover"0"and"10.00"for that.- Tests use fixture-based
CoreClients and only spy at the SDKsendboundary or atcore.payment.*where needed to assert short-circuit behavior — no excessive mocking, and lifecycle tests round-trip create → get → delete → post-deleteResourceNotFoundExceptionthrough a real Core. - Wiring updates (
session/index.tsx,instrument/index.tsx,payment.read.test.tsxcommand inventory,TestPaymentClientstubs,CorePaymentClientinterface,WithPaymentManagerIdinputs) are all consistent.
No serious issues to flag — LGTM to merge.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## feat/payment-manager-connector #2281 +/- ##
==================================================================
- Coverage 97.17% 97.14% -0.03%
==================================================================
Files 599 603 +4
Lines 40808 41119 +311
==================================================================
+ Hits 39656 39946 +290
- Misses 1152 1173 +21 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Final CUD layer of the payment stack, following manager/connector mutations in #2280.
Adds:
payment session create|deletepayment instrument create|deleteIncludes session expiry/spend inputs, embedded-wallet shorthand or JSON inputs,
and user/connector/instrument scope. Manager-ID resolution, balance, IAM
provisioning, and provider/connector management are inherited from the lower layers.
The split preserved the pre-split implementation
10e4dacfbyte-for-byte,including production, tests, fixtures, and README. A subsequent naming-only
follow-up renamed the shared manager-ARN preflight helper to
withPaymentManagerArn.The latest upstream sync is
4a235162. Wallet JSON/shorthand conflicts useassertMutuallyExclusiveFlagsfrom #2263 pairwise, preserving valid combinationsof network, email, and phone flags. The existing test table covers each conflict.
No additional test suites or features were introduced.
Read-only/interactive TUI remains a separate follow-up.
Related Issue
Closes #2272.
Documentation PR
N/A. README command tree and session creation example are included.
Type of Change
Testing
RECORD=0 bun test: 3,367 passed across 236 files.bun run typecheck,bun run lint:check,bun run format:checkbun run build,bun run secrets:check10e4dacf; existing regression coverage preserved.5a583e26: https://github.com/aws/agentcore-cli/actions/runs/34625566083Uses the repository's Bun scripts rather than the npm scripts from the main-branch template.
No AWS resources were changed or live mutation fixtures re-recorded.
Checklist
PR #2280 is the outstanding dependency.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.