Add owner-mediated bwrap execution boundary

Assistant: codex
Assistant-Model: gpt-5.6-sol
Assistant-Session: 01a06def-6490-7033-8448-2eab2d12ed44
This commit is contained in:
tegwick 2026-09-04 22:12:19 +02:00
parent 877676d1f1
commit d79e3fe358
23 changed files with 1321 additions and 86 deletions

View file

@ -75,4 +75,30 @@ def test_build_reachability_report() -> None:
report = build_reachability_report(status)
assert report["sandbox_id"] == "abc12345"
assert report["ssh_one_liner"] is not None
assert "ops_bridge" in report
assert "ops_bridge" in report
def test_bwrap_report_points_to_owner_execution_not_nsenter() -> None:
now = datetime.now(UTC)
status = SandboxStatus(
sandbox_id="bwrap123",
profile_id="profile.bwrap-local",
extension_id="ext.bwrap",
state=SandboxState.READY,
consumer=Consumer(actor=ActorType.AGT, project="glas-harness", run_id="run-1"),
host="localhost",
reachability=Reachability(
host="localhost",
endpoint="pid:42",
pid="42",
workspace_dir="/tmp/sandboxer-bwrap/bwrap123",
),
created_at=now,
updated_at=now,
)
report = build_reachability_report(status)
assert report["execution"]["mode"] == "owner-mediated"
assert "nsenter" not in str(report)
assert "local_exec_hint" not in report