REPORT — phase6-grading-seed-implementer
STEP: phase6-grading-seed (Phase 6: the grading gate runs seeded — F8)
REV: 0c02b27   FINAL: b852fd43d381627b7045411e382ebc803002441d
CHANGED: src/orchestrator/project_oracle.py — the `gate-check-tests` frozen argv gains the literal `--hypothesis-seed=424242`, placed after the `-k` exclusion expression and before the `--ignore=` entries (`src/orchestrator/project_oracle.py:734`), so the nested in-sandbox suite draws the measured seed's examples on every grading run. The value is an argv literal in the frozen tuple — not a parameter, not an environment lookup; the frozen argv identity (per-directory membership plus the content compare the probe already holds) rejects a candidate-side substitution.
CHANGED: tests/test_phase3_project_oracle.py — the module's sixth test, the determinism pin `test_grading_gate_grades_one_candidate_identically_across_consecutive_runs` (`:589`; verdict-identity assertion `:621`; survivor assertion `:629`) plus the `/proc` walk helper `_nested_run_survivors` (`:570`): five consecutive grades of the known-good shape (`_case_tree` plus `_edit_candidate_source`) through the module-scoped manifest's `gate-check-tests` check, asserting identical PASS verdicts, then re-walking the process table for survivors of the nested runs (no `/work/.venv` chain, no `sandbox_launcher`). Carries `pytest.mark.timeout(1200)`.
VERIFIED: scripts/check-tests --fast — `976 passed, 107 deselected in 92.67s (0:01:32)`, exit 0.
VERIFIED: .venv/bin/python -m pytest tests/test_phase3_project_oracle.py --durations=5 — `6 passed in 558.38s (0:09:18)`, exit 0; slowest five `229.99s corpus`, `184.52s pin`, `131.57s neutralization`, `8.92s registry`, `3.16s setup`. The pin's five seeded grades are ~37s each (184.52s / 5), deterministic and well under the fixture's 60.0s deadline.
VERIFIED: scripts/check-static — exit 0. The gated `ruff check --select BLE001,S110 src/orchestrator` prints `All checks passed!`; the advisory `B,SIM` run prints `Found 104 errors.` (104 unchanged from REV's 104 — the two edited files add no new advisory finding; the pin module's 13 advisory findings are the same 13 it carried at REV).
VERIFIED: scripts/check-docs — exit 0, prints `384 Total (in 903ms) 179 Unique 384 OK 0 Errors`.
VERIFIED: scripts/check-scope 0c02b27 b852fd43d381627b7045411e382ebc803002441d docs/research/phase6-grading-seed-brief.md — exit 0. Prints `claimed: src/orchestrator/project_oracle.py tests/test_phase3_project_oracle.py`, `tripped: none`, `scope: ok (3 path(s) in 0c02b27..b852fd43d381627b7045411e382ebc803002441d)` (the third path is the brief, added under `docs/research/` at 76de144 and admitted implicitly).
VERIFIED: the red evidence at REV, on a scratch copy at `0c02b27` (`/tmp/kilo/rev-0c02b27`, extracted with `git archive` and byte-verified before use: `git show 0c02b27:src/orchestrator/project_oracle.py | diff - …` and `git show 0c02b27:tests/test_phase3_project_oracle.py | diff - …`, both empty; the delivered test module copied in uncommitted so the node is the delivered one):
  - F8's red — the phase3 neutralisation test's grade flip: `.venv/bin/python -m pytest "tests/test_phase3_project_oracle.py::test_gate_config_and_test_corpus_neutralization_is_rejected"` at REV — `1 failed in 178.94s`, `1 failed in 175.68s`, `1 failed in 175.85s` (3 of 3 runs). The named failing assertion is `AssertionError: assert 'CANDIDATE_TIMEOUT' == 'FAIL'` at `tests/test_phase3_project_oracle.py:449`: the broken-source candidate's `gate-check-tests` grade crosses the fixture's 60.0s deadline on a heavy unseeded draw — exactly the F8 shape (a graded FAIL becoming CANDIDATE_TIMEOUT). The full unseeded module at REV is itself the lottery: `.venv/bin/python -m pytest tests/test_phase3_project_oracle.py` — `6 passed in 619.89s`, `6 passed in 609.73s`, `1 failed, 5 passed in 698.40s` (three runs; the failing run is the same line-449 flip). The seeded A/B in the same shape: the pin measures ~37s per grade at FINAL (`184.52s`) against ~44s per grade at REV (`222.09s` in the passing module run) — the seed's structural cost sits below the deadline, the unseeded draw crosses it.
  - The delivered determinism pin at REV (`tests/test_phase3_project_oracle.py::test_grading_gate_grades_one_candidate_identically_across_consecutive_runs`) — `1 passed` in each of ten runs (`232.57s`, `196.96s`, `187.84s`, `269.86s`, `241.42s`, `240.29s`, `264s`, `221s`, `215s`, `220s`), every run's five verdicts PASS. The pin's known-good candidate does not cross the deadline: its tests all pass, so no hypothesis test ever shrinks (shrinking is what varies a failing suite's wall), and its grade holds at ~37–46s per grade. See F13.
NOT VERIFIED: the full `scripts/check-tests` (no `--fast`). ACCEPTANCE names the `--fast` form, which selects exactly the non-slow suite (`976 passed, 107 deselected`). The work commit's pre-commit hook separately re-ran that non-slow suite as its own gate before the commit landed (parallel phase `945 passed in 23.37s` over 6 workers after ignoring the 3 serial modules; serial phase `31 passed in 12.23s`). The `--slow` battery is not this step's acceptance.
FINDINGS:
  F8 | SEVERITY: P2 | ORIGIN: CODE | STATE: fixed
  The phase3 oracle fixture's gate-check grade is a hypothesis-seed lottery: the frozen corpus's unseeded in-sandbox suite exceeds the fixture's 60.0s per-check deadline on heavy draws, flipping a graded FAIL to CANDIDATE_TIMEOUT (and a CORRECT_ACCEPTANCE to FALSE_SUCCESS). The fix is the seed, not the budget: the nested gate-check-tests invocation now carries `--hypothesis-seed=424242`, so the same candidate grades the same verdict every run.
  FIXED: the red at REV — `tests/test_phase3_project_oracle.py:449`, `.venv/bin/python -m pytest "tests/test_phase3_project_oracle.py::test_gate_config_and_test_corpus_neutralization_is_rejected"`, `AssertionError: assert 'CANDIDATE_TIMEOUT' == 'FAIL'` (3 of 3 runs at REV; the full unseeded module also failed 1 of 3 runs on the same line). The delivered determinism pin `tests/test_phase3_project_oracle.py::test_grading_gate_grades_one_candidate_identically_across_consecutive_runs` (`:589`, assertion `:621`) verifies the seeded determinism at FINAL (five identical PASS grades, ~37s each); the seed lands at `src/orchestrator/project_oracle.py:734`.
  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.
SHAPES: The exact "PASS on one run, CANDIDATE_TIMEOUT on the next" shape on the known-good candidate the brief names is not built (F13: the known-good candidate does not cross the deadline in this environment). Built and probed instead, all on the byte-verified REV scratch: the F8 red shape on a failing candidate — the neutralisation test's broken-source tree (`FAIL`→`CANDIDATE_TIMEOUT`), 3/3; the seeded A/B in the same shape — the pin at ~37s per grade at FINAL against ~44s per grade at REV; the delivered pin at REV (ten runs, all PASS) and at FINAL (the acceptance run, all PASS).
TRIPPED: none
PROPOSED ROWS: none
METHOD FRICTION: none
INHERITED:
From `docs/research/phase6-supervisor-fixes-implementer.md`, its `INHERITED` block verbatim:

  Nothing in the received set is still open: the brief's INHERITED carried F4, F5 and F6 (each `carried`), all three are fixed here — F4 fixed by the descendant-chasing kill over the supervisor's whole surface (its falsified absolute made structurally true, post-exit liveness of a session-escaped grandchild pinned at `tests/test_phase6_supervisor.py:432`), F5 fixed by absorbing the review's discriminating member into the merged tree pin (fixed-time assertion at `:416`), F6 fixed by absorbing the review's child-head observation as `tests/test_phase6_supervisor.py::test_the_child_head_receives_the_whole_environment_and_runs_once` (`:450`) — and F7 stays `fixed` as recorded in the review that filed it, unchanged. Added by this step, each carried finding with its ID:
    F8 (P2, ORIGIN: CODE, carried) — the phase3 oracle fixture's gate-check grade is a hypothesis-seed lottery: the frozen corpus's unseeded in-sandbox suite (24–67s per draw) exceeds the fixture's 60.0s per-check deadline on heavy draws and flips correct grades (FAIL→CANDIDATE_TIMEOUT; CORRECT_ACCEPTANCE→FALSE_SUCCESS). Next action is the fixture's owner: raise `gate_timeout_seconds` toward the 300.0 default or fix the in-sandbox gate's hypothesis seed/profile (both files are outside this brief's scope).

From `docs/research/phase6-supervisor-fixes-review.md` — its `INHERITED` block, then each carried finding's block from its `FINDINGS` section, moved verbatim (rule 2 governs the planner's copy of this block; the review's received set is the fixes brief's carried F4/F5/F6, all three fixed at FINAL, F7 fixed as recorded):

  Nothing in the received set is still open: the fixes brief carried F4, F5 and F6 (each `carried`), and all three are fixed at FINAL — F4 fixed by the descendant-chasing kill over the captured surface (session-escaped grandchild dead after the exit, pinned at tests/test_phase6_supervisor.py:432; real-head `--budget 8` leaves no descendant at the exit or 15s after), F5 fixed by the absorbed discriminating member (fixed-time assertion at :416, red under the lone-child-kill mutant), F6 fixed by the absorbed child-head observation (tests/test_phase6_supervisor.py:450, red under the double-launch, dropped-secret, and added-variable mutants) — and F7 stays `fixed` as recorded in the review that filed it, unchanged. Added by this review, each carried finding with its ID:
    F9 (P1, ORIGIN: CODE, carried) — the descendant sweep cannot reach what is born or reparented after the chain capture: tail forks of a racing forker (3 of 331) and a doubly-escaped orphan adopted by init survive the deadline kill by construction. Next action is the planner's per rule 13: re-walk-and-sweep to quiescence or an OWNER ruling narrowing the whole-tree sentence to the captured-at-deadline surface.
    F8 (P2, ORIGIN: CODE, carried) — the phase3 oracle fixture's gate-check grade is a hypothesis-seed lottery (60.0s fixture deadline vs unseeded in-sandbox draws, green at FINAL). Next action is the fixture's owner: raise `gate_timeout_seconds` toward the 300.0 default or pin the in-sandbox gate's hypothesis seed/profile.

  F9 | SEVERITY: P1 | ORIGIN: CODE | STATE: carried
  The descendant sweep cannot reach a process forked between the chain capture and the group kill, nor one already reparented out of the chain: a racing fixture child that forks session-escaped `sleep 60` grandchildren every ~5ms across the 2s deadline leaves 3 of 331 forked PIDs alive after the exit — always the final three forks (2495117, 2495118, 2495119 of 331), i.e. born after `_descendants` walked /proc; and a doubly-escaped orphan (a session-escaped middleman that spawns a session-escaped sleeper then exits, so the sleeper is adopted by PID 3174/systemd before the deadline) survives the kill still adopted out-of-tree (`state=S ppid=3174` after exit 1). The delivered sweep is capture-then-signal over numeric PIDs with no re-walk and no container boundary, so anything born-or-reparented after the snapshot is outside the surface by construction.
  FIXED: no regression test — both reds are this review's hand-driven probes on scratch fixture children (`/tmp/kilo/q1d_window2.py`, `/tmp/kilo/q1e_rerun.py`), not committed pins; no committed module was edited by this review. Next action is the planner's per rule 13: re-walk-and-sweep to quiescence (capture, kill, re-capture until the chain is empty or a bounded retry budget expires), or an OWNER ruling narrowing the whole-tree sentence to the captured-at-deadline surface; the PID-reuse corner needs no action (capture-to-kill is adjacent statements, pid_max 4194304, no I/O between — recycle inside the window is not a live shape).

From `docs/research/phase6-supervisor-fixes-2-implementer.md`, its `INHERITED` block verbatim:

  Nothing in the received set is still open: the brief's INHERITED carried F9 (P1, carried) and F8 (P2, carried). F9 is fixed here — the racing-fork pin at tests/test_phase6_supervisor.py:491 and the sweep-to-quiescence fix at scripts/supervise_run.py:193–:216 — and F8 stays carried, its owner named below. Added by this step, each carried finding with its ID: none (F10 is fixed, not carried).
    F8 (P2, ORIGIN: CODE, carried) — the phase3 oracle fixture's gate-check grade is a hypothesis-seed lottery: the frozen corpus's unseeded in-sandbox suite (24–67s per draw) exceeds the fixture's 60.0s per-check deadline on heavy draws and flips correct grades (FAIL→CANDIDATE_TIMEOUT; CORRECT_ACCEPTANCE→FALSE_SUCCESS). Next action is the fixture's owner: raise `gate_timeout_seconds` toward the 300.0 default or fix the in-sandbox gate's hypothesis seed/profile (both files are outside this brief's scope).

From `docs/research/phase6-supervisor-fixes-2-review.md` — its `INHERITED` block, then each carried finding's block from its `FINDINGS` section, moved verbatim (rule 2 governs the planner's copy of this block; the review's received set is the fixes-2 brief's carried F9/F8, F9 fixed at FINAL, F8 carried):

  Nothing in the received set is still open: the brief's INHERITED carried F9 (P1, carried) and F8 (P2, carried). F9 is fixed here — the racing-fork pin at tests/test_phase6_supervisor.py:491 and the freeze-and-sweep fix at scripts/supervise_run.py:193–:216 — and F8 stays carried, its owner named below. Added by this review, each carried finding with its ID:
    F11 (P1, ORIGIN: CODE, carried) — a session-escaped forker outside the frozen group re-opens the capture window every pass; its final tail forks survive adopted by init. Next action is the planner's per rule 13: a container boundary or an OWNER ruling narrowing the whole-tree sentence to the in-group forker surface.
    F12 (P2, ORIGIN: CODE, carried) — a double-forking shape whose middleman exits before the deadline falls outside the surface by construction (the named boundary at a higher fork rate). Next action is the planner's: pin the boundary explicitly or narrow the whole-tree sentence the same way F11 goes.

  F11 | SEVERITY: P1 | ORIGIN: CODE | STATE: carried
  A session-escaped forker — a fixture child whose forker itself runs session-escaped (outside the frozen group) — re-opens the capture window every pass: its tail forks are born after the frozen chain's captures and are adopted by init at the pass boundary, so no pass from the child pid reaches them, and the sweep converges while they survive. Measured live against the sweep-to-quiescence fix at FINAL `0459c5b` (re-driven across three runs and an at-deadline variant): 2 of 80 / 1 of 80 / 2 of 77 / 3 of 79 / 2 of 79 final tail forks survive, always the final tail, adopted out-of-tree (`state=S ppid=3174`); a double-forking variant with the middleman exiting before the deadline survives 11 of 11, 10 of 10 alive (the named boundary at a higher fork rate). A subreaper would catch them but also catches the documented init-adopted boundary (measured against the F10 q1e shape), so the surface cannot be extended by a kill technique — only by a container boundary (cgroup/pid-namespace) that adoption cannot leave, or by an OWNER ruling narrowing the whole-tree sentence to the in-group forker surface.
  FIXED: no regression test — a review probe on a scratch fixture, not a committed pin; no committed module was edited by this review. Next action is the planner's: pin the boundary explicitly or narrow the whole-tree sentence the same way F11 goes; OUT OF SCOPE names the missing boundary explicitly, so this finding leaves as carried and does not block.

  F12 | SEVERITY: P2 | ORIGIN: CODE | STATE: carried
  A session-escaped forker whose middle layer exits before the first capture leaves its children outside the surface by construction: the sweep's process-group freeze cannot reach a forker that is already init's child, the client's freeze-and-slow-findings kill is checked within the same untouched-except-watchdog / in-scope-group invariant, and every source-level variant of the post-freeze sweep trialled upstream died trying to cross the same line (the adopted process is init's child). The reported variant drives a double-forking fixture child (a session-escaped middleman that spawns a session-escaped sleeper, then exits before the deadline) against the sweep-to-quiescence fix at FINAL `0459c5b`: the sleeper survives adopted out-of-tree, and the survival is structural, not a fork-rate accident — the middleman's early exit is the mechanism. Re-driven across three runs and lower fork-rate variants it survives session-escaped at 11 of 11, 10 of 10 alive (the named boundary at a higher fork rate). Only a container boundary (cgroup/pid-namespace, which a process cannot leave by adoption) reaches it without also catching the documented boundary; absent that the ruling narrows the whole-tree sentence the same way F11 goes.
  FIXED: no regression test — a review probe on a scratch fixture, not a committed pin; no committed module was edited by this review. Next action is the planner's: pin the boundary explicitly or narrow the whole-tree sentence the same way F11 goes; OUT OF SCOPE names the missing boundary explicitly, so this finding leaves as carried and does not block.

  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.
