Skip to content

fix(tests): repair the bwrap contract suite and gate it #4715

Description

@dan-petty

Problem or Motivation

By design (docs/TESTING.md:73, 77, 246; change 2149), no automatic run selects the 55 bwrap tests. At main 4330ee4, the suite gives 53 passed, 2 failed and 2 errors in the devcontainer (measured): 'host path reached without a fake: /proc/1/cmdline' and 'network edge reached without a fake'. The marker text at pyproject.toml:221 does not say that default runs deselect these tests.

Saving: None in time. The contract suite of the real sandbox runs again.

Found by the CI and test audit of 2026-11-11. The account runs at most 20 hosted jobs at one time (measured), so each job that does no work makes the queue of each pull request longer.

Proposed Solution & Architectural Design

  • Let a bwrap test read the /proc paths that the sandbox scan needs, or change the 2 cases.
  • Add a devops ci row that runs -m bwrap only where HostSandbox().is_available(), which is the devcontainer.
  • Do not install bwrap on GitHub runners. The row skips with a reason on a host without bwrap.
  • Correct the marker text.

Risk: Low.

Target Subsystem

Security & Vulnerability Scanners (tests/conftest.py, tests/sandbox/test_host_sandbox.py, tests/ai/test_tool_executor_contract.py, src/devops_cli/commands/ci.py, pyproject.toml).

Existing Tool Considered

pytest markers and the existing HostSandbox check. No new tool. Cost: about 20,000 tokens and 2 hours.

Acceptance Criteria

  • pytest -m bwrap on the 2 files gives 55 passed, 0 failed and 0 errors in the devcontainer.
  • devops ci runs the row where bwrap exists, and skips it with a reason on other hosts.

Dependencies

None.

Activity

  1. added
    source/agent
    type/bug
    scope/tests
    status/new
    value/medium
    effort/low
    on Nov 11, 2026
  2. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

  3. added
    priority/p2-medium
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 11, 2026
  4. added a commit that references this issue on Nov 12, 2026
    99cfe97
  5. added
    status/in-review
    and removed
    status/in-progress
    on Nov 12, 2026
  6. removed
    status/in-review
    owner/agent
    on Nov 12, 2026
  7. added a commit that references this issue on Nov 12, 2026
  8. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-12 15:46 UTC

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

    effort/lowpriority/p2-mediumscope/testssource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions