Skip to content

ci: require native Linux x86-64 runtime tests - #446

Merged
kevin-orellana merged 2 commits into
mainfrom
feature/linux-x86-ci-20261113
Nov 16, 2026
Merged

kevin-orellana merged 2 commits into
mainfrom
feature/linux-x86-ci-20261113

Conversation

@kevin-orellana

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

Copy link
Copy Markdown
Collaborator

Description

Linux x86-64 support is experimental, but pull request checks currently run Linux only on ARM64. Add native Ubuntu x86-64 jobs to the existing workspace and deterministic containment suites. Their failures contribute to the existing required CI Gate check.

The x86 jobs set Box's EXPERIMENTAL_X86_SUPPORT environment variable to exactly TRUE before running Box. Existing portable tests and the process-lifecycle runner now admit x86-64. On Linux x86-64, the shared Box test helper treats that exact opt-in as a prerequisite: an absent or different value produces a skipping: diagnostic before tests try to start Box. The helper never enables the flag itself. CONTRIBUTING.md tells local contributors how to enable it.

The same assertions, namespace requirements, skip checks, and failure rules apply on both Linux architectures. The existing Linux test-output checker rejects the new prerequisite skips, so a job that omits the flag still fails. The new opt-in prerequisite does not change ARM64 or macOS tests. The manual full-test workflow also offers the x86 runner.

Figure 1: Native ARM64, x86-64, and macOS jobs contribute to the required check. The x86 jobs enable the experimental runtime. Other existing gate dependencies are omitted.

Ubuntu ARM64, Ubuntu x86-64, and macOS each run workspace and deterministic tests. Their results feed CI Gate, which requires successful jobs on each selected runner. The x86 jobs explicitly enable experimental support.

Editable diagram.

Related Issues

Part of #45 (X2: required native x86 test coverage). Also supports the shared CI work in #48. Packaging, download selection, and release qualification remain separate milestones.

Type of Change

Other: continuous integration coverage and test-host admission.

Testing

Final revision: da780d7. Hosted checks for this revision passed all three workspace jobs, all three deterministic containment jobs, and CI Gate. The earlier local and hosted results below apply to the earlier revision 8e70c1f, before the ten-line test-helper and documentation fix.

The final Ubuntu x86-64 workspace reported 5,623 passed, 20 ignored, and zero failures. The unchanged skip checker accepted only the two existing alias-read and missing credential-daemon gaps, with no missing-opt-in diagnostics. Its containment job passed 3/3 filesystem-mode tests, 131 deterministic cases, and 7/7 process-lifecycle checks; the deterministic result includes 10 declared macOS-only exclusions and records all 141 expected cases.

On macOS, the informational signed-native receipt check reported a stale receipt. That step is unchanged from the base and explicitly permits failure. The macOS test bridge_denials_shutdown_errors_and_signed_device_ids in test-native-filesystem/tests/bridge.rs also returned before its checks for permission events, device identifiers, and shutdown errors because the runner lacks the macOS 27 software development kit (SDK). The successful macOS job does not establish that either check passed.

The fix passed native x86 controls using cargo test -p strands-box --all-features --test box_shell_cwd and the unchanged Linux test-output checker:

EXPERIMENTAL_X86_SUPPORT Test behavior Checker result
Unset 15 prerequisite skips; no test assertions executed Exit 1, as required
FALSE 15 prerequisite skips; no test assertions executed Exit 1, as required
true 15 prerequisite skips; no test assertions executed Exit 1, as required
TRUE 15 passes; all test bodies executed; zero skips Exit 0

Before the fix, the same suite on 8e70c1f failed all 15 tests when the flag was unset; the base helper did not admit x86-64. Formatting and focused Box Clippy passed after the fix. The final hosted run also passed after this fix.

Earlier hosted run: 43477815663 passed all three workspace jobs, all three deterministic jobs, and CI Gate. The hosted ARM64 workspace reported 5,619 passed, 20 ignored, and zero failures, including all nine mcp_alias_fallback tests. Its unchanged skip checker accepted only the existing alias-read and missing credential-daemon gaps. The hosted checkout's tree matches 8e70c1f.

Earlier local validation at 8e70c1f:

  • Native Amazon Linux 2023 x86-64: full workspace passed with 5,623 passed, 20 ignored, and zero failures. The unchanged skip checker accepted only the existing alias-read and missing credential-daemon gaps, each once. Workspace-wide all-targets/all-features Clippy and formatting checks passed, using the repository's existing vendor lint allowances.
  • Native Linux ARM64: the full workspace finished with 5,617 passed, two failed, and 20 ignored. Both failures are the existing mcp_alias_fallback fixture error described below. All 46 tests in the ten affected integration suites passed. Scoped Clippy and the build without default features passed.
  • ARM64 deterministic containment: 131 passed, with 10 declared macOS-only exclusions and zero failures. All seven process-lifecycle checks passed.
  • Native x86 release-build checks: build passed; 3/3 filesystem-mode tests, 131 deterministic cases, and 7/7 process-lifecycle checks passed on their first runs. The deterministic suite recorded all 141 expected cases, including 10 declared macOS-only exclusions, with no failures or quarantine. The lifecycle shutdown cases left no surviving descendants and stopped their heartbeats.
  • Regression controls: 13 runner tests and 88 packaging tests passed. The unchanged runner fails the new x86 admission test; removing unsupported-host refusal also fails its negative test. Eight controlled inputs to the exact pinned gate action produced the expected results, including failure and cancellation refusal.
  • Both required reusable workflows pass Actionlint 1.7.12. The manual workflow has the same pre-existing cache-mode schema error in the base and candidate; no new lint error was introduced.

The local ARM64 run failed while starting the alias test executable with ETXTBSY (Text file busy). The fixture source is unchanged. An isolated, immutable base build at 70eb3af reproduces the same failure; the affected candidate cases pass alone and fail intermittently in a parallel group. The failed full-suite result and base controls remain recorded. The later hosted pass does not establish a repair. This PR preserves all failure rules, and the shared fixture repair remains outside X2.

At 8e70c1f, the x86 patch compiled and passed 34 tests that were previously excluded. Another 16 existing tests executed their assertions instead of returning early for ARM-only restrictions. All code, runners, and workflows used in that native validation match published revision 8e70c1f; this correspondence predates the ten-line review fix. The local deterministic report retains box_commit: unknown; separate source and executable hash records identify the tested build. These checks use locally built executables and do not qualify a published package or installer.

The diagram uses the pinned draw.io container at scale 2 with a 20-pixel border. The existing startup diagram re-export was byte-identical. The new diagram passed layout checks and was visually inspected.

  • I ran the relevant suites (just check, or cargo test --workspace --all-features)
  • If I touched Rust, I ran cargo fmt --all and cargo clippy --workspace --all-targets --all-features -- -D warnings

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
  • 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

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

## Problem

Experimental Linux x86-64 support has no native pull request test jobs.
ARM-only test guards also leave existing containment assertions untested
on x86-64, so the required CI Gate cannot catch those regressions.

## Solution

Add Ubuntu x86-64 to the existing workspace and deterministic test matrices.
Enable EXPERIMENTAL_X86_SUPPORT only in the x86 jobs. Admit x86-64 in
portable Rust tests and the installed-package lifecycle runner. Preserve
existing assertions, namespace prerequisites, skip checks, and gate policy.
Update the manual workflow and contributor documentation. No production
permissions, startup defaults, or packaging behavior change.

## Tests

The native x86 workspace passed: 5,623 passed, zero failed, 20 ignored.
The unchanged Linux output checker, workspace Clippy, and formatting passed.
The new runner admission tests fail against the old x86 guard; all 13 runner
tests and 88 packaging/script tests pass. Removing unsupported-host refusal
fails the negative runner test. Required reusable workflows pass actionlint.
Eight controlled inputs to the pinned gate action preserve failure handling.

ARM deterministic tests passed 131 cases, with ten declared macOS-only
exclusions; all seven lifecycle cases passed. The full ARM workspace retains
two ETXTBSY failures in the unchanged mcp_alias_fallback fixture. An immutable
base build reproduces that launch failure. All 46 affected integration tests
pass. This shared fixture repair is outside the x86 CI milestone.

Native x86 release-mode and lifecycle checks are running. Candidate hosted
matrix checks and macOS validation await publication. These pending checks
and the ARM fixture failure remain explicit validation limits.
@github-actions github-actions Bot added chore Maintenance tasks, dependency updates, CI changes, refactoring with no user-facing impact Area - Release strands-running labels Nov 13, 2026
@kevin-orellana
kevin-orellana enabled auto-merge (squash) November 13, 2026 18:00
@github-actions

Copy link
Copy Markdown

Assessment: Comment

The CI wiring looks correct. I found one problem in how tests are admitted, covered in the inline comment: on x86-64, box-spawning tests now fail instead of skipping when a contributor runs them locally without EXPERIMENTAL_X86_SUPPORT=TRUE. I reproduced this at 8e70c1f.

Assumptions and rules checked that held
  • Refusal tests under the CI-wide opt-in: linux_startup.rs and box_library.rs::x86_startup_matrix call env_remove on the variable, so they still test refusal even though GITHUB_ENV sets it.
  • Opt-in reaches every Box process in CI: the fixture, the test-integ harness (its env_clear calls apply only to host probes), and target_validation.py (dict(os.environ)) all inherit the variable.
  • Skip checker: check-linux-test-output.py contains no ARM-specific text, so it applies the same rules on x86.
  • Artifact names and caches: artifact names are keyed by matrix.os, so ARM and x86 jobs don't collide. The rust-cache key includes the OS and the rustc host.
  • CI Gate: the gate consumes toJSON(needs), so the new matrix legs feed it without changes to ci.yml.
  • Containment-library tests (child_ipc, *_linux.rs, test_probe): they don't go through the Box preflight, so the opt-in doesn't apply to them. That is consistent with crates/containment/README.md Platform Support.
  • Frozen surfaces and premises (root AGENTS.md, crates/box/AGENTS.md x86 consent rule): no product code or interface changes. The opt-in check in platform::preflight is unchanged.
  • Packaging, download, and release paths remain ARM64-only, as the PR scope says.

The ARM64 ETXTBSY failure is documented clearly and kept separate from this change.

@github-actions

Copy link
Copy Markdown

Assessment: Approve (from my side; no open findings)

Re-reviewed at da780d7. The x86 opt-in is now a prerequisite in the shared Box test helper, so local x86-64 runs without it skip, and the CI skip checker still turns a missing opt-in into a job failure. I found no new issues.

Assumptions and rules re-checked at da780d7
  • Opt-in values: the helper skips for any value other than exactly TRUE. That includes unset, FALSE, and lowercase true, which matches platform::preflight. I checked unset, FALSE, and TRUE on an x86-64 host.
  • CI strictness: an x86 job without the opt-in produces 15 Unexpected skip errors in check-linux-test-output.py (I ran the checker against the unset log), so a dropped workflow step can't pass silently.
  • Refusal coverage: linux_startup.rs and box_library.rs::x86_startup_matrix set or remove the variable on the child process themselves and don't call the helper, so they still run.
  • In-process tests (boundary.rs live tests, containment *_linux.rs): they don't pass through Box preflight, so the opt-in doesn't apply.
  • Docs: CONTRIBUTING, docs/dev/linux-target-tests.md, and test-integ/README.md now tell local x86 users to export EXPERIMENTAL_X86_SUPPORT=TRUE. That matches the helper's skip text.
  • Held from the previous review: artifact and cache keys, CI Gate aggregation, frozen surfaces, and the scope that keeps packaging ARM64-only.

The hosted run for da780d7 was still pending when the PR description was written. Its result is the remaining gate.

@kevin-orellana
kevin-orellana merged commit 2f2abbb into main Nov 16, 2026
28 checks passed
@kevin-orellana
kevin-orellana deleted the feature/linux-x86-ci-20261113 branch November 16, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area - Release chore Maintenance tasks, dependency updates, CI changes, refactoring with no user-facing impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants