Repository navigation
Description
Problem
-
Every live bubblewrap test is skipped on every host. The collection hook that refactor(ci): ci installs nothing on the runner, and live bubblewrap tests skip where bwrap is missing #832 added tests
if True:where it should ask whether bwrap is installed. As a result, everybwrap-marked item getsskip(reason="bubblewrap is not installed")[code: tests/conftest.py:870-877, the condition at :873]. -
That is 21 tests, or 22 cases.
@pytest.mark.bwrapmarks:- 10 tests in
tests/test_executable_criteria.py(the one at:615runs two cases); - 10 in
tests/test_host_sandbox.py; tests/test_verdict_writers.py:120.
In the devcontainer,
bwrap --ro-bind / / --dev /dev --proc /proc trueexits 0 (bubblewrap 0.13.0, installed by.devcontainer/Dockerfile:23). Even so,uv run pytest -m bwrap -rsreports 22 skipped [measured: 2026-10-07 at 36cfbbb]. - 10 tests in
-
They pass when allowed to run. With the skip removed by a throwaway plugin outside the repository, all 22 cases passed, both in one process and on four workers [measured]. Today neither the pre-push gate nor GitHub CI checks bubblewrap confinement. A regression in
src/devops_cli/sandbox/host.pyor in criteria execution would go unseen. -
How it shipped. The
if True:was already in refactor(ci): ci installs nothing on the runner, and live bubblewrap tests skip where bwrap is missing #832's own commit (2ec94d4, PR refactor(ci): ci installs nothing on the runner, and live bubblewrap tests skip (#832) #1156) and reached main in the v0.2.26 squash e70df90. refactor(ci): ci installs nothing on the runner, and live bubblewrap tests skip where bwrap is missing #832 requireduv run pytest -m bwrap -rsto run every marked test with 0 skipped in the devcontainer. Its task file ticks that box [code: docs/agent/tasks/task-832-ci-installs-nothing-live-bubblewrap-tests-skip.md:18], but no run could have shown it. -
GitHub CI must keep skipping. The Tests & Coverage job installs nothing on the runner [code: .github/workflows/ci.yml:45-65]. refactor(ci): ci installs nothing on the runner, and live bubblewrap tests skip where bwrap is missing #832 measured that the runner image lacks bwrap: its old install step downloaded the package. The hook's question already has an answer in the code.
HostSandbox.is_available()is true when an executable file is found atshutil.which("bwrap")or at/usr/bin/bwrap[code: src/devops_cli/sandbox/host.py:403, :407-409; src/devops_cli/config/defaults.py:436].
Acceptance criteria
- The hook adds the bubblewrap skip to
bwrap-marked tests only whereHostSandbox().is_available()is false. It buildsHostSandboxonce per collection, not once per item, and never runs bwrap while collecting. - A regression test, not itself marked
bwrap, compares the list ofbwrap-marked tests that carry the bubblewrap skip with the expected list. WhereHostSandbox().is_available()is false, every one of them carries it; where it is true, none does. The test fails in the devcontainer before the fix, and it runs (not skipped) inuv run devops ciand in GitHub CI. - In the devcontainer,
uv run pytest -m bwrap -rs -p no:cacheproviderreports 22 passed and nothing skipped: the 21 marked tests, withtests/test_executable_criteria.py:615counted twice. The output is pasted into the PR. - On the PR's own GitHub CI run, Tests & Coverage passes and the regression test passes there, which shows that the 22 cases skip on a runner without bwrap.
- No test loses its
bwrapmarker, andsrc/devops_cli/sandbox/is unchanged. -
changelog.d/<n>.mdrecords the change;CHANGELOG.mdanddocs/ROADMAP.mdare not edited. -
uv run devops cipasses.
Key questions
- Should a host that has bwrap but cannot create namespaces skip too (for example, a runner image with Ubuntu's AppArmor user-namespace limit)? Decided 2026-10-07: no. The ADR "Tests double only process edges, through seams" and TESTING.md's Live test (both delivered by docs(cli): docs/TESTING.md holds the test conventions, ADR 0005 records that tests double only process edges, and AGENTS.md and the contributor docs point to them #1308) skip a live test only where its tool is missing, keeping refactor(ci): ci installs nothing on the runner, and live bubblewrap tests skip where bwrap is missing #832's answer. Such a host would fail real reviews the same way, so the tests fail loudly and a person decides.
- How does the regression test see the skips? (proposed) Through
request.session.items. After the collection hooks run, it holds every collected item on each xdist worker. Run on its own, the test finds nobwrap-marked item and skips with a reason that says so; in a full run it sees all 21. It imports nothing fromtests.conftest, because test(cli): tests find the repository root and fixtures from any depth, import no other test module and build test data with shared builders, and devops test maps a change to its mirror directory #1312 removes those imports. - Why P1? Decided 2026-10-07: sandbox regressions go unseen until this lands.
Strategic alignment
- Milestone: none; the roadmap tooling places it. Depends on: none. Blocks: none. Related: test(cli): tests double only process edges and mirror the source tree #1307; refactor(ci): ci installs nothing on the runner, and live bubblewrap tests skip where bwrap is missing #832 (delivered the hook); feat(review): review tools run through one injectable executor in a network-less sandbox with CPU, memory and time limits #772 (review tools will run in the same
HostSandbox); test(cli): the hermetic floor fails a test that reaches an edge without a fake and resets all process-wide state after every test #1310 and test(cli): every test file sits in the directory mirroring the package it tests or in tests/invariants/, and the root conftest holds only the hermetic floor #1313 (both rewritetests/conftest.py; this fix lands first or rebases). - Evidence tags: [code: path:line] was read at 5c45b1e (release/v0.2.28). [measured: …] was run at 36cfbbb on 2026-10-07; the hook, the marked tests and
src/devops_cli/sandbox/are unchanged between the two commits.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty-bot commentedon Oct 7, 2026
Intake placed this item to v0.2.29: v0.2.28 is cut, so nothing joins it until its release pull request is closed; a critical fix goes first into the next release.
Restores test coverage for the host sandbox so regressions in confinement logic are caught before release, but does not add new user-facing capability.The fix is replacing 'if True:' with a 'HostSandbox().is_available()' check plus a small regression test; the acceptance criteria are fully specified.dan-petty commentedon Oct 8, 2026
Assessed against
release/v0.2.29(910b823) on 2026-10-08. The item holds as written, and no criterion changes.tests/conftest.py:873testsif True:. All 21bwrapmarks (22 cases) are skipped in the devcontainer, where bubblewrap 0.13.0 is installed.-n logicalrun, CPU contention brings three of them to 0.43–0.70 s, still under 1 s.Notes for the PR:
-k "bubblewrap_tests_skip or sandbox", it lists 14 failing node ids before the fix, not 22, because-kdeselects the others. Run the files without-kto see all 22.tests/test_host_sandbox.py::test_host_sandbox_linked_worktree_runs_gitrunsgit commitwith the developer's global git config. A global setting that forces commit signing would make it fail. This is a hygiene note, not a blocker.fix(security): live bubblewrap tests skip condition (#1337) (#1407)
dan-petty-bot commentedon Oct 8, 2026
What changed
#1407, merged into
release/v0.2.29as 3f1935a.4 file(s) changed.
How it was verified
Check runs at 8e261b3:
Acceptance Criteria of
docs/agent/tasks/task-1337-live-bubblewrap-tests-skip-condition.md:bwrap-marked tests only whereHostSandbox().is_available()is false. It buildsHostSandboxonce per collection, not once per item, and never runs bwrap while collecting.bwrap, compares the list ofbwrap-marked tests that carry the bubblewrap skip with the expected list. WhereHostSandbox().is_available()is false, every one of them carries it; where it is true, none does.uv run pytest -m bwrap -rs -p no:cacheproviderreports 22 passed and nothing skipped: the 21 marked tests, withtests/test_executable_criteria.py:615counted twice.bwrapmarker, andsrc/devops_cli/sandbox/is unchanged.changelog.d/1337.mdrecords the change;CHANGELOG.mdanddocs/ROADMAP.mdare not edited.uv run devops cipasses.feat(release): v0.2.29 (#1455)