Skip to content

fix(box): Use the v0.3.0 macOS box instead of v0.3.0-preview.1 - #2910

Merged
mquang-amazon merged 4 commits into
box-integrationfrom
box/darwin-box-v0.3.0
Nov 24, 2026
Merged

mquang-amazon merged 4 commits into
box-integrationfrom
box/darwin-box-v0.3.0

Conversation

@mquang-amazon

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

Copy link
Copy Markdown
Contributor

Description

macOS goes back to box v0.3.0, the release Linux and AgentCore Runtime already use, and the Box e2e tests run on the
macOS runner again.

The cause. macOS reads a folder named box that holds the executable box as a bundle. codesign then reports the
signed box as invalid Info.plist (plist or signature have been modified) (Format=bundle, Info.plist=not bound),
and macOS kills box at launch (Killed: 9, exit 137). Every failure so far had box at …/box/box: the copy that led
#2893 (62878201) to pin macOS to v0.3.0-preview.1, and /opt/box/box and $RUNNER_TEMP/box/box in CI. The same
file in a folder with another name passes codesign --verify --strict and runs. The v0.3.0 release asset is fine:
its SHA-256 (bc077119…aaa70) is the one pinned away, and it has not been re-uploaded.

Changes:

  • boxRelease.json: rewritten with bun scripts/bump-box-release.ts --box 0.3.0. macOS takes the v0.3.0 asset, and
    darwin.version is gone, so the install hint and the box version errors no longer send macOS to the preview. Their
    two tests follow. --darwin-box and the workflow's .box.<build>.version // .box.version stay, for a release whose
    macOS build does not run.
  • e2e-test.yml: the macOS runner installs box and builds the L3 constructs again. It unpacks box as the runner user
    into $RUNNER_TEMP/box-<version>, not a folder named box, puts it on PATH, and if box still does not start,
    prints codesign's verdict and the recent system log before failing. Linux arm64 is unchanged.
  • README.md, docs/box-local-testing.md, e2eTest/README.md and a comment in templates/boxProfile.ts: v0.3.0 on
    macOS, macOS back in the CI Box tests, and a warning not to unpack box into a folder named box on macOS.

E2E: 45501254207 on box/e2e-macos-box (same commits),
tags=box: all jobs pass. macOS: box 0.3.0, 10 Box tests passed (5 deploy and invoke on AgentCore Runtime, 5 dev).
Linux arm64: 11 passed. agent_python_langchain_box's deploy stays skipped in CI.

Related Issue

No GitHub issue. Follow-up to #2893.

Documentation PR

Not applicable; the README and docs/box-local-testing.md are updated here.

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: 6402 pass, 1 fail. The failure, the box on PATH > resolves a profile into the rules the tests fake, also fails without this change with box 0.3.0-preview.1 on PATH: the box's output has no
    metadata_hosts rule, which the test's fixture expects.
  • 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): e2e run 45501254207, above
  • 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
mquang-amazon requested a review from a team November 24, 2026 22:11
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.
@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.86%. Comparing base (5393054) to head (d73bfec).

Additional details and impacted files
@@                 Coverage Diff                 @@
##           box-integration    #2910      +/-   ##
===================================================
- Coverage            96.87%   96.86%   -0.01%     
===================================================
  Files                  774      774              
  Lines                68744    68744              
===================================================
- Hits                 66593    66591       -2     
- Misses                2151     2153       +2     

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

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.

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

Looks good. The new macOS pin is correct, and the docs, hint and tests are consistent with it.

What I checked:

  • Pin: box-cli-v0.3.0-aarch64-apple-darwin.tar.gz in strands-agents/box v0.3.0 (not a prerelease or draft, published 2026-11-23 16:19 UTC). The GitHub asset digest, my own sha256sum of the downloaded asset, and the release's SHA256SUMS.txt all give bc077119...c69aaa70, which matches boxRelease.json. The URL the e2e workflow builds from .box.version resolves.
  • Archive layout: flat, with box, strands-box-contain-trampoline, strands-box-sock-alias, resources/ and release.json at the top (release.json says box_version 0.3.0, target aarch64-apple-darwin). That matches BOX_BINARIES and the workflow's tar -xzf -C /opt/box. The binary is Mach-O and carries a Developer ID Application: AMZN Mobile LLC signature blob. I can't run codesign or the binary on Linux, so whether it runs on macOS rests on your hand check.
  • Leftovers: no 0.3.0-preview.1, box preview or old SHA (eaf085e4...) remains in src, docs, tests, scripts or workflows. The hard-coded 0.3.0 strings are only in the BOX_INSTALL_HINT expectation, as before.
  • Silent failures: none new. The pin is still checked against the repo's SHA, not the release's SUMS file; the workflow checks the SHA's shape before -c; and an empty BOX_MACOS_HINT drops cleanly out of both messages.
  • bun run typecheck passes. bun test gives 6400 pass, 9 skip, 0 fail (no box on PATH here).

Non-blocking follow-ups:

  1. This branch predates #2908 (merged into box-integration). After both are in, the e2e workflow comment and e2eTest/README.md will still say "the pinned macOS box build is killed as soon as it starts", but the pinned build will then be v0.3.0, which CI has never run. The Killed: 9 in #2908 was the v0.3.0-preview.1 build installed with sudo tar --no-same-owner. Please follow up by re-enabling Install box (and the L3 steps) for macOS once a CI run shows box --version passes there, or reword those lines so they name the build that was killed. The squash plan (https://pippin.amazon.dev/docs/XFRmP1pP9L90nl/box-integration-squash-and-pr-plan-v2) has no later PR that covers this.
  2. nit: inline note on README below.
  3. nit: with darwin.version gone, nothing tests the non-empty BOX_MACOS_HINT path any more, though --darwin-box and the // .box.version fallback are kept on purpose. A small test that builds the hint from a fixture release with its own darwin version would stop that path from rotting.

Comment thread README.md Resolved
…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.

@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-approving after the rebase onto box-integration (now with #2908). 623f520 carries the same changes as the commit I approved (f0a7cf9), and 0223c28 addresses my follow-up: the e2e workflow comment and e2eTest/README.md now say it was the v0.3.0-preview.1 macOS build that CI saw killed, and to re-enable macOS once a run shows the pinned build starts. The two nits from my earlier review still stand as optional.

@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 of 0dc8f29 ("Run the Box tests on macOS again, with box unpacked as the runner user"). The rebased fix and the docs commit are unchanged from what I approved; this note is only about the new commit.

The change itself reads well: unpacking as the runner user into $RUNNER_TEMP/box instead of a sudo unpack into /opt/box is a plausible fix for the Killed: 9, and printing codesign and the unified log before failing is good diagnostics.

Why COMMENT, not APPROVE: the theory that the sudo unpack caused the kill hasn't been tested yet. The only e2e dispatch at this head (run 45500262060) failed in authorize at "Fetch secrets from Secrets Manager", so no test job ran and the macOS install step never executed. Before this commit, a macOS box that won't start only meant the Box tests skipped on macOS. Now the install step exit 1s, so if the theory is wrong, the whole macOS e2e job turns red on every push to box-integration.

Either of these would unblock me:

  1. A green tags=box run on macOS at this head, dispatched from a ref the secrets role trusts, or
  2. Keep the safety net until one exists: on macOS, if box --version fails, print the diagnostics and continue without box on PATH (Box tests skip) instead of exit 1, or mark that step continue-on-error for macOS only.

Also re-noting my earlier #2908 point now that macOS runs the L3 steps again: npm ci for the L3 constructs runs after the AWS credentials are configured, on macOS as well as Linux arm64. Non-blocking.

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.

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

Approving. The folder-name cause reproduces here on macOS 26.7.3 arm64 with the pinned box-cli-v0.3.0 archive (sha256 matches boxRelease.json): unpacked into a folder named box, codesign --verify --strict reports invalid Info.plist with Format=bundle, and box --version exits 137. The same file in box-0.3.0, other, Box, ~/.local/share/box/0.3.0 or the CLI cache layout passes and prints box 0.3.0. Two details worth adding to the description: only the folder that directly holds the executable matters (an ancestor named box is fine, and the match is case sensitive), and macOS remembers a passed validation, so a copy that ran once from a good folder keeps running after a move into box. That explains why an earlier check on this Mac saw 0.3.0 run. e2e run 45501254207 at d73bfecc is green, Linux is unchanged.

Follow-ups, in this PR or the next:

  1. BOX_INSTALL_HINT (src/core/project/backends/boxRelease.ts:84-88) and README.md:238-240 still say "unpack it into a folder", and the obvious choice is box. A developer who already has .../box/box on PATH passes the presence check and then gets "Box stopped on .box/profile.toml with exit code unknown and printed no error" from boxProfileResolver.ts:164-171, and the command it suggests also exits 137 silently. Add "on macOS the folder must not be named box" to the hint and the README, and in that no-stderr branch on darwin, when the exit code is null and the resolved box sits in a folder named box, say so and tell the user to rename it. One parameterized test for that branch also guards the developer path.
  2. the box on PATH in boxProfileResolver.test.ts fails with the pinned 0.3.0 on PATH: the fixture in boxProfileResolver-test-support.ts:16 expects a metadata_hosts rule that box 0.3.0 does not write (boxNetwork/places.ts:11-13 already says so). Every macOS developer following docs/box-local-testing.md gets one red test. Drop that line from the fixture and run the test with 0.3.0 on PATH.
  3. The darwin.version override, --darwin-box, BOX_MACOS_HINT (now always empty) and the workflow's .box.<build>.version // .box.version exist only for a macOS build that does not run, and the one case that motivated them was the folder name. I would delete them in all five places. Not blocking.
  4. .github/workflows/e2e-test.yml:178: eventMessage CONTAINS "box" also matches every sandbox message, so the diagnostic tail will mostly miss the kill. Match on "${DIR}" instead.
  5. docs/box-local-testing.md:70-72: say "the folder that directly holds box", since the next command unpacks under ~/.local/share/box/0.3.0, which is fine.

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

Approving. My blocker was an untested macOS install; e2e run 45501254207 at d73bfec (dispatched from box/e2e-macos-box) is green on all four jobs, and the macOS job prints box 0.3.0 after the new install and passes 10 Box tests. With the folder-name cause reproduced on macOS in the other review, the box-<version> folder fix is confirmed. The note about the L3 npm ci running with the e2e AWS credentials remains a non-blocking follow-up, as do the install-hint and README wording that still say "unpack it into a folder".

@mquang-amazon
mquang-amazon merged commit b78ae02 into box-integration Nov 24, 2026
11 checks passed
@mquang-amazon
mquang-amazon deleted the box/darwin-box-v0.3.0 branch November 24, 2026 23:12
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