linux-sandbox test brittleness: cwd='/' exact bwrap argv depends on host /.git
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- linux, rust
- Domain
- operating-systems, security, testing
Research direction
Start with the linux-sandbox test bwrap::tests::mounts_dev_before_writable_dev_binds and run it on a host with and without /.git. Keep the assertion focused on --dev /dev preceding the writable /dev bind, while avoiding host-dependent exact argv matching. Done means the test validates mount ordering consistently without treating the expected /.git carveout as a failure.
Written by the indexing model from the issue text.
Description
Codex version
v0.117.0-alpha.13
Summary
A linux-sandbox unit test failed on my machine because it has a real /.git directory.
The failing test was:
bwrap::tests::mounts_dev_before_writable_dev_binds
What happened
The test uses cwd = "/" with a WorkspaceWrite policy. In that setup, / becomes a writable root. The policy's default protected subpaths include .git, so if /.git exists, bwrap args include:
--ro-bind /.git /.git
On my machine, /.git exists, so the generated argv had that extra carveout and the test failed because it expected an exact hardcoded argv list without /.git.
Why this is confusing / brittle
The test intent is to validate mount ordering for /dev, but exact full-vector matching makes it host-dependent when / is the writable root.
That means:
- host with
/.git: extra/.gitcarveout appears - host without
/.git: no extra carveout
So the same code can pass/fail depending on host filesystem state.
Important clarification
The /.git carveout itself is expected behavior (security policy), not the bug.
The brittle part is the test shape:
- exact argv equality in a root-cwd scenario where protected subpaths are host-dependent.
Suggested test strategy
- Keep asserting the behavior under test (
--dev /devcomes before writable/devbind). - If testing exact vectors, either:
- run with a temp cwd (not
/), or - include conditional expectation for
/.gitwhen it exists.
- run with a temp cwd (not
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100