Skip to content

fix(box): Pin box to the public strands-agents/box release - #2893

Merged
mquang-amazon merged 9 commits into
box-integrationfrom
box/h1-official-box-release
Nov 24, 2026
Merged

mquang-amazon merged 9 commits into
box-integrationfrom
box/h1-official-box-release

Conversation

@mquang-amazon

@mquang-amazon mquang-amazon commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Description

Box downloaded its release from a personal GitHub account (mquang-amazon/box-releases), with no signed releases. This PR pins box to the public, AWS-owned strands-agents/box instead, and removes internal setup steps from the public docs.

Pin

  • Linux arm64, which ships to AgentCore Runtime: the official v0.3.0 box-cli-v0.3.0-aarch64-unknown-linux-gnu.tar.gz.
  • macOS arm64, used by the macOS e2e runner and local agentcore dev: v0.3.0-preview.1. The box binary in v0.3.0's macOS archive has a broken code signature (codesign --verify reports invalid Info.plist (plist or signature have been modified)), so macOS kills it at launch with exit 137. preview.1's macOS build is signed and runs. boxRelease.json gains an optional darwin.version. The bump script takes --darwin-box <version>, and the e2e workflow installs each build from its own release (.box.<build>.version // .box.version). When a release with a working macOS build ships, bun scripts/bump-box-release.ts --box <version> drops the override.
  • The CLI now pins the box-cli-v<version>-<target> archives. They hold box, its two helpers, its packs and release.json, the same layout as before. The release's box-v<version>-* archives have no packs.
  • BOX_MINIMUM_VERSION changes from 0.1.11-linux-preview.7, which has no release in the public repo, to 0.3.0-preview.1. It appears only in messages; the CLI never compares versions with it.

Profile change required by box 0.3.x

  • @box/base in 0.3.0-preview.1 and 0.3.0 has no uname tool. Box refuses the [tool.uname.filesystem] table that CodeZip box templates wrote, with missing field `command` in `tool.uname` . renderBoxProfile no longer writes it (BOX_BASE_PROJECT_WRITE_TOOLS = []).
  • Existing projects: CodeZip box projects created with the CLI since 3df66a2 (11/17) have this table in .box/<runtime>/local/profile.toml. We don't support profiles from earlier templates while Box is in development: delete those two lines, or recreate the project. Until then, agentcore dev and build's profile check fail with the error above when the box on PATH is 0.3.x, and the derived Runtime profile keeps the table, which box 0.3.0 refuses at box run.

Docs (README.md, docs/box-local-testing.md)

  • Download from strands-agents/box. The macOS steps use preview.1.
  • The ada/Isengard credential steps are replaced with aws configure sso.
  • Removed a link to a private repository.

Not in this PR: renaming the "Dogwood" and "Box Core" codenames in public files, which waits on confirming the public names.

Related Issue

No GitHub issue. Tracked internally as an AppSec finding (ship box from an AWS-owned repository with signed releases).

Documentation PR

Documentation is included here.

Type of Change

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

Testing

  • I ran bun test: 6016 pass, 1 fail. The failure is the box on PATH > resolves a profile into the rules the tests fake, and it fails on box-integration too. It expects a metadata_hosts rule that none of box 0.1.11-preview.9, 0.3.0-preview.1 or 0.3.0 emits.
  • I ran the relevant end-to-end tests with bun run test:e2e: not run yet.
  • 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: not applicable.
  • If I re-recorded fixtures or golden files, every change beyond account identifiers is explained by this PR. box-network-build-stopped.golden.txt changes only the profile line numbers, which move up by 3 because the [tool.uname] table is gone.
  • This PR does not change command.md

Manual checks:

  • Each pinned archive's SHA-256 matches its release's SHA256SUMS.txt.
  • Linux v0.3.0 and preview.1, run in a linux/arm64 container: box --version works, and box profile show --format json --full accepts the CodeZip profile the CLI now writes (exit=0). v0.3.0 refuses the old profile with the tool.uname error.
  • macOS preview.1, run natively: the signature verifies, and the same profile check passes. v0.3.0's macOS box is killed at launch.

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: the macOS pin returns to the main release once box ships a macOS build that runs.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.

AppSec H1 (V2414030352): box shipped to customer runtimes from a personal
GitHub account. Pin the box-cli archives of strands-agents/box v0.3.0, the
first public release with the Boxy CLI, and its SHA-256s.

- bump-box-release.ts pins the box-cli-v<version>-<target> archive, which
  holds box, its helpers, its packs and release.json. The release's
  box-v<version>-* archives hold no packs.
- BOX_MINIMUM_VERSION is 0.3.0, the first public box that reads the
  profiles the CLI writes; the old minimum has no public release page.
- @box/base in 0.3.0 has no uname tool and refuses a [tool.uname] table
  with no command, so the CodeZip profile no longer writes one.
- README and docs/box-local-testing.md download from strands-agents/box,
  and use aws configure sso instead of ada and Isengard.
The macOS box of v0.3.0 has a broken code signature (codesign reports an
invalid Info.plist), so macOS kills it at launch. Keep Linux, which ships to
AgentCore Runtime, on v0.3.0, and let the darwin build name its own release:
boxRelease.json gains darwin.version, bump-box-release.ts takes --darwin-box,
and the e2e workflow installs each build from its own release. The minimum
box is 0.3.0-preview.1, which the macOS pin satisfies.

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

Thanks for moving box off the personal repo. Overall direction looks right. Notes from a read-only review at 62878201.

Pin verification (done, all good)

  • strands-agents/box v0.3.0 (non-prerelease) and v0.3.0-preview.1 (prerelease) both exist and are published.
  • box-cli-v0.3.0-aarch64-unknown-linux-gnu.tar.gz → 9c7c01b2…b40658, and box-cli-v0.3.0-preview.1-aarch64-apple-darwin.tar.gz → eaf085e4…bb77. Both match the release's SHA256SUMS.txt and GitHub's asset digest.
  • The e2e workflow resolves .box.darwin.version // .box.version, so macOS downloads from v0.3.0-preview.1/ and Linux from v0.3.0/, and both check against the pin. boxReleaseAssetUrl and the CodeBuild path only use the Linux build and BOX_RELEASE.version, so the darwin override can't leak into what ships.
  • No mquang-amazon / box-releases references remain outside test fixtures that use a fake owner/box-releases.

Should address before merge

  1. Existing CodeZip projects can now deploy a Runtime profile that box 0.3.0 refuses, and it only shows up at runtime. runtimeTools in runtimeProfile/rules/additions.ts drops a [tool.<name>] only when it equals the template's table. The template now writes no [tool], so the [tool.uname.filesystem] that projects created since 3df66a2 have counts as a user table and stays in the derived Runtime profile. Before this PR it was stripped. The PR description says build's profile check catches it. That only works when the box on PATH is 0.3.x. A tester who upgrades the CLI but still has 0.1.11-preview.10 on PATH, which the previous CLI told them to install (the CLI never compares versions with BOX_MINIMUM_VERSION), passes the local check. Build then derives a Runtime profile with [tool.uname] and deploys box 0.3.0, which fails at box run with missing field `command` in `tool.uname` . That error is only in the runtime log. Suggested fix: keep stripping the legacy uname table, e.g. treat { filesystem: { deny_write: <venv grants> } } under tool.uname as template-written in runtimeTools. The other option is to have build refuse it with a message that says to delete the two lines. Add a test to the additions suite for an existing local profile that still has the old table. The test this PR removed covered exactly that case.
  2. The CLI's install hint sends macOS users to the broken build. BOX_INSTALL_HINT and INSTALL_BOX (boxProfileResolver.ts) say "download the build for your machine from …/tag/v0.3.0" and fall back to preview.1 only "when that release has no build for your machine". v0.3.0 does have an aarch64-apple-darwin asset, the one that's killed at launch, so a macOS user who follows the CLI's own message gets exit 137. The hint also doesn't say to use the box-cli-* archive. The release page lists box-v0.3.0-aarch64-apple-darwin.tar.gz first, and that one has no packs. Suggest building the hint from BOX_RELEASE.darwin?.version on macOS, or naming preview.1 for macOS explicitly, and saying box-cli-v<version>-<target>. Update the asserted strings in boxRelease.test.ts / boxProfileResolver.test.ts to match.

Non-blocking / nits

  • The PR is not in the squash plan (https://pippin.amazon.dev/docs/XFRmP1pP9L90nl/box-integration-squash-and-pr-plan-v2). origin/box-integration-development still pins 0.1.11-preview.10 (435b6ba), so no later planned PR covers the items above. The next squash from -development will also conflict on boxRelease.json, boxProfile.ts and the docs, and could revert this pin. Worth bringing this change into -development too.
  • Put the migration note ("delete [tool.uname.filesystem] from .box/<runtime>/local/profile.toml") in the troubleshooting section of docs/box-local-testing.md, not only in the PR description.
  • docs/box-local-testing.md: the PATH block hard-codes BOX_VERSION=0.3.0-preview.1, so Linux users who copy and paste it get the wrong folder. Consider two blocks, or a uname-based default.
  • scripts/bump-box-release.ts: pin() fetches SHA256SUMS.txt once per target, so the same release is fetched twice. That's harmless, but caching per version is simple. --darwin-box equal to --box correctly drops the override.
  • Tests: no test covers the new optional darwin.version in BoxReleaseSchema (for example, that an empty string is refused). It's minor because the CLI doesn't read it.
  • The new comments and docs say "0.3.0-preview.1 … the first public release whose telemetry target can read its settings from the host" and "first in strands-agents/box with a box-cli archive". I couldn't verify those against older releases. Fine if you confirmed them.
  • The PR body reports e2e as not run yet. The macOS/Linux-arm64 e2e jobs are the real test of the new pins and the darwin override.

CI at time of review: verify / macOS passed. verify / Linux, verify / Windows and Analyze were still pending. e2e was skipped. GitHub reports the PR as mergeable with no conflicts.

Leaving as COMMENT because of items 1 and 2.

…e box-cli archive

The install hint and the profile errors said to download the build for the
machine from v0.3.0. Its macOS build does not run, so on macOS they now name
the darwin pin's archive and release. They also name the box-cli archive,
since the release's box-v archives have no packs.
@mquang-amazon

Copy link
Copy Markdown
Contributor Author

Thanks for the review, Abhilash.

1. Old [tool.uname] table in existing projects: Box is still in development on box-integration, so we won't support profiles from earlier templates. A project created before this change needs to delete [tool.uname.filesystem] from .box/<runtime>/local/profile.toml, or be recreated. You're right that the derived Runtime profile now keeps that table for those projects, so the line in the description saying deployed profiles never contained it is wrong for upgraded projects. I've corrected it.

2. Install hint: fixed in 72e2233. The hint and the profile errors now name the box-cli-v<version>-<target> archive, and send macOS to the darwin pin's release (v0.3.0-preview.1), because the v0.3.0 macOS build doesn't run.

I'll leave the nits for now.

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

Re-review at 72e2233b, covering the changes since 62878201. Thanks for the quick turnaround on the install hint.

Earlier items

  • 2 (install hint): addressed. BOX_INSTALL_HINT and INSTALL_BOX now name the box-cli-v<version>-<target> archive, warn off the box-v* archives, and send macOS to v0.3.0-preview.1 via the new BOX_MACOS_HINT, which is built from BOX_RELEASE.darwin. Both asserted strings are updated. The hint is empty when there's no darwin override or it equals the main version, so a later bump that drops the override also drops the sentence.
  • 1 (old [tool.uname] table in existing CodeZip projects): accepted as a decision. You've said earlier templates won't be supported while box is only on box-integration, and the description is corrected. I'm not treating it as blocking. The docs troubleshooting note from the earlier nits would still give testers the one-line fix.
  • I haven't repeated the earlier nits you said you'd leave (docs PATH block, double checksum fetch, darwin.version test, "first public release" wording, e2e not run, squash plan / -development pin).

Pins re-verified (read-only, unchanged since last review)

  • strands-agents/box v0.3.0 (not a prerelease) and v0.3.0-preview.1 (a prerelease) are both published. box-cli-v0.3.0-aarch64-unknown-linux-gnu.tar.gz → 9c7c01b2…b40658 and box-cli-v0.3.0-preview.1-aarch64-apple-darwin.tar.gz → eaf085e4…bb77 both match GitHub's asset digests.

Blocking: merge conflicts with the base
GitHub now reports the PR as CONFLICTING. A test merge with origin/box-integration (2f9422d5) conflicts in six files: README.md, docs/box-local-testing.md, src/core/project/backends/boxRelease.ts, boxRelease.test.ts, src/core/project/boxProfileResolver.ts and boxProfileResolver.test.ts. The cause is #2886 (24d7002a, 9e09dcff, dced1411), which merged since this PR branched from c0905666. It removed BOX_MINIMUM_VERSION, BOX_MINIMUM_RELEASE_PAGE, BOX_OTHER_MACHINE_HINT and boxReleaseFor, cut INSTALL_BOX down to Install box <ver> (<page>), then retry., and has build rewrite each runtime's box.version to the pin. Because of the conflict, no CI checks ran on this head (gh pr checks reports none).

When you rebase:

  • Keep BOX_MACOS_HINT and the box-cli archive wording, but don't bring back BOX_OTHER_MACHINE_HINT / BOX_MINIMUM_VERSION. The base dropped them, and the fallback no longer helps (see the inline comment).
  • Recheck the docs and README conflicts against the base's rewrap of docs/box-local-testing.md (100 columns, plus the new "publish an unreleased box" section).

Re-review checklist (delta only)

  1. Test coverage: the two exact-string assertions cover the hint that ships. The empty branch of BOX_MACOS_HINT (no override) isn't tested. It's module-level and hard to reach without a module mock, so this is a nit. Separately, the assertions now hard-code 0.3.0 / 0.3.0-preview.1 instead of using BOX_RELEASE.*, so every bump also means editing these tests. That's fine if it's intended as a tripwire.
  2. Silent failures: none introduced. These are string constants only.
  3. Comment accuracy: the BOX_MACOS_HINT docblock matches the code. The test-title rename matches the assertions.
  4. New types: none.
  5. General: the macOS sentence is shown on every OS. That's fine, since it says "On macOS".

FYI: #2895 (open, efe601db) also conflicts with this PR. Its bump script still hard-codes box-v… asset names, while this PR uses box-cli-v…. Whichever lands second will need to reconcile them.

Leaving as COMMENT because of the merge conflicts with box-integration and the CI that hasn't run as a result. Once it's rebased with green CI, I expect to approve.

Comment thread src/core/project/backends/boxRelease.ts Resolved
Every box the CLI supports is 0.3.0-preview.1 or later, so:
- The open routes of box profile show are a list. The one-string form,
  which only box 0.1.11-linux-preview.6 printed, and its fixture go.
- Comments name no 0.1.11 release, and the e2e README drops its stale
  note about an ffi shim pin.
- The fake release of the boxRelease tests uses the pinned repository
  and version instead of made-up ones.
@mquang-amazon

Copy link
Copy Markdown
Contributor Author

Thanks for the re-review.

  • Cleanup in 2f86a75: the CLI no longer mentions box 0.1.11 or the ffi shim. The one-string form of open_routes, which only 0.1.11-linux-preview.6 printed, is removed along with its fixture. The fake release in the boxRelease tests now uses the pinned repo and version.
  • Conflicts with fix(box): Address the open review of the merged Box PRs #2886: I'll bring box-integration into this branch. I'll keep BOX_MACOS_HINT and the box-cli archive wording, and drop BOX_OTHER_MACHINE_HINT / BOX_MINIMUM_VERSION as the base did, which also removes the ambiguous "that release" sentence. I'll check the docs against the base's rewrap and the new "publish an unreleased box" section, and ping you once CI is green.
  • feat(box): Let a runtime's box.version choose among the box releases this CLI supports #2895: noted. Whichever PR lands second will reconcile the box-v vs box-cli-v asset names in the bump script.

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

Re-review at 2f86a75 (one new commit since 72e2233, no force-push).

Blocking, still open: merge conflicts with box-integration. The branch hasn't been rebased or merged yet. GitHub reports it as CONFLICTING. A local git merge-tree against box-integration (2f9422d) still conflicts in the same 6 files: README.md, docs/box-local-testing.md, boxRelease.ts and its test, and boxProfileResolver.ts and its test. No CI checks have run on this branch. Your reply says you'll bring box-integration in, keep BOX_MACOS_HINT and the box-cli archive wording, and drop BOX_OTHER_MACHINE_HINT and BOX_MINIMUM_VERSION. That plan looks right to me. My earlier point stands: I'll approve once the conflicts are resolved and CI is green.

Addressed since last time

  • Tests hard-coding the pin: partly fixed. The boxRelease.test.ts fake release now takes its repo and version from BOX_RELEASE, and its asset name uses box-cli-v…. The expected install and macOS messages in boxRelease.test.ts (around L295-306) and boxProfileResolver.test.ts (L102-106) still spell out 0.3.0 and 0.3.0-preview.1. Building those strings from the constants after the rebase would finish this. Non-blocking.
  • Fallback sentence ("When that release has no build…"): your plan drops it along with BOX_OTHER_MACHINE_HINT. I'll check it's gone after the rebase.
  • The empty-string branch of BOX_MACOS_HINT still has no test. Non-blocking, same nit as before.

New commit 2f86a75 (dropping box 0.1.11 and the ffi shim)

  • Removing the one-string form of open_routes is fine. Every box we support prints a list. If an old box prints a string, the safeParse in parseBoxProfileShow fails with an error instead of passing bad data through, so nothing breaks silently. The remaining fixture box-profile-show-open-routes-list.json exists, and the ffi assertion dropped from boxCodeZip.test.ts was only about 0.1.11 behavior.
  • Rebase notes, inline. The new boxReleaseFor doc comment names BOX_MINIMUM_VERSION, but the base removes both that constant and boxReleaseFor, so this hunk and the test.each(["0.2.4", "2.0.0"]) change should go away in the resolution. The test title "older than the minimum" should match the base's message, which says "older than the pinned box".
  • Pins and checksums: boxRelease.json hasn't changed since 72e2233, so I didn't re-verify it.

FYI: interaction with #2895. This doesn't block this PR. #2895 hard-codes box-v… asset names, and this branch now also uses box-cli-v… in the boxRelease test fixtures as well as in the hint and docs. #2895 also lets box.version choose among pinned releases instead of build rewriting it to the pin. So whichever of the two lands second needs to reconcile the asset names, the bump script, and the box.version tests. You've already acknowledged this.

Coverage, by area: test coverage (above), silent failures (none found), comment accuracy (two rebase notes, inline), new types (none in the new commit), general review (nothing else).

Comment thread src/core/project/backends/boxRelease.ts Resolved
Resolve the conflicts with #2886, which dropped BOX_MINIMUM_VERSION,
BOX_OTHER_MACHINE_HINT and boxReleaseFor, and has build set each runtime's
box.version to the pin. Keep BOX_MACOS_HINT and the box-cli archive wording
in the install hint and the profile errors, without the minimum-version
fallback. Reapply this branch's docs changes to the base's rewrapped
docs/box-local-testing.md, including its section on publishing an
unreleased box, and name a public release in the test of a box.version
that build rewrites.
@mquang-amazon
mquang-amazon marked this pull request as ready for review November 23, 2026 22:43
@mquang-amazon
mquang-amazon requested a review from a team November 23, 2026 22:43
@mquang-amazon

Copy link
Copy Markdown
Contributor Author

Merged box-integration (2f9422d) into the branch in 7f7d9b6. It's a merge rather than a rebase, so there was no force-push, and the PR is mergeable again. CI is running.

How the conflicts with #2886 were resolved:

  • boxRelease.ts / boxProfileResolver.ts: I took the base's removal of BOX_MINIMUM_VERSION, BOX_MINIMUM_RELEASE_PAGE, BOX_OTHER_MACHINE_HINT and boxReleaseFor. Its doc comment and the test.each(["0.2.4", "2.0.0"]) test went with them, and nothing in src/, the docs or the README refers to them anymore. The install hint keeps the box-cli-v<version>-<target> wording and appends BOX_MACOS_HINT. INSTALL_BOX is the base's Install box <ver> (<page>), then retry. plus BOX_MACOS_HINT. The "When that release has no build…" sentence is gone.
  • Old pack-name test: it now has the base's title, "when an older box refuses an @box/ pack", and the base's message, "older than the pinned box". The comment says "An older box" instead of naming 0.1.11.
  • docs/box-local-testing.md: I started from the base's rewrapped file and reapplied this PR's changes: strands-agents/box, box-cli archives, macOS on preview.1, aws configure sso instead of ada/Isengard, and the builds table. The new "publish an unreleased box" section now says to fork strands-agents/box, uses box-cli file names, and mentions --darwin-box.
  • README: the base's wording, pointing to the public release, plus the macOS note.
  • fix(box): Address the open review of the merged Box PRs #2886's new box.version rewrite test used 0.1.11-linux-preview.6 as its example of an old version. It now uses 0.2.4.

Locally: typecheck, lint, format, build and secrets pass. bun test has 6100 passing and 1 failing. The failure is the box on PATH test, which also fails on box-integration, and it skips in CI where box isn't installed.

I'm leaving the non-blocking nits for later: building the expected hint strings from BOX_RELEASE.*, and testing the empty branch of BOX_MACOS_HINT.

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

Re-review at 7f7d9b6. The new commit merges box-integration (2f9422d) into the branch. There was no force-push, so 2f86a75 is still the first parent. I read the merge with git show --remerge-diff and compared it with both sides.

Blocker resolved: the conflicts with box-integration. GitHub now reports the PR as MERGEABLE, and the merge base is the current tip of box-integration. All six conflicted files are resolved the way you planned:

  • boxRelease.ts / boxProfileResolver.ts: BOX_MINIMUM_VERSION, BOX_MINIMUM_RELEASE_PAGE, BOX_OTHER_MACHINE_HINT and boxReleaseFor are gone, along with its doc comment and the test.each(["0.2.4", "2.0.0"]) test. git grep finds no remaining reference to them, to mquang-amazon/box-releases, or to 0.1.11 anywhere in the tree. BOX_INSTALL_HINT keeps the box-cli-v<version>-<target> wording. INSTALL_BOX is the base's sentence. Each appends BOX_MACOS_HINT only when it is non-empty, so neither leaves a trailing space.
  • #2886's behaviour survives. Build still rewrites box.version to the pin (boxNetworkWriters.ts ~L540). Its test now uses 0.2.4 as the old version. The resolver message is the base's "older than the pinned box".
  • This PR's behaviour survives too: the strands-agents/box pins, the box-cli archive names, the macOS hint, the --darwin-box mention, and aws configure sso in the docs.
  • The README and the docs take the base's wording and add the public release and the macOS note.

Addressed since last time

  • The fallback sentence ("When that release has no build…") is gone from the code, the tests and the docs.
  • The boxReleaseFor doc comment that named BOX_MINIMUM_VERSION was removed with the function.
  • The test title now matches the base: "when an older box refuses an @box/ pack". Its comment no longer names 0.1.11.

Still open, non-blocking (you said you'll do these later)

  • The expected strings in boxRelease.test.ts (the install hint) and boxProfileResolver.test.ts (INSTALL) still spell out 0.3.0 and 0.3.0-preview.1.
  • The empty branch of BOX_MACOS_HINT is still untested. It now matters in two places, because both BOX_INSTALL_HINT and INSTALL_BOX have the === "" ? "" : … join.

New nit: the docs Prerequisites bullet wraps badly after the merge. See the inline comment. Line 60 of the same file ("The CLI uses the box-cli-v<version>-* archives, with builds") also runs past the 100-column wrap the base uses.

Pins: boxRelease.json hasn't changed since 2f86a75. I re-checked it read-only against the release asset digests anyway. box-cli-v0.3.0-aarch64-unknown-linux-gnu.tar.gz (v0.3.0, the latest release) and box-cli-v0.3.0-preview.1-aarch64-apple-darwin.tar.gz (v0.3.0-preview.1, a pre-release) both match their pinned SHA-256s.

CI: pending when I posted. Analyze and verify on Linux, Windows and macOS were still running, and e2e was skipped. This approval assumes CI passes.

FYI, #2895 (unchanged from last time, not blocking): that PR still uses box-v… asset names and has box.version choose among the pins. This branch keeps #2886's rewrite-to-pin behaviour and the box-cli-v… names. Whichever of the two lands second has to reconcile them.

Coverage by area: test coverage (two deferred nits, above), silent failures (none; the merge adds no new error paths), comment accuracy (the stale comments went away with the removed code), new types (none), general review (the merge resolution looks correct; one docs nit).

Comment thread docs/box-local-testing.md Resolved
…n the Runtime

Box 0.3 (#690 of the box CLI) makes @box/bedrock sign each Bedrock call
with aws:// by default, under a new bedrock.sign-in input. On the Runtime,
the Bedrock route goes through a Box gateway backend, and box refuses a
signed secret beside a backend ("a destination secret beside a backend
must be env://"), so box exited before the agent started and each invoke
timed out at 30s.

The Runtime profile now sets bedrock.sign-in = "api-key", beside
bedrock.region, and the gateway rule writes the Bedrock route as
[egress.bedrock-api-key], the pack's route for that sign-in. Its env://
secret is one box replaces with a stand-in and strips; the gateway signs
the call with its own role. The local profile keeps aws://, so
agentcore dev signs with the developer's credentials as before.
@codecov-commenter

codecov-commenter commented Nov 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.85%. Comparing base (2de737f) to head (b894a38).

Additional details and impacted files
@@               Coverage Diff                @@
##           box-integration    #2893   +/-   ##
================================================
  Coverage            96.85%   96.85%           
================================================
  Files                  773      773           
  Lines                68305    68326   +21     
================================================
+ Hits                 66157    66178   +21     
  Misses                2148     2148           

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

Bring in #2900, which gives the real Toolkit loading test 30s so
verify / Windows passes on GitHub-hosted runners, and #2879 and the
v1.x sync (#2902). No conflicts.
@mquang-amazon

Copy link
Copy Markdown
Contributor Author

Update since the last review: two fixes, one merge, and the deploy e2e results.

d69acea — Bedrock on the Runtime with box 0.3.x. box CLI #690 (in 0.3.0 and 0.3.0-preview.1) makes @box/bedrock sign with aws:// by default, behind a new bedrock.sign-in input. Our Runtime profile puts a gateway backend on [egress.bedrock], so the pack's aws:// ended up next to a backend. Box refuses that combination (a destination secret beside a backend must be env://) and exited before the agent started, so every Box template's invoke timed out at 30 s. The Runtime profile now sets bedrock.sign-in = "api-key" next to bedrock.region, and the gateway rule writes the route as [egress.bedrock-api-key], the pack's route for that sign-in. Its env:// secret is the kind box accepts next to a backend: box gives the agent a stand-in and strips it, and the gateway signs with its own role. No API key exists or is needed. The local profile is unchanged and still signs with aws:// under agentcore dev. The old-renderer fixture tests apply this one difference through withApiKeySignIn, next to withOtel; the fixtures themselves are untouched.

63ae7d1 — merged box-integration (811f8f5), with no conflicts. It brings in #2900, the 30 s Toolkit test that verify / Windows was timing out on at 5001 ms, plus #2879 and #2902.

Deploy e2e (--tagsFilter='box', create → deploy → invoke, us-west-2, Linux box 0.3.0 on the Runtime), run on this PR together with #2879 and the CodeZip stdlib-grant fix:

  • ✅ agent_python_strands_box_container, agent_python_strands_box, agent_python_minimal_box, mcp_python_fastmcp_box, a2a_python_strands_box, agui_python_strands_box
  • ❌ agent_python_langchain_box: deploy and invoke pass. The test's runtime-log ERROR match caught OpenTelemetry's "severityText":"ERROR","body":"Failed to detach context", the known LangChain async-streaming context warning, which isn't a box, Bedrock or gateway failure.

Without #2879 and the stdlib-grant fix, only the container template passed. The CodeZip templates failed in box's containment step (python3.14 needs the shared library 'libpython3.14.so.1.0' …), so the CodeZip path depends on that work, not on this PR. agentcore dev for all seven templates passed earlier on macOS with box 0.3.0-preview.1.

Bring in #2899, which forbids the AWS instance metadata service in every
box profile. Both branches changed the old-renderer fixture tests: they
now apply withCreatePolicy and withApiKeySignIn. box-network-build-stopped
is re-recorded: its profile line numbers move by #2899's policy file and
this branch's removal of [tool.uname].
On GitHub-hosted Windows runners, "on a terminal, asks first and applies
on yes" took 5258 ms and failed verify / Windows at bun's 5 s default;
"--yes never applies a plan that isn't ready" took 3975 ms. As #2900 did
for the Toolkit loading test, give each 30 s.
@mquang-amazon
mquang-amazon requested a review from leo237 November 24, 2026 05:45

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

Re-review at b894a38, covering what changed since 7f7d9b6. There was no force-push. The PR's own new commits are d69acea (Bedrock api-key sign-in on the Runtime) and b894a38 (30 s timeouts for two migrate tests), plus two merges of box-integration (63ae7d1 and 263a3dd). The other 24 commits in the compare come from the base (#2855, #2856, #2861, #2879, #2896, #2899, #2900, #2901, #2902). The merge base is the current tip of box-integration (2de737f), and GitHub reports the PR as MERGEABLE.

Earlier comments

  • All six inline threads were already resolved and stay fixed. Nothing in the new commits reopens them.
  • Still open and non-blocking, as you said you'd do them later: the expected hint strings in boxRelease.test.ts and boxProfileResolver.test.ts still spell out 0.3.0 / 0.3.0-preview.1, and the empty branch of BOX_MACOS_HINT is still untested.

d69acea: Bedrock api-key sign-in on the Runtime

  • I checked it against box itself. resources/packs/bedrock/pack.toml at both v0.3.0 and v0.3.0-preview.1 declares inputs.bedrock.sign-in with values ["aws", "api-key"] and default aws. It also has [egress.bedrock] (aws://, when aws) and [egress.bedrock-api-key] (env://AWS_BEARER_TOKEN_BEDROCK, when api-key). The new constants (BOX_BEDROCK_ROUTE, BOX_BEDROCK_API_KEY_ROUTE, BOX_BEDROCK_RUNTIME_SIGN_IN) match those names exactly. Their docblocks match the pack's own comments, and the agent gets a stand-in.
  • runtimeOptions sets sign-in in the same form as region: quoted beside quoted, dotted beside dotted, and dotted when only the pack is imported. The additions tests cover all three forms, plus a profile that sets aws explicitly.
  • The gateway rule renames only the bedrock key, and only when packs includes @box/bedrock. That way the Runtime route merges with the pack route that api-key turns on. withEntryKeys(old.egress, false) covers the profile without the pack, which keeps bedrock.
  • Your deploy e2e (6 of 7 templates passing, and the langchain one passing deploy and invoke) is the real test of this. It's convincing.
  • Nit, no change needed: a user's explicit bedrock.sign-in = "aws" becomes api-key on the Runtime without a warning, while the region and AWS_PROFILE overrides in the same rule do warn. The override itself is correct, since aws:// can't run beside the backend. The behaviour is documented in the rule table, so a warning would only be for consistency.

Merge 263a3dd: I read it with --remerge-diff. The resolution of additions.test.ts composes withApiKeySignIn(withCreatePolicy(...)), so both sides' changes apply. The re-recorded box-network-build-stopped.golden.txt shifts lines by #2899's policy line (+) and this PR's removal of [tool.uname] (-), which matches your note. 63ae7d1 had no conflicts.

b894a38: these are timeout bumps only, the same as #2900. Fine.

Pins: boxRelease.json hasn't changed since 7f7d9b6. I re-checked it read-only anyway. v0.3.0 is published and isn't a prerelease. v0.3.0-preview.1 is a published prerelease. box-cli-v0.3.0-aarch64-unknown-linux-gnu.tar.gz (9c7c01b2…b40658) and box-cli-v0.3.0-preview.1-aarch64-apple-darwin.tar.gz (eaf085e4…bb77) both match GitHub's asset digests. The e2e install step still downloads over HTTPS from the pinned tag and checks the SHA-256 from the repo.

FYI (from the base, not this PR): e2e-test.yml L127 says "box ships only arm64 builds", but v0.3.0 now ships box-cli-v0.3.0-x86_64-unknown-linux-gnu.tar.gz. #2901 moved the Linux job to ubuntu-latest (x86_64), so a later change could pin that build and run the Box tests there too.

FYI on the langchain e2e: the failure you describe is the test's runtime-log ERROR match catching OTel's Failed to detach context. That's worth a follow-up that narrows the match, or the Box e2e for langchain will stay red for a reason unrelated to box.

Local results at b894a38: bun run typecheck passes. bun test gives 6325 pass, 7 skip and 0 fail across 360 files. CI on this head is green: Analyze, CodeQL, and verify on Linux, Windows and macOS. e2e was skipped.

Coverage, by area:

  • Test coverage: the new sign-in and route rename are covered. The two earlier deferred nits are still open.
  • Silent failures: none found. The sign-in override is intentional and documented.
  • Comment accuracy: the new docblocks match box's pack.
  • New types: none. There are three new string constants.
  • General and supply chain: the pins are unchanged and verified. Everything is HTTPS with a SHA-256 checked against the repo, and nothing uses "latest".

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

Approved. The pinned SHA-256 values match SHA256SUMS.txt of strands-agents/box v0.3.0 and v0.3.0-preview.1. No reference to mquang-amazon/box-releases stays in the branch. The @box/base and @box/bedrock packs are the same in the two releases, so the macOS and Linux split is safe for the CLI. E2E is confirmed to work.

Minor comments, none of them blocking:

  1. PR description: Please add the Bedrock sign-in change from d69acea. The Runtime profile now sets bedrock.sign-in = "api-key", and [egress.bedrock] becomes [egress.bedrock-api-key]. This changes deploy behavior, and the description does not say it. Also, BOX_MINIMUM_VERSION does not exist in the code, so please remove that bullet.
  2. AppSec finding: The repo is now AWS-owned, but the releases have no signatures or GitHub build attestations. The checksum file is in the same release as the archives. Please do not close the "signed releases" part of the finding with this PR alone.
  3. Follow-up for box: The CLI now hard-codes the pack's sign-in input and the bedrock-api-key route name. If box ignored a pack's route secret when the route has a backend, the CLI could keep [egress.bedrock] and drop this workaround. Consider a request to the box team.

Comment thread docs/box-local-testing.md Resolved
Comment thread docs/box-local-testing.md Resolved
@mquang-amazon
mquang-amazon merged commit bca6a71 into box-integration Nov 24, 2026
6 checks passed
@mquang-amazon
mquang-amazon deleted the box/h1-official-box-release branch November 24, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants