REPORT — phase6-supervisor-boundary-review
STEP: phase6-supervisor-boundary (Phase 6: the deadline kill runs inside a container boundary — F11/F12, F17/F18)
REV: ba9e25e34ae5091e329469aab8c099675741f60d FINAL: c2186543f356755d2102457b56f0283ffec4e6f0
CHANGED: this review adds two artifacts, both new: `tests/test_review_phase6_supervisor_boundary.py` (the leaf-cleanup probe the delivered module does not build) and this report. No committed module was edited by this review.
VERIFIED: REVIEW ACCEPTANCE was run first: `scripts/check-scope ba9e25e34ae5091e329469aab8c099675741f60d c2186543f356755d2102457b56f0283ffec4e6f0 docs/research/phase6-supervisor-boundary-brief.md` — exit 0, prints `tripped: none` and `scope: ok (3 path(s))` with `claimed: scripts/supervise_run.py tests/test_phase6_supervisor.py`. None of the two named commits was written by this review's session (this session began after the work and report commits were already in history). FINAL is the work commit `c218654` (`Actor: IMPLEMENTER`, `tests/test_phase6_supervisor.py` +102 lines, `scripts/supervise_run.py` +142 lines); the report commit `69e0077` (one file) is never named as FINAL. `git diff ba9e25e c218654 --stat` touches only the two IN SCOPE files plus the brief — no committed test edit outside IN SCOPE. The review brief's embedded brief copy matches the committed brief file verbatim (diff empty up to the review-marker line) and the committed brief file is untouched in the working tree.
VERIFIED: both boundary pins reddened live at REV on the delivered sweep. Byte-verified REV scratch (`git archive ba9e25e`, `git show` diffs empty for both IN SCOPE files), the FINAL test module copied in uncommitted and diff-verified: `pytest …::test_the_deadline_kill_reaches_a_session_escaped_forkers_tail_forks` — red 3 of 3 on the named assertion at `:656` (`AssertionError: 5 of 71 forked PIDs survive the supervisor's exit … 2 of 58 … 2 of 58` — the tail-fork class of the F11 red evidence); `::test_the_deadline_kill_reaches_a_predecessor_exited_double_forked_sleeper` — red at `:691` (`… survives the supervisor's exit adopted out-of-tree`). No error, no skip, no hang; at REV the guard `_boundary_available` (`tests/test_phase6_supervisor.py:362`) finds no `_container_boundary` attribute, `measure is None` → True, and the pins run — the REV red is reached exactly as the report's F18 FIXED line says ("a supervisor without the measurement runs the pin and fails on its assertion"). Stands alone.
VERIFIED: at FINAL both pins are green on the delivered supervisor, and the mechanism is measured, not assumed — at the q1e probe's own `--budget 3`, an escaped-forker drive's leaf held the fixture child, its forker and 449 recorded sleeper pids; all died between the freeze (the child observed `T` at the pass boundary) and the quiescence pass; `leaves: []` remained after the exit (zero survivors, zero leaves). The double-fork drive's leaf held child + middleman + sleeper at the first observation (t=0.2s, `ppid` chain intact); at t=0.3s the middleman had exited and the sleeper read `state=S ppid=3174` adopted — still listed in the leaf's `cgroup.procs` — and the sleeper was gone after the exit; `leaves: []` after the drive. The implementer's named mechanism (an adopted sleeper, `ppid` of init, killed inside the leaf) is reproduced at the mechanism level; the delegation's leaves at 0, cleaned up not leaked, exactly the report's words.
VERIFIED: the pre-exec join is load-bearing. A post-Popen-join mutant (byte-verified FINAL scratch, `preexec_fn` kwarg removed, the `_container_adopt` at `scripts/supervise_run.py:354` kept immediately after `Popen`) reddens the double-fork pin 2 of 4 drives (`AssertionError: … survives the supervisor's exit adopted out-of-tree` at `:691`, a different sleeper pid each red) and passes 2 of 4 — the in-window race is real and intermittent on this host, and the delivered pin is the member that holds it. The claim "a post-Popen join loses the in-window forks" is attacked and not falsified (the implementer measured it red; this review reproduced the red class). The delivered pre-exec shape leaves the window empty by construction: the join is the child's own write between fork and exec, so nothing the child forks can precede it — and the leaf-membership observations show the child inside the leaf at its first observation with every later fork listed.
VERIFIED: the one-seam structural claim — every descendant the child forks inherits the leaf (cgroup membership is fixed at fork; nothing in the probed shapes — session escape, double fork, exit, adoption — writes `cgroup.procs`), and `_container_kill` rides every sweep pass (`scripts/supervise_run.py:409`–`:410`, before the quiescence break), firing even when the pass's capture comes up empty. So the container half of the kill covers every descendant the child forks, not only the two pinned shapes; the residual outside the two surfaces is exactly what the delivered docstring names: what the child never forked. The pid-namespace half is not built — the report's NOT VERIFIED says so, and no pin or claim deploys it.
VERIFIED: F17's one-reading claim (question 2). The received texts name the q1e shape as: a session-escaped middleman that spawns a session-escaped `time.sleep(60)` sleeper and exits, so the sleeper is adopted by init (`state=S ppid=3174`), probed at `--budget 3` (the fixes-2 implementer's reparented-orphan boundary probe; the F9 review's `q1e_rerun` drive) — the same process shape the F12 FILLED block names ("the named boundary at a higher fork rate") and the same scenario the boundary step's double-fork pin drives. Re-driven against the delivered supervisor at the q1e probe's own budget (the mechanism measurement above), the same init-adopted sleeper is caught inside the leaf and killed: nothing survives. No second consistent reading of the q1e clause survives the clause's own instruction: a re-driven discriminating member that must stay green would have to be an init-adopted process outside the child's leaf — i.e. a process not forked by the child — and no such member exists among the committed probes (a host collateral orphan cannot be re-driven by the fixture probes at all, and the container boundary spares every process not in the leaf exactly as the whole-tree sentence expects). So the q1e clause as written cannot hold in either reading, the fix does not over-reach, and F17's carried state (the clause is dead text; a later committed brief corrects the sentence) stands.
VERIFIED: the guard (question 3). The sandbox condition re-driven on a FINAL scratch inside a mount namespace whose `/sys` is shadowed (no `/sys/fs/cgroup` exists there): the full module battery prints `11 passed, 2 skipped in 8.69s` — the boundary pins skip, matching the implementer's own `11 passed, 2 skipped in 7.25s`. The guard's cost is two `getattr` calls against the module under test; where the measurement is absent the pins run (the REV scratch above), and where it refuses the environment the sweep's own tail names why the pin cannot hold there — the skip weakens nothing where the boundary can exist, and where it cannot, a red would be environmental: sound as an availability guard, not conditional evidence that passes where it cannot fail.
VERIFIED: F18's honesty. The fixed form's byte-identity: `git diff b852fd4 ba9e25e -- src/orchestrator/project_oracle.py src/orchestrator/oracle.py tests/test_phase3_project_oracle.py` is empty, and the intervening commits add only `tests/test_review_phase6_grading_seed.py` plus docs — so the seed review's own oracle line (`6 passed in 576.05s` at `b852fd4`, committed in the seed review's VERIFIED) is a valid baseline modulo the pin's seed. And the F18 red — the unguarded intermediate delivery reddened the standing oracle line `3 failed, 3 passed` on a known-good tree — is not re-drivable directly (that delivery no longer exists to branch), but it is structurally forced by this review's measurements: an environment where the measurement is absent runs the pins (REV scratch, red), a boundary-less environment cannot reach the out-of-group shapes (the F11/F12 findings' own content), so a delivery whose pins lack the guard fails exactly the named assertions inside the sandbox — the intermediate red is the REV red's mirror with no extra assumption.
VERIFIED: the acceptance envelopes re-run at FINAL in the clean workspace. `scripts/check-tests --fast` — `978 passed, 108 deselected in 117.04s (0:01:57)`, exit 0; the same battery on the byte-verified REV scratch — `976 passed, 108 deselected in 89.25s (0:01:29)` — so the whole-suite delta is exactly the two boundary pins, matching the report's `976 + 2` counting. `.venv/bin/python -m pytest tests/test_phase6_supervisor.py --durations=5` — the brief's documented form, `13 passed in 12.46s`, slowest five `3.52s tree pin`, `2.52s double-fork pin`, `2.33s killed-child pin`, `0.91s racing-fork pin`, `0.86s escaped-forker pin`, all two orders of magnitude inside the 120s gate. `scripts/check-static` — exit 0, the gated `ruff check --select BLE001,S110 src/orchestrator` prints `All checks passed!`, the advisory run prints `Found 104 errors.` — identical to the REV scratch's count, so the boundary's code added no advisory finding. `scripts/check-docs` — exit 0: `391 Total (in 911ms)` / `180 Unique` / `391 OK` / `0 Errors` (grown from the fixes-2 step's 385 by this chain's new files; 0 errors). `tests/test_axis2_robustness.py -m "not slow"` — `17 passed, 4 deselected in 6.00s`, matching the report's line. The standing battery at FINAL: `scripts/check-tests` (full suite, slow modules included) — `1086 passed in 1012.13s (0:16:52)`, exit 0 (the fast suite's 978 plus the 108 slow — the whole surface, this review's probe not yet in the tree for that run).
VERIFIED: the oracle line at FINAL re-driven twice (question 3a). First: `.venv/bin/python -m pytest tests/test_phase3_project_oracle.py --durations=5` — `1 failed, 5 passed in 556.09s` — the failure is NOT a value class: the determinism pin's verdict assertions held (`PASS` × all runs, no CANDIDATE_TIMEOUT flip), and the caught one is the pin's post-run survivor sweep (`tests/test_phase3_project_oracle.py:630`, `assert not survivors`) finding a live four-process nested-grading stack — two `src/orchestrator/sandbox_launcher.py` processes in a launcher/shim chain, the identity collect runner in `/work/.venv`, the nested `pytest -m not slow` under it — every member adopted by init (`stat` `ppid=3174`), `state=S`, alive 15+ minutes after the grade returned (SIGKILLed by this review, confirmed gone). Second: `6 passed in 536.49s` — green. The guard held the nested gate green on a good tree in both runs' value assertions; the survivor red is F20 below. The implementer's own oracle line (`6 passed in 490.83s`) matches this green class.
NOT VERIFIED: the double-fork pin's red-at-REV determinism of degree — the escaped-forker pin reddened 3 of 3 scratch drives (survival counts 5 of 71 / 2 of 58 / 2 of 58) while the double-fork pin at REV reddened on its one scratch drive; its red class is however repeated under this review's post-Popen mutant (2 of 4, same assertion, different pids), so both pins' reds are live-red classes, not red-by-single-run luck.
NOT VERIFIED: the guard on a host with no cgroup v2 in `mountinfo` at all and no `/sys` (a literal fresh root without the shadowed-namespace hop): the namespace drive exercises the same measurement entry point (`_container_boundary` returning `None`) through the delivered code's own path; the hop between "shadowed `/sys`" and "no `/sys`" changes the mountinfo line and the first `isdir`, both short-circuits the same function.
FINDINGS:
  F19 | SEVERITY: P2 | ORIGIN: CODE | STATE: carried
  The container leaf's removal is claimed (`scripts/supervise_run.py:106`–`:107`, "removed when the child is done") and demonstrated by hand at FINAL (`leaves: []` after every measured drive), but no delivered pin holds it: under a `_container_close`-leaks mutant (the removal loop disabled on a byte-verified scratch) both boundary pins stayed green 2 of 2 drives while empty leaves of the drives stood under the boundary parent — a removal regression would go unheld by the delivered suite. Folded in: the module docstring's removal sentence is also the report's one over-claim corner — the clean-child corner (a child exiting 0 with a document while an adopted orphan outlives it) leaves one leaf standing after `_container_close`'s bounded 20×50ms wait (measured: exit 0, `recovered: false`, the orphan `state=S ppid=3174`, one leaf holding it), which the `_container_close` docstring honestly names ("A leaf still occupied after the budget … is left standing") — the deadline contract does not cover the clean path, the orphan's survival predates the boundary (nothing killed it pre-boundary either), and what the corner adds is only the standing leaf itself. Next action is the next implementer brief's: absorb the leaf-cleanup pin into `tests/test_phase6_supervisor.py` and devolve the module docstring's removal sentence to name the corner.
  FIXED: no regression test of the delivered module's own — the shape is this review's committed probe (`tests/test_review_phase6_supervisor_boundary.py::test_the_deadline_drive_leaves_no_container_leaf`), green at FINAL (`1 passed in 0.95s`) and red under the leak mutant (`1 failed in 6.01s`); it rides until the delivered module absorbs it as its own pin.
  F20 | SEVERITY: P2 | ORIGIN: CODE | STATE: carried
  The nested-grading survivor class re-sighted at FINAL: this review's first oracle re-drive failed only on the determinism pin's post-run survivor sweep (the assertion at `tests/test_phase3_project_oracle.py:630`) catching a live four-process stack (two `sandbox_launcher.py` in a launcher/shim chain, the `/work/.venv` identity collect runner, the nested `pytest -m not slow`), every member adopted by init (`ppid=3174`), `state=S`, alive 15+ minutes after the grade returned PASS verdicts and the value assertions held — no grade flip, no gate-check FAIL: not the F8/F18 class. All four were SIGKILLed and confirmed gone. The reaping defect's owner is `SandboxRunner._kill` (`src/orchestrator/sandbox.py:1081`–`:1102`): a single capture-then-kill with no sweep to quiescence — the pre-F9 surface the supervisor's own sweep left behind when the phase-6 fixes ported it — and `src/orchestrator/sandbox.py` is OUT OF SCOPE of every phase-6 brief so far. `record.md`'s "left zero survivors … the class is closed by the phase-6 descendant sweep" attribution holds for `scripts/supervise_run.py`'s sweep, not for the corpus's sandbox drives; a second oracle re-drive on the same host otherwise idle returned `6 passed in 536.49s`, so the class is not a standing red — it is the load-borne half the F14/F16 dispositions already govern. Next action is the planner's: a brief in scope of `SandboxRunner._kill` (sweep to quiescence, the supervise_run fix's own pattern) or a ruling folding the corpus's sandbox drives into the F16 load-envelope ruling.
  FIXED: no regression test — the standing survivor sweep that caught the leak (`:630`) is delivered and held; the reaping defect is outside the phase-6 steps' IN SCOPE files; both re-drive lines (red, then green) are recorded here.
  F21 | SEVERITY: P2 | ORIGIN: DOCUMENT | STATE: carried
  The implementer report's supervisor-module battery line records the module battery widened by the review module (`.venv/bin/python -m pytest tests/test_phase6_supervisor.py tests/test_review_phase6_supervisor.py --durations=5` — `15 passed in 17.72s`) and never the brief's documented form (`.venv/bin/python -m pytest tests/test_phase6_supervisor.py --durations=5`) with the documented form's own printed line. The wide form is a strict superset (the module's 13 pins plus the review module's 2 probes), green, and every figure it carries is its own printed line — nothing is evaded; but the brief's acceptance names the documented command, and the report's own template requires each claimed figure to name the command that actually ran while this acceptance line names both the documented form it did not run and the wide form it did. This review ran the documented form at FINAL — `13 passed in 12.46s` — so the figures stand; what carries is the report-text deviation from the brief's named battery.
  FIXED: no regression test — a document deviation in a committed report, which only a later step (or the planner's correction of the carried note) absorbs; the documented form's gate line is in this review's VERIFIED.
SHAPES: Probed by this review, hand-driven on byte-verified scratches unless named committed: the delivered escaped-forker pin's shape — red at REV 3 of 3 (the `:656` signature; counts 5 of 71 / 2 of 58 / 2 of 58), green at FINAL, mechanism-observed at `--budget 3` (449 recorded forks, all dead, leaves `[]`); the delivered double-fork pin's shape — red at REV at `:691`, green at FINAL, and observed mid-run at `--budget 3` exactly as the q1e evidence paints it (adopted `state=S ppid=3174` while inside the leaf, then the leaf kill lands); the brief's q1e-survival clause — dead in both consistent readings, killed by the same measurement, standing as F17's carried dead text; the launch-window race under the post-Popen join mutant — intermittently red (2 of 4 drives, the `:691` signature), the delivered pre-exec join closing it by construction, the delivered pin a live mutant witness; the leaf-leak mutant shape — green pins over leaky cleanup (2 of 2), the unheld residue this review's committed probe now holds (F19); the clean-child exit-0 corner — the orphan survives adopted (`state=S ppid=3174`) with one leaf left standing after `_container_close`'s bounded wait, outside the deadline contract, disclosed by the report, folded into F19; the no-cgroup-v2 environment — module battery `11 passed, 2 skipped`, the pins skip on the measurement, the sweep's tail stands alone as designed; the nested-grading survivor stack — caught once by the delivered `:630` sweep, green on re-drive, filed as F20. The report's own shapes are measured and not buried: its unpinned residues are named with reasons, and this review's adjudication holds two of them separately — the leaf-leak residue is a shape the suite should build (pinned by the committed probe), and the clean-child corner's orphan survival is correctly outside the brief's pin list (a contract corner outside the deadline kill's surface, disclosed with its reason).
TRIPPED: none — matches the live `scripts/check-scope` output (`tripped: none`).
PROPOSED ROWS: none
METHOD FRICTION: none
INHERITED:
From `docs/research/phase6-supervisor-boundary-implementer.md`, its `INHERITED` block verbatim:

  Nothing else in the received set is still open: the brief's INHERITED carried F4, F5 and F6 (each fixed at the fixes step), F7 (fixed as recorded in the review that filed it), F9 (fixed at the fixes-2 step), F10 (fixed at the fixes-2 step), F11 and F12 (each `carried`, fixed here with the red evidence above), and F8 (`fixed` as recorded in the grading-seed step, unchanged here). Still open, each copied verbatim with its ID:
  F13 | SEVERITY: P2 | ORIGIN: BRIEF | STATE: carried
  The brief names the pin's red as "N consecutive grades of the known-good tree produce non-identical verdicts (PASS on one run, CANDIDATE_TIMEOUT on the next)". In this environment the known-good tree's `gate-check-tests` grade is stable well under the fixture's 60.0s deadline (ten pin runs, 50 grades, ~37–46s each, every grade PASS), so the pin passes at REV. The lottery's grade-flip needs a candidate whose suite fails — a failing tree's hypothesis tests shrink, and the shrinking varies the suite's wall — and the near-deadline flip is the neutralisation test's broken-source candidate (FAIL→CANDIDATE_TIMEOUT, 3/3 at REV). The pin's assertion and the seeded determinism are correct; the brief's stated candidate is simply not the one that flips here.
  FIXED: no regression test — an ORIGIN: BRIEF finding is fixed once a later committed brief corrects the text; the pin and the seed land as delivered.

  F14 (P2, ORIGIN: DOCUMENT, carried) — the F8 red evidence is load-borne and the implementer report does not say so; a later actor re-driving the red on an idle host sees green and may conclude the red is chimeric. Next action is the planner's: carry the load condition into the carried F8 block (or a later committed brief's correction), the seed and the pins stand as delivered.

  F15 (P2, ORIGIN: CODE, carried) — killed runs leak intermediate probe trees and no janitor reaps them; the shared tmpfs inode table filled to 3 free and the standing battery's first run died ENOSPC until 81 leaked trees were pruned by hand. Next action is the harness owner's (a tombstone/janitor keyed by the run identity) or a planner ruling that scratch hygiene is each session's duty.

  F16 (P2, ORIGIN: CODE, carried) — the seeded determinism is wall-bounded: at the fixture's 60.0s deadline the near-deadline candidate's seeded grade flips FAIL→CANDIDATE_TIMEOUT under host load (measured once mid-run and once at a 62.44s wall), so the pin's green determinism is stable-half evidence only. Next action is the fixture owner's: raise the grading deadline for near-deadline candidates (the 300.0 default gives a >=5x margin here) or an OWNER ruling that the deadline's load envelope is governed, not deterministic.

  F17 | SEVERITY: P2 | ORIGIN: BRIEF | STATE: carried
  The brief's boundary-fix instruction is internally inconsistent (FINDINGS, F17): the double-fork pin must leave no descendant alive after the exit while the F10 q1e boundary shape must survive the fix, and the two name one live shape (a session-escaped middleman spawning a session-escaped sleeper then exiting before the deadline, the sleeper adopted by init) that no container boundary can kill and spare at once. The GOAL reading was taken (F11/F12 fixed by the container boundary, both pins green at FINAL, no committed discriminating member changed verdict); the boundary this step retires is the named init-adopted orphan, and the new boundary is what the child never forked. Next action is the planner's: a later committed brief's text correction — the q1e-survival sentence, F12's "without also catching the documented boundary" clause, and the boundary sentence in the module docstring this step corrected in code.

From the same report, the carried findings' full blocks from its `FINDINGS` section, moved verbatim (the F17 block, complete; F14–F16 ride as complete inline copies above; F13 rides complete above with its FIXED line):

  F17 | SEVERITY: P2 | ORIGIN: BRIEF | STATE: carried
  The brief's boundary-fix instruction is internally inconsistent: it requires the double-fork pin to leave no descendant alive after the supervisor exits (GOAL, expected dispositions, the pin's spec) while also requiring that "the F10 q1e boundary shape ... still survives it — the review's discriminating member, re-driven, must stay green or the fix over-reaches" — and the two name one live shape. The F10 q1e shape (the fixes-2 implementer's SHAPES reparented-orphan boundary, probed at `--budget 3`, surviving `state=S ppid=3174`) and F12's reported variant (the fixes-2 review's double-forking fixture child) are both a session-escaped middleman spawning a session-escaped sleeper then exiting before the deadline, and F12's own text calls the shape "the named boundary at a higher fork rate"; F11's text likewise says a subreaper catches the shapes but "also catches the documented init-adopted boundary (measured against the F10 q1e shape)". cgroup membership is fixed at fork and is not changed by reparenting, so no container boundary can catch the F12 sleeper and spare the q1e orphan: they are the same process, reached the same way. The reading taken, per the brief's own instruction ("If exactly one reading is consistent, take it and file a FINDING with ORIGIN: BRIEF that names the reading you took"): the GOAL reading — F11 and F12 fixed by the container boundary with both pins green at FINAL — because the OWNER has not ruled (record.md's Owner-rulings section holds no F11/F12 ruling; its Pending section still queues the rule-13 ownership of the shape ruling, and the brief's own conditional is "If the OWNER has not ruled, deliver the container boundary"), so the narrowing branch is unavailable. The q1e clause is satisfied in the only physically possible sense: no committed discriminating member changed verdict (all 13 module pins and both review probes green at FINAL, above). Next action is the planner's: a later committed brief's text correction — the boundary sentence, F12's "without also catching the documented boundary" clause, and the module docstring's boundary sentence this step corrected in code.
  FIXED: no regression test — the reading is delivered in the work commit and its evidence is the two reds above and the FINAL battery above; the correction itself is a committed brief's prose, which has none.

Expected dispositions of the received set (rule 8 forms), kept: F11/F12 fixed with red evidence (the pins at `tests/test_phase6_supervisor.py:627`/`:662`, each red at REV on the delivered sweep — re-driven by this review); F13–F16 stay carried; F17 carried; F18 fixed (the guard rides the delivered measurement; the sandbox condition re-driven by this review).

Added by this review, each carried finding with its ID:
    F19 (P2, ORIGIN: CODE, carried) — the container leaf's removal is claimed and demonstrated but not held by any delivered pin (leak-mutant red, both boundary pins green over it); the committed probe holds the shape. Next action is the next implementer brief's (absorb the probe; devolve the module docstring's removal sentence to name the clean-child corner).
    F20 (P2, ORIGIN: CODE, carried) — the nested-grading survivor class re-sighted once at FINAL (leaked launcher/collect/pytest stack adopted by init, alive 15 minutes past the grade; red-then-green oracle re-drives); the owner is `SandboxRunner._kill` (`src/orchestrator/sandbox.py:1081`, out of scope of every phase-6 brief so far). Next action is the planner's: a brief in scope of the sandbox kill, or a load-envelope ruling folding the corpus's sandbox drives into the F16 disposition.
    F21 (P2, ORIGIN: DOCUMENT, carried) — the implementer report's module-battery line is a widened substitute (supervisor module + review module, `15 passed`) for the brief's documented command, whose own printed line the report never recites; the documented form re-ran green here (`13 passed in 12.46s`). Next action is the planner's: a committed brief or report correction of the carried note.

CLOSEOUT
DECLINED: none
DIVERGENCES CLOSED: none
