You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(payments): blockers from deep review — gate completeness, secrets, regex, recovery
- F-01-1: gate payment env-var injection + IAM grants by language (Python)
and protocol (HTTP). New helper isPaymentEligibleRuntime is used in
PaymentManagerPrimitive.add, the vended cdk-stack.ts payment loop, and
dev/payment-env.ts so non-Python or non-HTTP runtimes never get env vars
they cannot consume.
- F-01-2: emit hooks=[ConfigBundleHook()] alongside plugins= in both the
template and the regex-emitted Agent block. Prevents existing config-bundle
customers from silently losing system-prompt injection when adding payments.
- R-13-1: insert the payment import at the top of main.py (after the file
docstring and any from __future__ imports). Removes a regex that could
splice the new import inside a parenthesised multi-line from x import (...)
block and produce a SyntaxError.
- R-13-2: tighten the agent-replacement regexes — allow trailing # type: ignore
comments, allow typed-annotation _agent: Agent | None = None form, and
abort cleanly when the call site is replaced but the singleton has an
unrecognised shape rather than shipping corrupted code.
- S-02-1: re-add after remove now correctly patches main.py. The previous
early-return short-circuited the whole flow when remove() left payments.py
behind.
- D-12-2: when CFN succeeds but the post-deploy state-write fails, surface
the stack name + region + recovery commands so the user can fix the local
I/O issue or manually delete the orphan stack.
- C-05-3: exclude .env / .env.local / .env.* files from the deploy zip at
any depth. Closes a footgun for BYO projects with --code-location . where
agentcore/.env.local could otherwise be packaged into S3.
Tests: 8 new cases covering paren-aware imports, docstring + future,
type-ignore comments, typed annotations, abort path, re-add cycle, and
.env exclusion at any depth.
0 commit comments