Skip to content

feat(box): Merge Box on Runtime from box-integration into v1.x - #2922

Open
vvargu wants to merge 355 commits into
v1.xfrom
box/box-integration-to-v1x
Open

vvargu wants to merge 355 commits into
v1.xfrom
box/box-integration-to-v1x

Conversation

@vvargu

@vvargu vvargu commented Nov 25, 2026

Copy link
Copy Markdown

Description

This PR merges the Box on Runtime work from box-integration into v1.x.

The work is mostly from Varun Gunda, Quang Nguyen, Sai Abhishek and Abhilash Panigrahi. It also includes the commits by Tejas Kashinath that the Box work depends on:

A cherry-pick of only the Box authors' commits onto v1.x does not apply. Most of those commits conflict without the commits above.

The branch is box-integration with v1.x merged in. The merge has two conflicts, and this branch fixes them:

  • src/handlers/project/create/index.ts: v1.x (feat(telemetry): record the template a project is created with #2907) moved const template higher in the function. This branch keeps that change and keeps the region line from box-integration.
  • src/handlers/project/create/create.screen.test.tsx: this branch keeps the REGION constant from box-integration and the trackCommandRun helper from v1.x.

Merged Box PRs on box-integration include #2788, #2789, #2837, #2846–#2852, #2857, #2860, #2862–#2864, #2867, #2872, #2877–#2879, #2883–#2889, #2893, #2899, #2903 and #2908–#2910.

The CI workflows on box-integration also run on that branch, so those lines come into v1.x with this PR. Remove them before merge if you do not want them on v1.x.

Matching L3 constructs PR: aws/agentcore-l3-cdk-constructs (link in a comment below).

Related Issue

Box on Runtime integration.

Documentation PR

The docs are in this PR (docs/box-local-testing.md and README.md).

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: 6495 pass, 6 skip, 3 fail. The 3 failures are tests in boxProfileResolver.test.ts that call the box binary on PATH. The local box was an old strands-box 0.1.0, and it does not accept the profile. The merge does not change those files.
  • 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 (on the changed files)
  • 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.

mquang-amazon and others added 30 commits November 19, 2026 14:17
With [project] access = "write", box drops the profile's optional
.venv deny_write while the folder is missing, and then refuses the
profile: the venv's Python would be under the project's write grant.
So 'create --skip-install' left a CodeZip box agent that 'build' and
'deploy' could not run. create now makes an empty .venv for it, which
'uv sync' fills later.
…them to .env.local

Dev used to copy each variable an [egress] route of the box profile names from the shell into agentcore/.env.local. It now writes nothing: each env:// key of an [egress] route or an [mcp] server goes to box run's environment, the shell's value first and .env.local's when the shell has none. A CodeZip agent's box run inherits it; a box container gets it through the run's own env file, never on the command line. When neither has it, dev warns, naming the variable, the table that reads it, and how to set it.

Tested: bun test (5399 pass); container dev with Finch and an [egress.github] route, with the token set on the command line (no .env.local write, the agent answers) and without it (the warning, then box's own error); the full e2e suite: 15 harness, 15 runtime template and 7 box template cases.
feat(box): Add a Box template for each Python agent, with its profile fixes
- Build the expected warnings from ENV_LOCAL_RELATIVE_PATH, so the
  tests pass on Windows, where it is agentcore\.env.local.
- Skip an env:// ref with a blank name, as parseBoxEnvRoutes did.
- Pin that a box container gets the shell's key over .env.local's.
- Remove parseBoxEnvRoutes and readBoxEnvRoutes, which no code calls
  since writeBoxDevEnvLocal went.
- Check for the venv's Python, not only .venv: create --skip-install
  (#2857) leaves an empty .venv, which dev must not take for an
  installed one.
chore: merge v1.x into box-integration
The box templates reuse the asset folders of the agents without box,
whose .gitignore does not list .box-dist/ (agent-python-minimal has no
.gitignore at all), so after a build 'git add .' committed the box
binaries. stageBoxCodeZip now writes a .gitignore of '*' into
.box-dist/, which covers every template and existing projects. The
CodeZip packager reads no .gitignore, so the zip still carries the
folder. A policy file named .gitignore at the top of the profile's
folder is now refused, as the staged one would replace it.
… box

On a CodeZip Runtime the L3 runs opentelemetry-instrument start.py, and
start.py hands over to box run, so the agent in the box runs without
it and sends no traces, as in a box container. The CodeZip box
templates now write instrumentation.enableOtel false, as the container
one does, and build warns for any box runtime with OTEL on, not only a
container. Running the agent under opentelemetry-instrument in the box
waits on a Box Core fix to the signing of X-Amzn-Trace-Id (plan
Phase 15, SA-7).
serve() set AGENTCORE_RUNTIME_URL to http://localhost:9000/ for any
target, and the CodeZip Runtime profile reused it. serve_a2a gives that
variable precedence for the agent card URL, so a deployed boxed A2A
agent advertised localhost, and clients that read the card connected
to themselves. The override is now local only. On the Runtime the
box/agentcore pack reads AGENTCORE_RUNTIME_URL into runtime.url, with
serve_a2a's own fallback http://localhost:9000/ when the Runtime sets
none, and the profile passes that to the agent.
start.py fell back to tomli on Python 3.10, which has no tomllib, but
only agent-python-strands-box depends on tomli. The five other CodeZip
box templates reuse the folders of the agents without box, so on
PYTHON_3_10 start.py failed to import and the agent never started.
start.py needs only the profile's 'policies' line, which deploy writes
on one line with names of letters, digits, '.', '_', '-' and '/', so
on Python 3.10 it reads that line as a JSON list. No template needs
tomli now, so agent-python-strands-box drops it.
The error for a second runtime in a Box project named two box
templates; there are seven. It now lists BOX_TEMPLATE_NAMES, taken
from the shortcut table. The box profile tests forced boxTemplate onto
templates without box, so nothing checked the box entries of the
table; they now resolve the real box templates and check that the
table marks each one.
…e CDK library writes

Before this change, `identifierOf` looked for
`GatewayTarget-<gateway>-<target>-Id` first, and then for
`GatewayTarget-<target>-Id`. A gateway name and a target name can have
a hyphen. Thus a target could get the id of a different target. An
example is the gateway `a` with the target `b`, and the gateway `tools`
with the target `a-b`. The target `b` got the id of `tools:a-b`. This
occurred also with one gateway: `tools` with the targets `search` and
`tools-search`. Also, a target of a new gateway that was not deployed
got the id of the target of a different gateway with that name.

After this change, the CLI counts the gateways in
`agentCoreGateways` that have each target name. The CDK library does
the same. For a target name that two or more gateways have, it looks only
for `GatewayTarget-<gateway>:<target>-Id`. For a different target name,
it looks only for `GatewayTarget-<target>-Id`. When the gateway itself
has no deployed id, each of its targets is `local-only`. When a second
gateway gets a target name of a deployed gateway, the two targets are
`local-only` until the next deploy writes the new export names.

Tests: in `cdk.test.ts`, one `test.each` with the gateway names of
`boxGatewaySpec` has seven tests: a shared name, one gateway, the two
hyphen examples above, a shared name with a hyphen, a shared name with
only the export from before, and a gateway that is not deployed. The lookup of
the previous commit makes 5 tests show an error. The two names in the
other sequence with a fallback, a hyphen as the separator, and
no check of the gateway each make 1 or 2 tests show an error.
…ells the assertion again

`gateway.test.ts` had a test that `AgentCoreGatewaySchema` refuses a
string for each of the two fields. That is the behavior of
`z.boolean()`, not a decision of this change. A comment in
`manager.boxNetwork.test.ts` told again what the next assertion
examines. The two are removed.
…d how to stop them

`agentcore create` writes `enableApplicationLogs: true` in the Box
gateway of a new Box project. Thus the gateway sends its
`APPLICATION_LOGS` to CloudWatch Logs, and the logs can hold the request
and response bodies of its calls. CloudWatch Logs keeps them for 90
days, and the log group has no KMS key. Before this change, `create`
did not tell the user about this.

After this change, `create` gives a warning for each Box gateway with
`enableApplicationLogs: true`. The warning says what the logs can hold,
how long CloudWatch Logs keeps them, and that
`"enableApplicationLogs": false` stops them.

Tests: in `manager.boxNetwork.test.ts`, `create` of a Box project gives
the warning. Without the warning, 1 test shows an error.
`box-integration` changed the imports of `cdk.test.ts`, and this
branch also changed them. Thus the branch had a conflict with
`box-integration`. The merge keeps the two imports.
…ws}, and let add runtime add a box runtime (#2859)

* feat(box): Keep a box profile for each agent in .box/<agent>/{local,aws}

A project has one box profile, .box/profile.toml. Create writes it only for the first runtime, so
a runtime that add runtime makes later has no profile. Two box runtimes cannot have different
[egress] entries, rules, or telemetry.

This is SA-5 of the box integration plan, without "send box telemetry to the Box log group of the
runtime by default". It ports a4b1bb0 from box-integration-development onto box-integration. In
each conflict, box-integration is the source of truth: its logic stays, and only the profile paths
change.

- .box/<agent>/local/ holds the local profile and its policy files. Git keeps it.
- .box/<agent>/aws/ holds the Runtime profile and the resources that build writes. Git ignores it.
  Build copies it into the .box-dist/ folder of the code folder or of the build context.
- Dev, the env-local writer (readBoxEnvRoutes), the policy file copy, build, and deploy read the
  profile of the runtime. The agent name is runtime.name.
- Build and deploy run `box profile show .box/<runtime>/local/profile.toml --format json --full`
  for each box runtime, one after the other.
- Each problem names the profile of its runtime. boxNetworkFailureMessage puts the problems of
  each runtime after "In runtime <name>:".
- Each runtime gets the telemetry policy of its own profile.
- boxProfileIsFor goes away, because each runtime has its own profile. runsInBox still decides if
  a runtime runs in a box.

README.md and docs/box-local-testing.md do not change here. DOCS-2 holds those edits.

- bun test: 5332 pass, 6 skip, 1 fail. The failure is "the box on PATH", which runs the local box
  binary. This change does not touch that test or the code it calls.
- typecheck, lint:check, format:check, and build pass.

Co-authored-by: Sai Abhishek <ksaiabhi@amazon.com>

* fix(box): Address the review of #2859

- add runtime in a Box project: a Box project can hold more than one runtime, and each runtime
  has its own profile now. So add runtime no longer refuses a Box project. It gives the new
  runtime what create gives a CodeZip box runtime:
  - box.version, and start.py as its entry point;
  - its own Box gateway, bound to it;
  - its own box profile in .box/<name>/local/, and an empty .venv so that box accepts the
    profile until uv sync fills it.
  A docs-only runtime renders its profile as agent-python-minimal-box does (framework none,
  Bedrock). A TypeScript runtime is refused, because a box runs only a Python agent. A name whose
  Box gateway name is taken is refused before anything is written.
- Each path that add runtime creates for the box, .box/<name>/ included, goes into the rollback
  list, so a failed add removes it.
- Outside a Box project, add runtime writes no box profile.
- assertNoSecondBoxRuntime is gone. The harness export keeps its refusal in a Box project, with
  the reason that the exported harness does not run in a box.
- remove runtime: remove the runtime's generated .box/<name>/aws/ folder. Its
  .box/<name>/local/ profile stays, because it is the user's, as its code folder is.

Box applies only to new projects from the box templates, so this change has no migration for a
project with .box/profile.toml.

Tests: bun test gives 5351 pass, 6 skip, 1 fail. The failure is "the box on PATH", which runs the
local box binary. typecheck, lint:check, and format:check pass.

* fix(box): Keep start.py for an added box runtime, and refuse a Bedrock Agent import in a Box project

Address the re-review of #2859.

- A docs-only runtime that add runtime puts in a Box project has docs that set
  `[tool.agentcore] entrypoint = "main.py"`. Dev, build and deploy copied that value over the
  start.py that starts box, so the agent deployed with no box and no warning. Now the sync keeps
  start.py for a CodeZip runtime with box.version, and warns that the manifest value is not used.
  Build and deploy also stop for a CodeZip box runtime whose entrypoint is not start.py
  (assertBoxCodeZipRuntimesStartBox).
- add runtime refuses a Bedrock Agent import (--agent-id) in a Box project. The imported agent can
  call Bedrock Agent and action group hosts that the box profile of an added runtime does not
  allow.
- The refusal of a TypeScript runtime now says that add runtime adds a box runtime only as a
  Python CodeZip agent. The check that could not be reached is gone.
- Tests: the entrypoint sync and the build check; the import refusal; a failed add that removes
  .box/<name>/, start.py and .venv, but keeps a file that was there; and add runtime after remove
  runtime, which keeps the user's local profile and warns.

Tests: bun test gives 5358 pass, 6 skip, 1 fail. The failure is "the box on PATH", which runs the
local box binary. typecheck, lint:check, and format:check pass.

* fix(box): Address Tejas's review of #2859

- Box checks have their own module, boxValidation.ts. Build and deploy call validateBoxRuntimes
  after the runtime sync (box.version, and start.py for a CodeZip box runtime), not from
  applyBoxNetwork. The runtime sync asks the same module, with the full runsInBox rule:
  - it refuses to make a CodeZip box runtime a container build when a Dockerfile appears in its
    folder, because the user's Dockerfile does not start box. The refusal comes before
    agentcore.json is written, in dev, build and deploy;
  - it keeps start.py over the `[tool.agentcore] entrypoint` of a CodeZip box runtime.
- add runtime in a Box project:
  - refuses an app/<name>/start.py that is not the start.py that starts box, and asks the user to
    rename it;
  - writes the box profile with the region the command resolved (options.region), not a region
    it resolves again;
  - removes what it made when the box scaffold fails, which comes before the spec write;
  - warns when a kept .box/<name>/local/profile.toml listens on the port of another protocol.
- discardStaged removes only the outermost of the paths it gets. Removing a folder and a file in it
  at the same time could leave files behind.
- Build stages the box release once, into .box-dist/, as before this PR. .box/<name>/aws/ gets only
  the rendered Runtime profile, the generated packs, and the policy files, for people to read.
- .gitignore: the shared template has no Box lines again, so projects with no box match v1.x. A
  Box project's .gitignore gets .box/*/aws/, .box-dist/ and .box-dev/, which also cover a runtime
  that add runtime adds later.
- dev decides that a runtime is boxed with runsInBox(isBoxProject(spec), runtime), as
  BoxDevRunner does, when it writes env keys to .env.local and when it keeps the box port free.
- The add runtime wizard offers only Python in a Box project, and its summary shows start.py and
  the box profile.
- Messages name `agentcore create` or `agentcore add runtime` for a local box profile.
- Tests: boxValidation.test.ts (test.each), the sync switch refusal, an existing start.py, the
  region, the rollback, the protocol warning, .gitignore, the wizard summary, and the dev rule.

Not changed: dev with two box runtimes of one protocol. Both profiles listen on the port of the
protocol, so dev runs one of them at a time. That is a follow-up.

Tests: bun test gives 5384 pass, 6 skip, 1 fail. The failure is "the box on PATH", which runs the
local box binary. typecheck, lint:check, format:check and build pass.

---------

Co-authored-by: Sai Abhishek <ksaiabhi@amazon.com>
`box-integration` has two new PRs. The CI workflow of the base runs
`bun run test:package`, and the branch did not have that script. Also,
`add runtime` writes a Box gateway again. The merge has no conflict.
…ds its logs

`add runtime` in a Box project writes a new Box gateway with
`boxGatewaySpec`, thus with `enableApplicationLogs: true`. Before this
change, only `create` told the user that the gateway sends its
`APPLICATION_LOGS`, which can hold the request and response bodies of
its calls.

After this change, `boxGatewayLogsWarnings` gives the warning for each
Box gateway with `enableApplicationLogs: true` in a list. `create` gives
it for the Box gateways of the new project. `addBoxRuntime` gives it for
the Box gateway that it writes. These are the two commands that write a
new Box gateway.

Tests: in `manager.box.test.ts`, `add runtime` gives the warning for
its new gateway only. Each `create --template` test makes sure that a
Box template gives the warning and that a different template does not.
Without the warning of `add runtime`, 1 test shows an error. Without
the warning of `create`, 3 tests show an error. With no warning from
`boxGatewayLogsWarnings`, 4 tests show an error.
…in its name

No target id test had a gateway name with an underscore. Thus no test
examined the change from `_` to `-` in the export name
`GatewayTarget-<gateway>:<target>-Id`. After this change, a test has the gateways
`my_tools` and `other` with the target `search`. Without the change
from `_` to `-` in `stackExportName`, 2 tests show an error.
Every local CodeZip profile has [project] access = "write", and dev
started box in the project root, so the agent could read and write the
whole project: agentcore/.env.local with the model provider's real key,
which the keyed route keeps from it, and .git/hooks, agentcore/cdk and
agentcore.json, which run outside the box on the next commit or
deploy. The local CodeZip profile now names the agent's own folder as
${{ workspace }}, and its header names that folder. dev, build and
deploy start box there, with the profile at ../../.box/profile.toml,
so the project grant covers app/<runtime> and nothing else. A profile
written before still runs from the project root.
Build stored a route's key in .env.local as AGENTCORE_CREDENTIAL_<ROUTE>
on the first build only. After a rotation, with GITHUB_TOKEN=ghp_new in
the shell and ghp_old stored, dev used the new key but deploy
provisioned the old one, and the deployed agent got a 401. Build now
replaces the stored key, and says so, when the route's variable holds a
different one, picked as dev picks it; deploy already updates an
existing provider. The local testing guide says so, and its
troubleshooting tells box-integration users to delete the variables
earlier builds copied into .env.local.
dev checked a box profile's env:// keys in { ...envLocal, ...shell },
so a blank shell value hid the .env.local one, but started box with
.env.local over the shell. With GITHUB_TOKEN= in the shell and a key in
.env.local, dev warned box would not start, and box started.
boxDevSecrets now takes the shell and .env.local apart and picks each
variable as build does, the shell's when set and not blank, and both
runners hand box that value.
[strands-agents/staging-boxy#570](strands-agents/staging-boxy#570)
gives each pack and plugin that box ships the name @box/<name>. A box
from the staging-boxy main branch rejects the previous box/<name> name,
for example: "box/base" is not a pack name; the pack that box ships is
@box/base. The next box release comes from the main branch. Thus it
rejects each box profile that the CLI writes, and each Runtime profile
that build stages.

With this change, the CLI writes these names:

- box/base is @box/base, and box/bedrock is @box/bedrock, in each box
  profile that create writes and in each Runtime profile.
- box/agentcore is @box/agentcore, and box/agentcore-codezip is
  @box/agentcore-codezip. This is the packs entry and the [pack] name
  of each pack that build writes. The path of each pack does not change.
- box/aws-secrets-manager is @box/aws-secrets-manager in plugins. This
  is the name in the plugin.toml of the AWS Secrets Manager plugin on
  the feature/secret-source-shipped-plugins branch of staging-boxy.

The profile writer and the bedrock.region copy of build use one
BOX_BEDROCK_PACK constant. Thus the copy finds @box/bedrock. Comments in
the code, Dockerfile.template, and start.py use the new names.

Build does not change the profile of a user. If the local profile names
box/<name> in packs or in plugins, build stops before it starts box. The
message gives the file, each previous name, and its @box/ name.

The open routes fixture for a list of destinations is new output of box
profile show, from a box with
[strands-agents/staging-boxy#625](strands-agents/staging-boxy#625).
Only its pack name changed. The fixture of 0.1.11-linux-preview.6 stays
the output of that box, with box/base.

Tests: the tests of boxProfile.test.ts, manager.boxNetwork.test.ts, and
the other tests examine the new names. boxNetworkSource.test.ts examines
the stop and its message, and that box does not start. It also examines
that build starts box for @box/ names and names of the user. The tests
show an error in each of these conditions:

- One of these names goes back to box/.
- The bedrock.region copy finds only box/bedrock.
- Build does not stop.

An agentcore build of a project from create used the box of
[strands-agents/staging-boxy#625](strands-agents/staging-boxy#625),
and its box profile show accepted the @box/ names. That box also
accepted the staged Runtime profile, with @box/agentcore, if the copy
had the text us-west-2 in auth.aws.region. With the placeholder, that
box rejects auth.aws.region. This is not a problem, because the next
release has
[strands-agents/staging-boxy#549](strands-agents/staging-boxy#549).
A build of a project with box/base and box/bedrock stopped with the new
message, and the profile did not change. boxRelease.json does not
change. typecheck, lint:check, format:check, and bun test show no
errors.
The CLI pinned box 0.1.11-linux-preview.6. That box rejects the profiles
that the CLI writes after the @box/ pack names and the key input of the
log group of the runtime. Its error for a @box/ pack is "@box/base" is
not a pack name. The CLI then told the user only to correct what Box
reports. The install hints named the release list, and not a version.

With this change, boxRelease.json pins
[box 0.1.11-linux-preview.7](https://github.com/mquang-amazon/box-releases/releases/tag/v0.1.11-linux-preview.7).
The Linux asset has SHA-256
782290ca3f0f0de3faa6c3943a0b51d521f16b135178ab7e4425986a97ee7622. The
ffi pin stays 0.1.11-linux-preview.2. scripts/bump-box-release.ts wrote
the file from the SHA256SUMS.txt of the release.

BOX_MINIMUM_VERSION is 0.1.11-linux-preview.7, the first box that reads
the profiles of the CLI. BOX_RELEASE_PAGE is the release page of the
pinned box. BOX_INSTALL_HINT and each install hint of the profile
resolver use that page and the pinned version. If a box rejects a @box/
pack name, the resolver says that the box comes before
BOX_MINIMUM_VERSION, and gives the hint.

The open routes fixture for a list of destinations is byte for byte the
output of the published macOS preview.7.

Tests: boxRelease.test.ts makes sure that the pinned box is at least
BOX_MINIMUM_VERSION, that its asset names its version, and that its
SHA-256 has 64 hex digits. boxProfileResolver.test.ts examines each
install hint, and the hint for a box before preview.7. Each test shows
an error in each of these conditions:

- The pin goes back to preview.6.
- The SHA-256 is not 64 hex digits.
- The asset names a different version.
- The resolver gives no hint for a box before preview.7.

A build with the pinned SHA-256 set to 64 f characters stopped with "not
the pinned ffff...". Nothing was installed.

The SHA-256 of the two downloaded assets agreed with SHA256SUMS.txt. The
macOS preview.7 was on PATH for agentcore build of a container project
and of a CodeZip project, and the two builds had no errors. The CodeZip
build downloaded the pinned Linux box and staged it. box profile show on
each staged Runtime profile, with dummy AWS_REGION,
OTEL_EXPORTER_OTLP_LOGS_HEADERS, and AGENTCORE_GATEWAY_BOX_URL, filled
these values:

- the log group and the log stream of the variable
- the region of AWS_REGION in the telemetry target
- the region of AWS_REGION in auth.aws.region of each backend

The macOS box did this with eu-central-1, and the Linux box in finch,
with no network, did this with ap-south-1. The build region was
us-west-2. typecheck, lint:check, format:check, and bun test show no
errors. docs/box-local-testing.md does not change.
Box Core #488 allows executable memory on Linux, so a CodeZip agent's Python runs in a box
without the _ctypes/libffi shim. build and deploy no longer download or stage it, and
boxRelease.json pins box only. box 0.1.11-linux-preview.7 is built on a Box Core with #488.
boxDevSecrets read and parsed the box profile again, though both
runners had read it, so its no-profile branch never ran. It now takes
the profile text and is synchronous, and parses each secret with
BoxEgressSecretSchema instead of casting the raw TOML. It also:

- Matches a shell variable's name in any case on Windows, where a copy
  of process.env loses that, so an exported Github_Token still sets
  env://GITHUB_TOKEN.
- Says, naming the variable and no value, when the shell and .env.local
  set a profile key to different values, since the shell's wins where
  the rest of dev prefers .env.local.
- Looks the keys up next to stageBox in the container runner, so its
  warnings come before the image build.
# Conflicts:
#	src/core/dev/box.test.ts
#	src/core/dev/box.ts
#	src/core/dev/boxEnvLocal.test.ts
#	src/core/dev/boxEnvLocal.ts
#	src/core/project/boxNetworkSource.ts
#	src/core/project/boxProfileEgress.test.ts
#	src/core/project/boxProfileEgress.ts
#	src/core/project/manager.box.test.ts
#	src/core/project/manager.tsx
#	src/core/project/templates/boxProfile.test.ts
#	src/core/project/templates/boxProfile.ts
#	src/handlers/project/dev/index.ts
boxDevSecrets checked `variable in found` and read the environments by
key, so a profile's env://constructor or env://toString matched
Object.prototype: it was skipped with no value and no warning. It now
reads only each record's own keys.
mquang-amazon and others added 20 commits November 24, 2026 12:18
feat(box): Remove the mcp-python-fastmcp-box template
No released @aws/agentcore-cdk deploys a Box project yet, so the Box
tests that deploy skipped in CI. On the macOS and Linux arm64 runners,
the e2e job now checks out aws/agentcore-l3-cdk-constructs at the new
l3Ref input (default box-integration) with a read-only token from the
repository's GitHub App, packs it on the runner, and points
AGENTCORE_E2E_BOX_CDK at the tarball. Nothing is published.
A tagged run that installs nothing with uv, such as tags=box on Windows,
which has no box, leaves no uv cache, and setup-uv's post step failed the
job for it even though every test passed.
…n box deploy in CI

The pinned macOS box build is killed as soon as it starts (Killed: 9 on
box --version), which failed the macOS job, so CI no longer installs box
there: the macOS Box tests skip and the rest of its suite runs.

The AgentCore Runtime logs of agent_python_langchain_box hold
OpenTelemetry's "Failed to detach context" at ERROR level, which the
deploy test's log check refuses, so CI skips that one case until the
template or the check handles it. It still runs locally, and its dev
test runs in CI.
ci(e2e): Deploy the Box tests with the L3 constructs built from source
The macOS build of box v0.3.0 runs: its box and both helpers pass
codesign --verify --strict (Developer ID, AMZN Mobile LLC) and box
--version prints box 0.3.0. The invalid Info.plist reported when it was
pinned away came from that copy on disk, not the release asset: the
asset's SHA-256 is the same, and it has not been re-uploaded. So macOS
and Linux both take v0.3.0 again, boxRelease.json drops darwin.version,
and the install hints and docs no longer send macOS to the preview.
bump-box-release.ts keeps --darwin-box for a release whose macOS build
does not run.
The macOS skip said the pinned macOS box build is killed at start. That
was v0.3.0-preview.1, after the workflow's install; the pin is now
v0.3.0, which no CI run has tried yet.
…unner user

macOS now pins box v0.3.0, which runs when unpacked plainly. CI installs
it on the macOS runner again, unpacked as the runner user into
$RUNNER_TEMP/box and put on PATH, as a developer does, instead of the
sudo unpack into /opt/box after which the signed v0.3.0-preview.1 was
killed at start. If macOS refuses box, the step prints codesign's
verdict and the recent system log before failing. The macOS runner
builds the L3 constructs for the Box deploys too. Linux arm64 is
unchanged.
macOS reads a folder named box that holds the executable box as a
bundle, so codesign reports the signed box as invalid (Info.plist not
bound) and macOS kills it at launch. That is why the macOS box was
killed under /opt/box/box and, in the last run, $RUNNER_TEMP/box/box,
while the same file runs from a folder with another name. The e2e
workflow now unpacks it into $RUNNER_TEMP/box-<version>, and the local
testing guide warns against a folder named box.
fix(box): Use the v0.3.0 macOS box instead of v0.3.0-preview.1
…way stays and stops the next deploy (review)
…ewhere to planBoxProfileCredentials (review)
fix(box): Address the review of the host map and the gateway targets
…o-v1x

# Conflicts:
#	src/handlers/project/create/create.screen.test.tsx
#	src/handlers/project/create/index.ts
@github-actions github-actions Bot added the size/xl PR size: XL label Nov 25, 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 25, 2026
@vvargu

vvargu commented Nov 25, 2026

Copy link
Copy Markdown
Author

Matching L3 constructs PR: aws/agentcore-l3-cdk-constructs#493

@vvargu
vvargu marked this pull request as ready for review November 25, 2026 08:47
@vvargu
vvargu requested a review from a team November 25, 2026 08:47
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.84992% with 61 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.89%. Comparing base (722f842) to head (5c899a7).

Files with missing lines Patch % Lines
src/core/dev/boxAwsCredentials.ts 80.88% 13 Missing ⚠️
src/core/project/boxNetworkSource.ts 96.80% 13 Missing ⚠️
src/core/project/boxNetwork/conditions.ts 97.01% 12 Missing ⚠️
src/core/project/boxNetwork/network.ts 98.74% 7 Missing ⚠️
src/core/project/backends/boxRelease.ts 97.05% 5 Missing ⚠️
src/core/project/boxNetwork/projectSpec.ts 92.59% 4 Missing ⚠️
src/core/project/boxGatewayTargets.ts 96.47% 3 Missing ⚠️
src/core/dev/container.ts 99.44% 1 Missing ⚠️
src/core/project/backends/cdk/compatibility.ts 96.00% 1 Missing ⚠️
src/core/project/boxNetwork/egress.ts 99.47% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             v1.x    #2922      +/-   ##
==========================================
+ Coverage   96.57%   96.89%   +0.32%     
==========================================
  Files         734      776      +42     
  Lines       60956    69352    +8396     
==========================================
+ Hits        58869    67200    +8331     
- Misses       2087     2152      +65     

☔ 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.

@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed agentcore-harness-reviewing AgentCore Harness review in progress claude-security-reviewing Claude Code /security-review in progress labels Nov 25, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xl PR size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants