Skip to content

chore(egress): setup-gates.sh — one-shot G1/G2 runner for bare Linux#158

Merged
jraicr merged 1 commit into
devfrom
feat/egress-gate-setup
Jun 5, 2026
Merged

chore(egress): setup-gates.sh — one-shot G1/G2 runner for bare Linux#158
jraicr merged 1 commit into
devfrom
feat/egress-gate-setup

Conversation

@jraicr

@jraicr jraicr commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

What

A one-shot runner that bootstraps and executes the v0.4.0 egress-jail release
gates (G1 capture, G2 smoke) on a bare-Linux host — designed for a WSL2 distro
running native docker-ce, not Docker Desktop. Two new files, no production
code touched
.

Why

The gates need bare-Linux Docker networking. On Docker Desktop the vpnkit network
VM can make the reachability gate a false negative; native docker-ce in a WSL2
distro reproduces bare-Linux faithfully. This script makes that run a single
command and explains how to read the results.

scripts/setup-gates.sh

  1. Preflightdocker present + daemon reachable + drydock repo, and a
    native-vs-Docker-Desktop check (_is_docker_desktop): warns that on Docker
    Desktop the block gates (403) are reliable but the reachability gate
    (api.anthropic.com → 200) may be a false negative.
  2. Builddocker build -f Dockerfile.egress -t drydock-egress:latest.
  3. G2 — runs scripts/egress-smoke.sh and annotates the gate table.
  4. G1 — prints the manual enable/collect/finalize/disable recipe (G1
    needs real interactive drydock sessions, so it is guided, not auto-run).

G3 (the release) stays a separate maintainer step, only after G1/G2 pass.

Tests

test/setup_gates.bats — 7 unit tests for the pure _is_docker_desktop helper
(Docker Desktop substring → true; native Debian/Ubuntu/empty → false) + a
source-guard test. shellcheck + shfmt clean; the 7 tests pass locally (the full
suite runs in CI).

Size

size:m — 235 insertions, additive tooling only, no production change. Refs #149
(does not close it).

A one-shot runner for the v0.4.0 egress-jail release gates, meant for a WSL2
distro running native docker-ce (NOT Docker Desktop). No production file touched.

scripts/setup-gates.sh:
- preflight: docker present + daemon reachable + drydock repo + a native-vs-Docker
  Desktop check (warns that Docker Desktop's network VM can make the reachability
  gate a false negative while the deny-by-default block gates still hold);
- build: docker build -f Dockerfile.egress -t drydock-egress:latest;
- G2: runs scripts/egress-smoke.sh and explains how to read the gate table;
- G1: prints the manual capture recipe (enable/collect/finalize/disable) since G1
  needs real interactive drydock sessions.

test/setup_gates.bats: 7 unit tests for the pure _is_docker_desktop helper
(Docker Desktop substring true; native Debian/Ubuntu/empty false) + source-guard.

shellcheck + shfmt clean; the 7 new tests pass. Refs #149.
@jraicr jraicr added type:chore Chore / housekeeping size:m Medium: 100-400 lines labels Jun 5, 2026
@jraicr jraicr merged commit c57ff81 into dev Jun 5, 2026
3 checks passed
@jraicr jraicr deleted the feat/egress-gate-setup branch June 5, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:m Medium: 100-400 lines type:chore Chore / housekeeping

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant