Skip to content

fix(ci): the live bubblewrap tests run wherever bwrap is installed and skip only where it is missing #1337

Closed

Description

@dan-petty

Problem

Acceptance criteria

  • The hook adds the bubblewrap skip to bwrap-marked tests only where HostSandbox().is_available() is false. It builds HostSandbox once per collection, not once per item, and never runs bwrap while collecting.
  • A regression test, not itself marked bwrap, compares the list of bwrap-marked tests that carry the bubblewrap skip with the expected list. Where HostSandbox().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) in uv run devops ci and in GitHub CI.
  • In the devcontainer, uv run pytest -m bwrap -rs -p no:cacheprovider reports 22 passed and nothing skipped: the 21 marked tests, with tests/test_executable_criteria.py:615 counted 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 bwrap marker, and src/devops_cli/sandbox/ is unchanged.
  • changelog.d/<n>.md records the change; CHANGELOG.md and docs/ROADMAP.md are not edited.
  • uv run devops ci passes.

Key questions

Strategic alignment

Activity

  1. added
    type/bug
    scope/security
    priority/p1-high
    scope/ci
    on Oct 7, 2026
  2. added this to the v0.2.29 milestone on Oct 7, 2026
  3. dan-petty-bot commented on Oct 7, 2026

    @dan-petty-bot
    Collaborator

    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.

    • Priority: P0-Critical. P0: the regression commit 2ec94d4 is evidence GitHub confirms, from a trusted source.
    • Value: Medium. Restores test coverage for the host sandbox so regressions in confinement logic are caught before release, but does not add new user-facing capability.
    • Effort: Low. The fix is replacing 'if True:' with a 'HostSandbox().is_available()' check plus a small regression test; the acceptance criteria are fully specified.
  4. dan-petty commented on Oct 8, 2026

    @dan-petty
    OwnerAuthor

    Assessed against release/v0.2.29 (910b823) on 2026-10-08. The item holds as written, and no criterion changes.

    • tests/conftest.py:873 tests if True:. All 21 bwrap marks (22 cases) are skipped in the devcontainer, where bubblewrap 0.13.0 is installed.
    • With that skip removed, all 22 cases pass. The slowest call is 0.20 s serially, or 0.23 s on 16 workers with coverage. In a full -n logical run, CPU contention brings three of them to 0.43–0.70 s, still under 1 s.
    • A full suite with the skip removed passed: 9355 passed, 1 skipped, 181 s.
    • GitHub runners have no bubblewrap. The pre-refactor(ci): ci installs nothing on the runner, and live bubblewrap tests skip where bwrap is missing #832 job on image 20260927.320.1 installed it as a NEW package, and the current image is 20261004.327.1. So the regression test sees all 22 cases skip there.

    Notes for the PR:

  5. dan-petty-bot commented on Oct 8, 2026

    @dan-petty-bot
    Collaborator

    What changed

    #1407, merged into release/v0.2.29 as 3f1935a.

    Summary

    Resolves #1337.

    Updates pytest_collection_modifyitems in tests/conftest.py to add bubblewrap skips to bwrap-marked items only when HostSandbox().is_available() is false, rather than unconditionally skipping via if True:.

    Adds a regression test in tests/test_host_sandbox.py comparing the collected bwrap-marked items with the expected skip state according to HostSandbox().is_available().

    4 file(s) changed.

    How it was verified

    Check runs at 8e261b3:

    • Prune PR DevContainer Images: pass
    • CodeQL: pass
    • Static Analysis: pass
    • Analyze (actions): pass
    • Analyze (python): pass
    • Tests & Coverage: pass
    • DevContainer Image: skipping
    • Service Image: skipping
    • Dependency Freshness: skipping

    Acceptance Criteria of docs/agent/tasks/task-1337-live-bubblewrap-tests-skip-condition.md:

    • The hook adds the bubblewrap skip to bwrap-marked tests only where HostSandbox().is_available() is false. It builds HostSandbox once per collection, not once per item, and never runs bwrap while collecting.
    • A regression test, not itself marked bwrap, compares the list of bwrap-marked tests that carry the bubblewrap skip with the expected list. Where HostSandbox().is_available() is false, every one of them carries it; where it is true, none does.
    • In the devcontainer, uv run pytest -m bwrap -rs -p no:cacheprovider reports 22 passed and nothing skipped: the 21 marked tests, with tests/test_executable_criteria.py:615 counted twice.
    • On the PR's own GitHub CI run, Tests & Coverage passes and the regression test passes there, showing that the 22 cases skip on a runner without bwrap.
    • No test loses its bwrap marker, and src/devops_cli/sandbox/ is unchanged.
    • changelog.d/1337.md records the change; CHANGELOG.md and docs/ROADMAP.md are not edited.
    • uv run devops ci passes.
  6. added a commit that references this issue on Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p1-highscope/ciscope/securitytype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions