Public: anyone can read this; nobody can change it.

A step that runs without a cell ends with everything it started, on a cancel, a timeout, or its own exit #64

Merged opened this view on origin

Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.

Merged

Where the host cannot hold a cell (CI, a pod without bwrap), an install, test or check step ran as a plain `/bin/sh -c` child in the forge's own process group, and a cancel or timeout SIGKILLed the shell alone. What the shell had started (`bun install`'s scripts, a test runner and its workers, a `sleep`) was re-parented and kept running in the checkout after the step was reported cancelled; a supe…

shipped merged

opened this view on origin

Where the host cannot hold a cell (CI, a pod without bwrap), an install, test or check step ran as a plain /bin/sh -c child in the forge's own process group, and a cancel or timeout SIGKILLed the shell alone. What the shell had started (bun install's scripts, a test runner and its workers, a sleep) was re-parented and kept running in the checkout after the step was reported cancelled; a superseded check kept burning the machine beside its replacement.

The step now leads a process group of its own (detached, without a cell only), a cancel or timeout kills the group, and once the shell has exited, what is left of the group is killed. A cell is unchanged: its tree dies with bubblewrap. signalGroup moves to module level, shared with startProcess (#63).

Since a terminal's Ctrl-C no longer reaches a running check, the forge stops checks without the roll's drain wait on a person's signal (SIGINT, SIGHUP): they are cut off and queued again at once. A SIGTERM (a release) still lets them finish within FORGE_CHECKS_DRAIN_S.

<!-- pipeline:validation -->

Validation

pipeline/validate on 82c7d253: baseline in 618s — bun 1.3.14, CI-shaped env (scrubbed vars, runner PATH), exact check.yml shard + forge.json commands.

stepresulttime
bun install --frozen-lockfileok (exit 0)0s
forge.json check.fastBASELINE (exit 1)130s
check.yml gate (1) pull_requestBASELINE (exit 1)15s
check.yml gate (2) pull_requestok (exit 0)274s
check.yml gate (3) pull_requestok (exit 0)199s
  • ⚠️ node v20.19.2 here, v22 on CI (tsc runs under node)
  • ⚠️ check.yml gate (1) pull_request stopped early at a BASELINE failure (fail-fast): its later files were not run in this step
test output (failures, totals)
▶ bun install --frozen-lockfile
  ok  exit 0  0s
▶ forge.json check.fast
(fail) egress, reported: an undeclared public host goes through and is counted; a private one never does > an undeclared public host is let through and counted [1.15ms] [shard 10]
Ran 2987 tests across 301 files in 113.8s; 1 failed.
classify: reran test/contain.test.ts test/subscriptions.test.ts test/web-phone.test.ts  alone on origin/main b27bb0c3 and on this branch
  BASELINE  exit 1  130s
▶ check.yml gate (1) pull_request
(fail) egress, reported: an undeclared public host goes through and is counted; a private one never does > an undeclared public host is let through and counted [1.38ms] [shard 3]
Ran 112 tests across 3 files in 14.4s; 1 failed.
classify: reran test/contain.test.ts  alone on origin/main b27bb0c3 and on this branch
  BASELINE  exit 1  15s
▶ check.yml gate (2) pull_request
Ran 1336 tests across 137 files in 273.9s (137 shards).
  ok  exit 0  274s
▶ check.yml gate (3) pull_request
Ran 1508 tests across 138 files in 198.5s (138 shards).
  ok  exit 0  199s
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs