Skip to content

feat(bundle): Make hull the runtime when the bundle carries it - #44

Open
ananos wants to merge 3 commits into
mainfrom
feat/hull-default
Open

ananos wants to merge 3 commits into
mainfrom
feat/hull-default

Conversation

@ananos

@ananos ananos commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

The launcher defaulted BRIG_RUNTIME to nerdctl and left hull an opt-in, because brig refused on hull on Linux what the agent profiles ask for. brig v0.6.0 serves all of it there (isolated network, egress policy, routes, published ports), so this makes hull the default when the bundle carries one, and nerdctl when it does not.

Details

  • scripts/build-bundle.sh: DEFAULT_RUNTIME is hull when HULL_INSTALLED, else nerdctl; the launcher exports BRIG_RUNTIME="${BRIG_RUNTIME:-$DEFAULT_RUNTIME}". BRIG_RUNTIME still wins, and the binary still follows the runtime.
  • README: hull is the runtime; BRIG_RUNTIME=nerdctl for what hull refuses (an image whose USER is a name), and for a sandbox booted on nerdctl before, since a sandbox stays on the runtime that booted it.

Merge order: this needs a bundle whose brig is v0.6.0 or later. With the v0.5.0 the bundle carries today, the default would put the shipped profiles on a brig that refuses them on hull. So it goes in with the BRIG_VERSION bump after brig v0.6.0 is tagged, not before. brig's side is brig-sh/brig#683.

tests/*.sh pass locally. Not done here: a bundle build and a boot with the new default; CI builds the bundle.

The launcher defaulted BRIG_RUNTIME to nerdctl and left hull an opt-in,
because brig refused on hull on Linux what the agent profiles ask for: an
isolated network, an egress policy, routes and published ports. brig
v0.6.0 serves all of them on hull on Linux, on a network gateway of the
sandbox's own, and also defaults to hull when a hull is on PATH.

The launcher now defaults to hull when the bundle carries one, and to
nerdctl when it does not. BRIG_RUNTIME still names either, and nerdctl
stays in the bundle for what hull on Linux refuses, such as an image
whose USER is a name.

This needs the brig in the bundle to be v0.6.0 or later: an older brig
refuses those profiles on hull. It lands with the BRIG_VERSION bump.

Signed-off-by: Anastassios Nanos <ananos@nofire.ai>
The bundle check asserted that the launcher defaults to nerdctl and that BRIG_RUNTIME=hull switches to hull. With hull the default when the bundle carries it, the check now asserts the reverse: hull by default, nerdctl one setting away, and a re-sourced launcher that follows a switch to nerdctl.

Signed-off-by: Anastassios Nanos <ananos@nofire.ai>
@ananos
ananos marked this pull request as ready for review November 19, 2026 08:40

@cmainas cmainas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you @ananos . Just a couple of comments. But overall, it looks ok

Comment thread README.md
and puts each networked sandbox on a network gateway of its own, which enforces
the egress policy and serves routes and published ports. nerdctl stays in the
bundle, and `BRIG_RUNTIME=nerdctl` selects it, for instance for an image whose
`USER` is a name, which hull on Linux refuses:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let;s just also mention here that this requires brig v0.6.0 as the comment at scripts/build-bundle.sh:1101-1103

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done in f56ad86: the README says hull as the runtime needs the brig in the bundle to be v0.6.0 or later, and the launcher's comment says the same.

Comment thread .github/workflows/ci.yml
sh -c ". '$t/etc/brig-env.sh'; BRIG_RUNTIME=hull; . '$t/etc/brig-env.sh'; echo \"\$BRIG_RUNTIME \$BRIG_RUNTIME_BIN\"")"
[ "$got" = "hull $prefix/bin/hull" ] \
|| { echo "the launcher re-sourced for hull kept nerdctl: got '$got'"; exit 1; }
sh -c ". '$t/etc/brig-env.sh'; BRIG_RUNTIME=nerdctl; . '$t/etc/brig-env.sh'; echo \"\$BRIG_RUNTIME \$BRIG_RUNTIME_BIN\"")"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

the test that sources the launcher twice now covers only a switch from hull to nerdctl. It previously tested nerdctl to hull, the case the binary reset was written for. Keep both directions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

right, that was the case the reset was written for. Both directions are back in f56ad86: hull to nerdctl, and nerdctl to hull.

…witches

The README and the launcher's comment now say that hull as the default takes a brig of v0.6.0 or later, as the merge note of this change does. The CI check that sources the launcher twice tests a switch from nerdctl to hull again, the case the binary reset was written for, beside the switch from hull to nerdctl.

Signed-off-by: Anastassios Nanos <ananos@nofire.ai>
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.

2 participants