Public: anyone can read this; the crew can change it.
Hold a lane Job to its declared egress hosts, as a cell is #1907
A check placed as a Job can now be held to its declared egress hosts, but the NetworkPolicy half of this has not been run on a cluster. The new tests and tsc pass. The tests use a stand-in kube client, and the cell-only suites were skipped here, so the forge's check runs those.
stopped parked by the crew
A lane Job is now held to its declared egress hosts. The Job reaches those hosts through a proxy pod, and the network policies leave it no other way out.
The last check failed because test/job-egress.test.ts was in neither GATE nor EXCLUDED in scripts/gate.ts. I added it to EXCLUDED as "not yet admitted" under issue 1428. After that, bun scripts/gate.ts, test/check-list.test.ts and test/job-egress.test.ts pass (16 tests). I did not run the type check or the full suite; the forge runs those on the push.
I did not add it to GATE, because that needs ten flake-free runs under load (flake-hunt admit), which this pull doesn't carry. Until it is admitted, the forge's check does not run the egress tests.
Admitting the file is a separate follow-up.
🤖 Generated with Claude Code
Parked by the crew: the check stayed red through 2 automatic tries
A check placed as a Job can now be held to its declared egress hosts, but the NetworkPolicy half of this has not been run on a cluster. The new tests and
tscpass. The tests use a stand-in kube client, and the cell-only suites were skipped here, so the forge's check runs those.Pod, not sidecar. The issue suggested a sidecar, but a NetworkPolicy selects whole pods, so a sidecar and the check would share the same allowance. The proxy therefore runs as a separate pod, and the policies let the check's pod reach that pod and nothing else.
What changed
startEgresscan now listen on TCP as well as a Unix socket. The newsrc/apps/egress_proxy.tsruns it as a process, with the declared hosts, the forge origin and the mode taken from validated environment variables.runJobinsrc/cluster/jobs.tsstarts the proxy pod and waits until it is ready before it makes the Job. It points the Job at the proxy throughHTTP_PROXY/HTTPS_PROXY, so the Job never runs unheld. It deletes both at the end, and does so on every failure path too.cells.egressworks as it does for a cell.enforcerefuses undeclared hosts with a 403 that names them.reportlets them through and records them as a cell's are.FORGE_CHECKS_PROXY_IMAGEtakes the forge's own image. Without it, behaviour is unchanged, and the run still says "egress not enforced on a cluster job". With it, the run is marked as contained.charts/app/templates/lane.yamlholds two policies, behindlane.egressProxy(off by default). The check's pod gets egress to the proxy pod on port 3128 only. The proxy pod gets the forge, DNS and public 80/443, minus the private ranges.docs/APPS.mdis updated.test/job-egress.test.tscovers the order of creation, the proxy address in the Job, cleanup, proxy startup failure, reported hosts, config validation and a live 403 over TCP.Left out
lane.yamldid not exist in this repo, so the chart policies are new rather than narrowed.lane.egressProxyonly together withFORGE_CHECKS_PROXY_IMAGE. With the policies on and no proxy, a Job has no way out at all.To try
FORGE_CHECKS_PLACEMENT=jobwithFORGE_CHECKS_PROXY_IMAGE=<forge image>andlane.egressProxy=true.report.bun test test/job-egress.test.ts.Closes #1428