Skip to content

docs(examples): add Linux EKS and AgentCore Runtime deployment guides - #279

Merged
kevin-orellana merged 4 commits into
mainfrom
feature/linux-launch-examples
Nov 3, 2026
Merged

kevin-orellana merged 4 commits into
mainfrom
feature/linux-launch-examples

Conversation

@kevin-orellana

@kevin-orellana kevin-orellana commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Human readable section

Problem: Readers can clone Box, but the repository does not provide complete Linux deployment examples for Amazon EKS or AgentCore Runtime.

Solution: Add runnable source for an EKS coding workload and a Runtime shipment agent, with full build guides linked from the example and user-guide indexes. Runtime offers Strands and LangChain variants, plus fixed shipment and research controls. Each guide includes prerequisites, deployment, expected refusals, result inspection, and cleanup.

Trade-off: These are evaluation examples with synthetic data and pinned Box revisions. They retain their tested Linux ARM64 and service-configuration limits. This change does not add a production support claim or change Box runtime code.

Description

The EKS example starts with a fixed workload before adding Claude Code and Pod Identity. The Runtime example uses the same shipment service and policy for Strands and LangChain. Its fixed controls let readers inspect policy behavior without model calls.

The full guides cover build, deployment, result inspection, and cleanup. The example and user-guide indexes link to them. Preparation builds the pinned Box source and records binary and dependency hashes. Failed dependency downloads leave no published vendor directory or binaries, so preparation can be retried from the same checkout.

The examples preserve failure evidence and enforce the documented controls. Runtime releases its run lock after allocation failure and stops reparented children after a timeout. Either a completed dispatch or refund closes subsequent mutations within the recorded history window. EKS denies writes to the reference file through both native operations and Box shell tools. Its runner saves an incomplete receipt before collecting bounded diagnostics after a cluster error.

A dedicated Linux ARM64 workflow runs the offline example tests for changes to these examples.

The source tree excludes prebuilt binaries, installed dependencies, deployment receipts, deployment account identifiers, and internal artifact links. The deployment helper uses the caller's AWS profile rather than a personal default.

The EKS sample pins Box f0dc6f49ea8bb8608502afffa50c8748f6c24ca2. The Runtime sample pins Box e4ca8b80359b2213d684de31cd6ef32e0d61478a. Changing either pin requires fresh example validation.

Runtime's shipment policy observes five minutes of response history for one synthetic order and sequential requests. It does not establish permanent exclusivity, concurrent correctness, or recovery after lost responses or restarts. The EKS guide states the required outer-container settings and distinguishes the trusted Pod Identity controller from credential retrieval inside the agent's sandbox.

Related Issues

  • Complements the reference deployment requirements in PR #132. This PR does not depend on that branch. Both change the cloud example index; reconcile that index if both land.
  • Website publication is tracked by Tim's PR #222. This PR adds the source guides without importing the pending publication interface.

Type of Change

New feature: runnable examples and deployment guides.

Testing

Example validation covers b21a1dae93b3786385fbe0f8df676ee421b5f60b. Tests ran on Amazon Linux 2023 ARM64, kernel 6.12.113-138.209.amzn2023.aarch64, Python 3.12.16, and Rust 1.98.1.

Check Result and scope
Offline example tests 120 passed: 71 core tests, 25 Strands adapter tests, 16 real LangChain graph/provider tests, and 8 EKS receipt tests. The LangChain suite blocked sockets and observed zero connection attempts.
Cold adversarial review Three reviewers independently tested the original examples without prior chat or experiment context. A fourth fresh reviewer tested the repair patch. Their reproduced findings and both hosted review findings are addressed.
Runtime preparation and packaging Built the complete pinned Runtime Box source. Installed both pinned framework dependency sets, then prepared and packaged each from clean example directories. Binary and dependency checksum verification passed.
Real Runtime Box controls All 52 shipment checks passed across four scenarios, including refund-first and failed-response controls. All 31 research checks passed across budgeted and static-policy cases. These use the Runtime pin, synthetic loopback services, and no model.
EKS images and controls Built both pinned image targets. The scripted image passed 11 checks. The repaired Claude image passed 11 direct file-policy checks as user 991, with network disabled and the documented outer-container settings.
Failure handling Allocation failure followed by a successful request, reparented-child termination, process-ID reuse, dependency-install failure and retry, and EKS polling/diagnostic failures passed.
Documentation and static checks Prose, Python syntax, and whitespace checks passed. The original change also passed 21 relative link and anchor checks.

No live cloud deployment or model call was performed in this review. Container and local-process results do not qualify EKS, AgentCore Runtime, a model, or other platforms. The guides retain their service-configuration and platform limits. The new hosted example workflow must pass on the final head separately from these local results.

The original change at d6dba878999e8584a8e0ac4c45b47f1d0bf0dedc also passed the full Rust workspace build. Its full test campaign recorded 4703 passes, one policy-template failure, and 17 ignored cases. The unresolved policy port token was corrected to port 0; the unchanged policy-loading test then passed. All other targets and the custom library harness passed. The repair commit changes no Rust code; affected example tests and real Box controls were rerun.

That campaign's Linux skip checker reported an unavailable credential-daemon fixture and an omitted alias-read assertion; alias-write assertions executed. Ignored tests include live HTTPS fixtures, long runs, and existing defects. Repository packaging checks passed all 55 tests after removing inherited SSH environment variables that bypassed the test's mock GitHub command. Repository files were unchanged for that environment correction.

Run the offline tests from their respective example directories:

python run-tests.py
python test_run.py

Build, package, and real-policy control commands are in the example guides. The original repository-wide validation used:

cargo build --workspace --locked --all-targets --all-features
cargo test --workspace --locked --all-features --no-fail-fast -- --show-output --test-threads=2
python3 scripts/check-linux-test-output.py WORKSPACE_TEST_LOG
python3 -m unittest discover -s scripts -p 'test_*.py' -v
cargo fmt --all --check
  • I ran the relevant suites (just check, or cargo test --workspace --all-features). The full run, focused correction, and affected-suite reruns are recorded above.
  • If I touched Rust, I ran cargo fmt --all and cargo clippy --workspace --all-targets --all-features -- -D warnings. Not applicable: this change modifies no Rust source. The formatting check passed.

Checklist

  • I have read the CONTRIBUTING document.
  • I have reviewed and understand every line of code in this PR, including any generated by AI tools, and I can explain why it works. Local preflight completed; Kevin's author confirmation remains pending.
  • My change is focused and reasonably small; I have split unrelated work into separate PRs.
  • I have added any necessary tests that prove my fix is effective or my feature works.
  • I have updated the documentation accordingly.
  • My changes generate no new warnings. The build reported naming warnings in unchanged vendored shell tests.

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

## Problem

Readers cannot clone complete EKS and AgentCore Runtime deployment examples from this repository.
They need source, dependencies, build instructions, and explicit limits to reproduce the demonstrations.

## Solution

Add the EKS coding workload and Runtime shipment agents with Strands and LangChain variants.
Include scripted controls, pinned builds, dependency locks, receipt checks, and cleanup instructions.
Link both guides from the example and user-guide indexes. No Box product interface changes.
Keep policy files loadable with port 0; each runner binds the synthetic service port before launch.

## Tests

The example run-tests.py suite passed 105 tests. Both dependency sets installed on Linux ARM64.
Both Runtime packages built, and real Box shipment and research controls passed after the policy fix.
Both EKS Job variants rendered. Documentation links, Python syntax, JSON, formatting, and whitespace checks passed.
Repository packaging tests passed all 55 tests after removing inherited SSH variables from their process environment.
The full Rust workspace build passed. The workspace suite recorded 4703 passes, one policy-template failure, and 17 ignored cases.
The unchanged every_shipped_example_policy_loads test passed after the template correction; all other targets passed.
The credential-daemon fixture and alias-read assertion remain untested; alias-write assertions executed.
No new cloud deployment, live model call, complete pinned Runtime source build, or EKS image build was run.
@github-actions github-actions Bot added Area - Release documentation Improvements or additions to documentation labels Nov 3, 2026
@kevin-orellana kevin-orellana changed the title examples: add Linux EKS and AgentCore Runtime deployment guides docs(examples): add Linux EKS and AgentCore Runtime deployment guides Nov 3, 2026
@kevin-orellana
kevin-orellana marked this pull request as ready for review November 3, 2026 05:02
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Assessment: Comment

I reviewed head d6dba87; this PR had no earlier review. The examples are carefully bounded. The main gap: the shipment policy does not refuse a refund that comes before a dispatch, but the build guide says Box refuses a competing refund. The fixed sequence does not test that order, so the gap is not visible.

Review Categories
  • Correctness: The mutation closure applies only after a dispatch (see the inline comment, with a policy-engine reproduction and a fix that I checked).
  • Usability: A failed prepare.py cannot be run again in the same checkout.
  • Scope: The diff is about 6,200 lines in 58 files. Two separate PRs, one for EKS and one for AgentCore Runtime, would be easier to review.
  • Testing: CI does not run the example Python suites (run-tests.py). CI only runs the policy-load sweep every_shipped_example_policy_loads on these files.

Checks that held:

  • Each new .dw file loads with port 0, so the rule "each committed policy under examples/ must still load" (root AGENTS.md) holds.
  • Path variants and other hosts are default-denied, because the permits use exact-match lists.
  • /orders/43/eligibility and a failed (409) eligibility check do not allow dispatch.
  • A dispatch 201 refuses later dispatch and refund requests.
  • The research budget (n > 3 over request events) refuses the fourth attempt, as the real Box run records.
  • No frozen strands-box surface or Rust source changed.
  • The deploy helper uses the caller's profile, checks the account, and refuses a stack without its ownership tag.
  • In pod-identity.json, the CreateAgent condition controls the addon.
  • The 29 offline deploy, fixture, and prepare tests pass locally.

@kevin-orellana
kevin-orellana enabled auto-merge (squash) November 3, 2026 05:15
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Assessment: Approve (no new findings at b21a1da)

I re-reviewed the 18 files that changed since d6dba87. Both earlier findings are fixed. refund_closes_mutations is the same rule I checked against the policy engine. The new refund-first scenario asserts the full ordered decision list, including the rule ID. prepare.py now validates the binaries, stages the dependencies, and publishes the binaries last.

Checks that held at this head:

  • prepare.py: A failed pip install publishes nothing (temporary directory, binaries written after), so a retry with the same checkout works. If publishing the manifest fails, vendor/ is rolled back.
  • runtime_app.py: stop_process_tree now matches on PID plus start time only. A child that is reparented during SIGTERM still gets SIGKILL, and a reused PID is still skipped. Starting the temporary directory inside try always releases RUN_LOCK.
  • eks/run.py: Every kubectl call has a timeout. A failed poll or an expired deadline writes incomplete: true with passed: false, and the later receipt update keeps both. A pass requires a succeeded Job, logs exit 0, and state.passed.
  • Claude variant: The reference_readonly forbid now also refuses shell writes to native-readonly.txt, not only native writes.
  • Docs: The rewritten guide claim ("after either resolution") now matches the policy for both orders.
  • cloud-examples.yml: Read-only permissions, persist-credentials: false, and action pinning that matches the other workflows. It installs the LangChain vendor, so the graph tests run instead of being skipped.
  • Local run: run-tests.py (71 + 25 tests) and eks/test_run.py (8 tests) pass.

The PR is still large (about 6,800 lines). Splitting EKS and AgentCore Runtime would still help future reviews, but I don't consider it blocking.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Assessment: Approve (no new findings at 30836d0)

Since b21a1da, this PR adds a merge from main and one commit, 30836d0, which adds the two tutorials to docs/site-manifest.json. The merge does not change any PR-owned files: examples/cloud-deployments/, cloud-examples.yml, and both tutorials are unchanged.

Checks that held:

  • Site manifest (frozen surface, root AGENTS.md): The change only adds pages. It keeps schemaVersion at 1 and changes no existing id or slug, so no retirement is needed (docs/dev/site-manifest.md). Both titles match the H1 of their source page. Guides orders 12 and 13 are unique and stay in one contiguous block, and the new slugs follow the guides/ pattern. cargo test -p strands-box --test site_manifest --locked --all-features passes all 27 tests, with main's manifest and retirement registry supplied as the base.
  • Relative links: The links to README.md#build-from-source and to both example READMEs' #tested-* anchors still resolve after the merge. Because they point to repository files, the published site pins them to the selected commit.
  • After the merge: every_shipped_example_policy_loads still passes. run-tests.py (71 + 25 tests) and eks/test_run.py (8 tests) pass.

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

LGTM

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

Labels

Area - Release documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants