← Back to Pull requests

ci: run every bwrap job on bubblewrap 0.12.0, cached per Ubuntu release #405

Closed
unknown closed this pull request without merging on Nov 14, 2026 20:47 UTC
View on GitHub
unknown unknown commented on Nov 14, 2026 17:27 UTC
Author

The jobs that run the real bwrap (integration and e2e on 22.04, 24.04 and 26.04, e2e-real-systemd, and coverage's integration shards) ran whatever bubblewrap each runner's release ships: 0.6.1, 0.9.0 and 0.11.1. install.sh warns below 0.12.0, which fixes CVE-2026-87766, and the engine is going to require it. So CI was testing on versions we tell users not to run.

A new composite action, .github/actions/bwrap, gives each of those jobs bubblewrap 0.12.0 as ./install.sh --rebuild-bwrap builds it from Ubuntu's 0.12.0-1 source with the pinned sums. Rebuilding in every job would cost about a minute each, so the built .deb is kept in the Actions cache. The key is the source version, the Ubuntu codename, the architecture and a hash of install.sh's pinned source (version, URL, the three SHA-256 sums) and its rebuild_bwrap function. A change to what or how it builds rebuilds; any other installer change keeps the cache.

On a hit the action installs the cached package with apt-get and checks it: bwrap reports 0.12.0, the package is this release's build (0.12.0-1~<codename>1), and a user-namespace sandbox runs. A cached package that fails any of that is removed and built over in the same job, which names the gh cache delete that drops the entry. On a miss it runs the rebuild and saves the package only after the same check. Where a release's apt offers 0.12.0 or newer, the action installs that and leaves the cache alone. It relaxes the AppArmor restriction on unprivileged user namespaces before anything else, because the rebuild's own last step needs it.

Each job handles its own miss instead of waiting on a separate build job. A miss happens on this PR's first run, on main's first run after the merge (a PR's cache entries are visible to that PR alone), after a change to the pins or the recipe, and after GitHub evicts the entry (7 days unused, or the 10 GB limit). A build job, by contrast, would add a dependency to every run.

The e2e job checks the dry run of --rebuild-bwrap twice: on the distribution's bubblewrap it must say what install.sh says there (the plan, or nothing to rebuild where the release ships 0.12.0 or newer), and after the action it must say there is nothing to rebuild. The integration tests that skip where bwrap has no --overlay now also run on 22.04 and 24.04.

Expected effect on CI time: a cache hit adds a few seconds per job, about what installing the distribution's bubblewrap cost before. A miss adds about a minute to each bwrap job of that release, in parallel.

Measured locally, in fresh ubuntu:22.04, 24.04 and 26.04 containers running the action's steps with a local directory as the cache:

  • Build on a miss: 56 to 82 s.

  • Install on a hit: 0.5 to 2.9 s.

  • A cached package that is truncated, or built for another release, is rebuilt in the same job (64 s and 60 s on 24.04), with no save.

  • The two dry-run checks pass before and after the install, and each fails on the wrong bubblewrap version.
  • What only the first CI run can show:

  • The cache actions working from a composite action, and how long restore takes.

  • The rebuild on the real runner images, including the sysctl being enough there.

  • Hits on re-runs, and parallel misses saving without failing.

  • The suites passing on 0.12.0, including the newly running --overlay tests on 22.04 and 24.04.
  • ---
    _🤖 Drafted by Claude Code (an AI agent) and reviewed & approved by pearu._

    Diff: 426 lines (+319 / -107) across 5 files Reviewer: pearu Review duration: 200m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 426 lines diff across 5 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.362
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #405"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 45.1% (MEDIUM) · Higher = larger blast radius
    45.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.8% · Safe to merge
    17.8%