Skip to content

Run the real-bubblewrap test suites in CI, refusing to skip - #171

Merged
M3gA-Mind merged 7 commits into
tinyhumansai:mainfrom
M3gA-Mind:ci/bwrap-live
Nov 12, 2026
Merged

M3gA-Mind merged 7 commits into
tinyhumansai:mainfrom
M3gA-Mind:ci/bwrap-live

Conversation

@M3gA-Mind

@M3gA-Mind M3gA-Mind commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Main's CI never ran the real-bubblewrap tests.

A new bwrap-live job:

  • makes unprivileged bwrap usable with a new scripts/ci/prepare-bwrap.sh, which installs bubblewrap and lifts the AppArmor sysctl;
  • runs both suites and the bwrap unit tests with TINYBOX_REQUIRE_BWRAP=1, so an unusable bwrap fails the job instead of skipping.

prepare-rootless-native-resources.sh now sources the same script for its sysctl step, so the setup lives in one place.

This job removes the image's preinstalled passt first (it comes in as a podman Recommends) and checks that pasta is gone, so it covers the default shared-host-network path. The pasta job in #170 covers the private-network path with the same setup script plus passt.

Related issue

None filed. Found while proving #160 and #161, whose bwrap tests had only been run on our Linux CI runner.

API or behavior changes

None. CI only.

Validation

This PR's own bwrap-live run is the proof. It must show the bwrap tests running, with [bwrap-real] lines in the log and no skipped: lines. The same suites, with TINYBOX_REQUIRE_BWRAP=1, pass on our Linux CI runner (bubblewrap 0.9.0).

Checklist

  • The change is focused on one logical change
  • No new #[allow(...)], #[ignore], or relaxed lints
  • No secrets, tokens, or .env contents in the diff or the description

GitHub's ubuntu-latest is Ubuntu 24.04, where
kernel.apparmor_restrict_unprivileged_userns=1 makes every bwrap jail fail,
and tests/bwrap_isolation.rs and tests/bwrap_fd_leak.rs then print
"skipped" and pass. No job set TINYBOX_REQUIRE_BWRAP, so main's CI never ran
them. A bwrap-live job now makes unprivileged bwrap usable (new
scripts/ci/prepare-bwrap.sh, shared with the native-resource setup) and runs
both suites and the bwrap unit tests with TINYBOX_REQUIRE_BWRAP=1, so a skip
fails the job.
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 99201b79-340c-4483-a40c-3e185a2feffb
Pre-merge checks: Passed 1 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
Passed Passed checks: 1 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@tinysweeper

tinysweeper Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

Reviewed head: e547468e2a0593a60870edc2479895d3fe2318df

Verdict: Ready for maintainer review · Priority: none
Coverage: Reviewed 3 of 3 files.
Pull request purpose (title): Run the real-bubblew…

Diagnostics and supporting details

Full summary

Pull request purpose (title): Run the real-bubblewrap test suites in CI, refusing to skip. Tiny Sweeper completed its review; deterministic results follow.

Review snapshot

Change surface Files Review signal Count
Production 2 Active findings 0
Tests 0 Noted findings 0
Documentation 0 Resolved findings 0
Configuration 1 Pending checks/questions 0

Completeness: Complete
Test assessment: No supported feature-to-test mapping was available; this does not mean tests are absent or passed.

What changed

Adds a `bwrap-live` CI job and a shared `scripts/ci/prepare-bwrap.sh` that installs bubblewrap and disables the AppArmor unprivileged-userns restriction; `prepare-rootless-native-resources.sh` now sources that script instead of duplicating the sysctl step. The job removes pasta and runs the bwrap integration and unit suites with `TINYBOX_REQUIRE_BWRAP=1`.

Features

  • Added — bwrap-live CI job: Runs the real-bubblewrap suites on ubuntu-latest with `TINYBOX_REQUIRE_BWRAP=1`, so an unusable bwrap fails the job instead of skipping; pasta is removed first so the default shared-network path is the one covered. (.github/workflows/ci.yml jobs:)
  • Added — scripts/ci/prepare-bwrap.sh: Installs bubblewrap if absent and sets `kernel.apparmor_restrict_unprivileged_userns=0` when the sysctl exists, making unprivileged bwrap jails usable on the runner. (scripts/ci/prepare-bwrap.sh)
  • Internal refactor — prepare-rootless-native-resources.sh sources prepare-bwrap.sh: Replaces the inline sysctl step with a source of the shared script, so bwrap setup lives in one place. (scripts/ci/prepare-rootless-native-resources.sh sudo systemctl start "user@${uid}.service")

Tests

No supported feature-to-test mapping was produced. Test execution is not inferred.

Findings

No active actionable findings.

Before merge

None.

Agent review details

critique

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: Reviewed 3 files; 0 findings.

security

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: Reviewed 3 files; 0 findings.

tests

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The tests lane reported the extracted script keeps the same apt/sysctl behavior it replaces and that the new job is itself the regression test: if the setup stops working, those suites fail rather than skip. It also noted actions stay SHA-pinned, no step interpolates untrusted context, and workflow-level `permissions` remain unchanged (`contents: read`).
  • Lane summary: This PR is CI plumbing only: it extracts the AppArmor/bubblewrap setup into `scripts/ci/prepare-bwrap.sh`, reuses it from the rootless native-resource job, and adds a `bwrap-live` job that runs the existing `bwrap_isolation`, `bwrap_fd_leak` and `--lib bwrap` suites with `TINYBOX_REQUIRE_BWRAP=1`, so `support::backend()` returns an error instead of skipping when no working sandbox exists. The extracted script keeps the same apt/sysctl behaviour it replaces, and the new job is itself the regression test for it — if the setup stops working, those suites fail rather than skip. Actions stay SHA-pinned, no step interpolates untrusted context, and permissions are unchanged (workflow-level `contents: read`), so I see nothing to report.

commits

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The commits lane answered that there is no sensitive content in committed files.
  • Lane summary: No sensitive content in committed files.

description

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The description lane reported the diff matches the description: the `bwrap-live` job, `scripts/ci/prepare-bwrap.sh`, and the rootless script sourcing it, with both actions SHA-pinned and workflow `permissions` unchanged so the `.github/workflows/**` path rules are satisfied. It could not verify the premise that no existing job set `TINYBOX_REQUIRE_BWRAP` because `scripts/test-features.sh` was only partially visible, and found nothing wrong in the diff itself.
  • Lane summary: The diff matches the description: it adds the `bwrap-live` job (checkout with submodules, pinned toolchain, `prepare-bwrap.sh`, passt removal with a `pasta`-absent guard, then both integration suites plus `--lib bwrap` under `TINYBOX_REQUIRE_BWRAP=1`), adds `scripts/ci/prepare-bwrap.sh`, and makes `prepare-rootless-native-resources.sh` source it. Both actions stay SHA-pinned and workflow `permissions` are unchanged, so the path rules for `.github/workflows/**` are satisfied. The one thing I could not verify is the premise that no existing job set `TINYBOX_REQUIRE_BWRAP`, because `scripts/test-features.sh` (which exports it) was only partially visible; nothing in the diff itself is wrong.
Evidence and run details
  • Models: ladder/vectors-oai3, deepseek-v4-flash, deepseek-v4.1-flash
  • Spend: $0.024386
  • Completion usage: incomplete; some provider completion costs are unavailable.
  • Tokens: 458438 input · 65890 output · 99200 cached · 234 embedding
  • Updated: 2026-11-12T09:30:18Z
Head State Pass summary
94504ca33c68 ready for maintainer review 0 active finding(s), 0 resolved finding(s) (at 2026-11-11T14:13:19Z)
da6c3395e58d ready for maintainer review 0 active finding(s), 0 resolved finding(s) (at 2026-11-11T18:31:00Z)
b272d0668452 ready for maintainer review 0 active finding(s), 0 resolved finding(s) (at 2026-11-12T06:54:54Z)
2459fb4d48fc ready for maintainer review 0 active finding(s), 0 resolved finding(s) (at 2026-11-12T08:35:45Z)
e547468e2a05 ready for maintainer review 0 active finding(s), 0 resolved finding(s) (at 2026-11-12T09:30:18Z)

tinysweeper 0.1.2

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

Diagnostics

Total spend: $0.0042

@tinysweeper tinysweeper Bot added the priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect. label Nov 11, 2026
@M3gA-Mind
M3gA-Mind merged commit cf430b2 into tinyhumansai:main Nov 12, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant