Skip to content

feat: remove the Linux x86-64 startup opt-in - #523

Merged
kevin-orellana merged 3 commits into
mainfrom
feature/x86-default-startup-20261118
Nov 19, 2026
Merged

kevin-orellana merged 3 commits into
mainfrom
feature/x86-default-startup-20261118

Conversation

@kevin-orellana

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

Copy link
Copy Markdown
Collaborator

Description

On Linux x86-64, Box stops workload startup and policy-schema generation unless the operator sets the Box environment variable EXPERIMENTAL_X86_SUPPORT to TRUE. This PR removes that requirement. Startup now proceeds after normal configuration validation and required sandbox setup. Existing process hardening and Linux sandbox restrictions still apply.

Command-line and library tests cover startup with the variable unset and with deliberately varied values. Continuous integration and installation instructions stop setting the variable. Release verification rejects older x86 packages that still require it, and package smoke tests clear inherited values so the operator's environment cannot hide that regression.

The retired variable no longer prevents accidental x86 execution; operators still need to qualify their deployment. Box still refuses configurations that enable native-filesystem-policy on x86. The release workflow's publish_linux_x86 archive selector retains its false default. Affected documentation and the startup decision are updated; dependencies and lockfile versions are unchanged.

Related Issues

Related #45. Publication and public-download verification remain separate work. The absolute-shell-path limitation in #508 is unchanged.

Type of Change

New feature

Testing

Runtime verification covers c800a4f1, based on 6f4a2e3. The follow-up commit e3b9b795 changes only contributor guidance, README wording, and a workflow comment; runtime code and tests are unchanged. Test commands unset both EXPERIMENTAL_LINUX_SUPPORT and EXPERIMENTAL_X86_SUPPORT; matrix cases and comparison controls supply explicit values.

The image cleanup in 0d05b710 deletes three PNGs and their Draw.io sources; runtime code and tests are unchanged. Reference checks and git diff --check passed for this cleanup; runtime suites were not rerun.

Check Result
Linux ARM64 workspace tests, all features 3,980 passed, zero failed, 15 ignored; custom library harness passed.
Workspace formatting and strict Clippy Passed: cargo fmt --all --check and cargo clippy --workspace --all-targets --all-features -- -D warnings.
Both Linux builds and native x86 focused tests Builds passed. All 11 selected native tests passed: six startup, two directory-denial, and three containment cases, plus the custom library harness. No selected skips or warnings.
Affected Python suites All 62 tests passed.

The hosted CI run also passed on runtime revision c800a4f1. Ubuntu 24.04 x86-64 and ARM64 workspace suites reported 3,984 and 3,980 passes respectively, zero failures, and 15 ignored tests each. Both Linux containment suites passed. The macOS workspace and containment suites passed, but its bridge enforcement checks skipped because the runner lacks the macOS 27 SDK. The informational signed-receipt check reported a stale receipt; the full signed native enforcement suite did not run. Existing ignored tests and skip diagnostics remain in the logs; these results do not qualify a published package.

Workspace tests used default Cargo output capture, which can hide prerequisite-skip messages. Independent feature and integration reviews found no product defect. Documentation review identified stale startup guidance; the follow-up corrects it and verifies all four named tests and the decision link.

Earlier validation and its limits

These results cover 053f28dd, based on 1531af7b, before the rebase onto 6f4a2e3. They do not establish full native-suite or package qualification of c800a4f1.

Check Result
Linux ARM64 Box suite, all features 1,725 passed, zero failed, seven ignored; custom library harness passed.
Native x86-64 Box suite, all features Failed: 1,722 passed, four failed, seven ignored; exit 101.
Both-platform startup, builds, package lint, formatting Passed. Independent controls made the new x86 tests fail when the old startup check was restored.
Documentation and Python checks 28 documentation-site checks and 62 Python tests passed, with independent regression controls.
Native default-feature local release package Ten package assertions and seven process cases passed with both retired variables unset, positive controls, and no rescue cleanup.

Three native failures came from an incomplete dependency cache, reproduced on the candidate and a comparison copy with the former startup check restored. cargo fetch --locked preserved all 1,174 source hashes; those three checks then passed.

The fourth was a Model Context Protocol (MCP) catalog-response timeout. The exact case passed quiet isolated runs with both variables unset on the candidate and the x86 variable set to TRUE on the comparison copy. Its cause remains unconfirmed. These follow-ups are neither a clean full-suite repeat nor an exact-base comparison.

Both suites retain seven ignored tests and the alias-read assertion skip: the test launcher cannot grant execution while denying read access. Its write assertions ran. This earlier validation did not run a macOS or cloud matrix. These checks do not establish complete application compatibility or a published release.

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

@github-actions

Copy link
Copy Markdown

Important (blocks merge): crates/box/AGENTS.md still describes the x86 startup gate as a crate invariant. This PR deletes the code and tests that the rule points to.

Example: crates/box/AGENTS.md:94-102 is unchanged at c800a4f. It still says:

Linux x86 command execution requires explicit operator consent. command::execute calls platform::preflight before hardening, runtime creation, host callbacks, or configuration reads. The operator must set EXPERIMENTAL_X86_SUPPORT to the exact value TRUE. … linux_startup::linux_commands_require_exact_x86_opt_in_only_on_x86 and box_library::x86_startup_matrix cover admission and refusal through both entry paths.

After this PR, platform.rs and ConfigError::ExperimentalX86Support are gone, and the opt-in requirement has been removed. The two named tests no longer exist; they are now linux_commands_validate_configuration_regardless_of_x86_opt_in and linux_library_ignores_retired_x86_opt_in. The root AGENTS.md asks agents to read the crate AGENTS.md before they change code. It also says feature-critic treats an unapproved change to the contract as a BLOCKER. So the next agent that reads this bullet will treat the missing gate as a regression to restore, or flag this behaviour as a contract violation. The design docs (decisions.md, containment.md) were updated, but the crate's rule file was not. That leaves two sources that disagree about one fact.

Suggestion: In this PR, replace that bullet with the new invariant: no startup opt-in on Linux, EXPERIMENTAL_X86_SUPPORT has no effect, and native-filesystem-policy is still refused on x86. Cite the renamed tests. The root AGENTS.md asks for explicit approval before changing externally observed behaviour or the files that guide agents. Issue #45 also says merge approval is still pending. So please link the maintainer approval for removing the gate in the PR description. (Minor: README.md:180 still says "experimental Linux x86-64", and the README section this PR edits now drops that wording.)

@github-actions

Copy link
Copy Markdown

Assessment: Request Changes

The code change is small and correct. On a native x86-64 Linux host, all 5 linux_startup tests passed (the native-policy case is feature-gated out of a default build), and scripts/test_smoke_linux_package.py passed. One blocker remains: the crate's AGENTS.md still describes the removed gate as an invariant (see the comment above).

Assumptions and rules checked that held
  • Release x86 check: an old source that still has the preflight prints a refusal without the config path, so it fails. A new source reaches ConfigError::Read ("cannot read config file {path}"), so it passes. A source gated by the legacy EXPERIMENTAL_LINUX_SUPPORT also fails, because both variables are unset. The check runs natively on ubuntu-22.04 (glibc 2.35 ≥ 2.34 build). This mirrors the existing ARM64 check.
  • With the preflight removed: x86 run and generate-schema reach configuration validation for every tested value of the variable (unset, TRUE, true, empty, non-UTF-8). Existing scripts that set TRUE see no change. ARM64 is unchanged. The library entry goes through the same command::execute.
  • native-filesystem-policy is still refused on x86 by its own check. That check does not depend on the removed gate.
  • The namespace_launcher_is_usable skip and the CI variable were removed together, so x86 Box tests now run without a silent skip on an unset variable.
  • download.sh, smoke-linux-package.py, and the release-notes body no longer mention or depend on the variable. No other workflow, example, or test-integ fixture still sets it.
  • No public library API was added; the removed ConfigError variant was pub(crate).

Clear test matrix, and the release guard that rejects older packages is a good addition.

Replace the stale crate invariant and test references so later changes preserve startup without the retired flag. Remove the experimental label from the README and CI comment. Runtime code and executable workflow settings are unchanged.
@github-actions

Copy link
Copy Markdown

Assessment: Approve

Re-review at e3b9b79. Since c800a4f, only crates/box/AGENTS.md, README.md, and one workflow comment changed. The Rust code and tests I verified before are unchanged. The earlier blocker is resolved.

Checks that held at this head
  • AGENTS.md rule: the new bullet in crates/box/AGENTS.md matches the code. Box has no startup opt-in on Linux, neither retired variable is read anywhere in crates/*/src, and x86 still refuses native-filesystem-policy.
  • Cited tests: all four exist, namely linux_commands_validate_configuration_regardless_of_x86_opt_in, linux_workload_runs_without_startup_opt_ins, linux_library_ignores_retired_x86_opt_in, and x86_native_policy_is_refused_before_state_or_schema_creation.
  • Decision link: the anchor decisions.md#linux-x86-startup-requires-explicit-consent still resolves. The explicit <a id> was kept above the retitled heading, so existing links keep working.
  • Leftover wording: no "experimental x86" text remains in Markdown, workflows, or shell scripts.

One item remains for maintainers, and no code change can settle it. The root AGENTS.md requires explicit approval for changes to externally observed behaviour. The PR description does not link that approval yet.

zastrowm
zastrowm previously approved these changes Nov 19, 2026
@github-actions

Copy link
Copy Markdown

Assessment: Approve

Re-review at 0d05b71. Since e3b9b79, the only change is the deletion of three x86 diagram pairs, .drawio and .png: linux-x86-ci, linux-x86-package-build, and linux-x86-runtime-startup. Code, tests, and every other document are unchanged from the head I approved before.

Checks that held
  • Orphaned assets: no Markdown file, manifest, or script references these files at this head or on main. They were already unused on main, so no rendered page loses a figure.
  • Frozen surfaces: docs/site-manifest.json and site-manifest-retirements.json are unchanged, so no frozen publication surface is affected.
  • PR description figure: the description embeds the startup figure through a URL pinned to commit c800a4f, which still resolves.

As before, the maintainer approval that the root AGENTS.md requires for this behaviour change is still not linked in the PR description.

@kevin-orellana
kevin-orellana merged commit 85c811d into main Nov 19, 2026
21 of 22 checks passed
@kevin-orellana
kevin-orellana deleted the feature/x86-default-startup-20261118 branch November 19, 2026 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants