Skip to content

fix: bootstrap linux sandbox prerequisites#19

Merged
jy-tan merged 1 commit intomainfrom
userns-mapping
Mar 19, 2026
Merged

fix: bootstrap linux sandbox prerequisites#19
jy-tan merged 1 commit intomainfrom
userns-mapping

Conversation

@jy-tan
Copy link
Contributor

@jy-tan jy-tan commented Mar 19, 2026

Summary

Repair Linux sandbox bootstrap in drift-action so replay runs can recover when bubblewrap is installed but user namespace support is still missing on GitHub-hosted runners.

This came up once strict Fence-backed replays started exercising more Linux runners that had bwrap on PATH but still failed with setting up uid map: Permission denied. The action now repairs that gap on hosted runners, while warning instead of mutating self-hosted machines automatically.

Changes

  • add a bwrap --unshare-user preflight after dependency installation so the action verifies that Fence sandboxing can actually start, not just that bwrap exists
  • install uidmap, append /etc/subuid and /etc/subgid entries, and set the bwrap setuid bit when the preflight fails on GitHub-hosted Linux runners
  • avoid automatic system mutation on self-hosted runners by surfacing a warning with the required manual setup instead
  • expand the action tests to cover preflight success, hosted-runner repair, self-hosted warning behavior, and the richer mocked @actions/exec interactions

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 7 files

@jy-tan jy-tan merged commit cbc354d into main Mar 19, 2026
7 checks passed
@jy-tan jy-tan deleted the userns-mapping branch March 19, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant