Skip to content

Sandbox: keep the launcher's cross-compilers on the PATH - #58

Merged
daniel-rossier merged 1 commit into
mainfrom
sandbox-keeps-toolchain-path
Nov 29, 2026
Merged

daniel-rossier merged 1 commit into
mainfrom
sandbox-keeps-toolchain-path

Conversation

@daniel-rossier

Copy link
Copy Markdown
Contributor

Every command runs in a bwrap sandbox started with --clearenv and a fixed PATH, so the toolchain directories the launcher put on the container's PATH were lost: a SO3 session found no aarch64-none-elf-gcc and fell back on the host gcc. A directory given with --toolchains was not bound in the sandbox either.

The launcher now exports SPEAR_TOOLCHAINS (the directories it binds). The sandbox binds them read-only and keeps the caller's PATH entries under them, in order, ahead of its own. Tests: LauncherToolchainsReachTheSandboxTests in tests/test_sandbox.py.

test_reds_image ... test_the_image_gives_a_prompt_of_the_other_assistant_what_a_turn_gets already fails on main (it expects a literal /usr/local/bin/spear-claude-context that the multi-file COPY does not spell); untouched here.

The launcher puts the bin directories of the toolchains it binds first
on the container's PATH, but every command runs in a bwrap sandbox
started with --clearenv and a fixed PATH. A session asked to build SO3
found no aarch64-none-elf-gcc and fell back on the host gcc, and a
directory given with --toolchains was not even bound in the sandbox.

The launcher now names the directories it binds in SPEAR_TOOLCHAINS.
The sandbox binds them too, read-only, and keeps the caller's PATH
entries that lie under a bound toolchain directory, in the caller's
order, ahead of its own.
@daniel-rossier
daniel-rossier merged commit 3357ffe into main Nov 29, 2026
2 checks passed
@daniel-rossier
daniel-rossier deleted the sandbox-keeps-toolchain-path branch November 29, 2026 17:42
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.

1 participant