IMPLEMENTER BRIEF — phase6-grading-seed (Phase 6: the grading gate runs seeded — F8)
GOAL: The grading gate runs seeded and verdicts are reproducible: the nested gate-check-tests invocation carries `--hypothesis-seed=424242`, the phase3 oracle fixture's grade flip is closed with red evidence, and a determinism pin grades one candidate N consecutive times with identical verdicts.
CONTEXT: R13 ([record.md](../record.md#r13--the-grading-gate-runs-seeded-verdicts-are-reproducible)) rules F8's fix as the seed, not the budget: the nested grading gate runs with the fixed hypothesis seed 424242 (the measured seed — the fixes implementer's A/B at `docs/research/phase6-supervisor-fixes-implementer.md:23`: 30.27s / 30.81s with the pins, 25.14s / 23.42s without, over the same 58-module selection in the same sandbox shape), so the same candidate grades the same verdict every time. The symptom was the lottery: the fixture's 60.0s per-check deadline against unseeded in-sandbox draws (24–67s) flipped a graded FAIL to CANDIDATE_TIMEOUT and a CORRECT_ACCEPTANCE to FALSE_SUCCESS. The fixture's 60s `gate_timeout_seconds` stands (R13: the `known-timeout` candidate waits out the whole budget on every run, so 150 predicts +90s and 300 +240s per module run — predictions with basis, not measurements). The seed is the whole fix only if the nested draws are the whole lottery: the review adjudicates, per its QUESTIONS, whether any residual nondeterminism (load, tmpfs hypothesis database, wall-clock) survives the seed. Red at this brief's `REV`: the oracle module is green — red evidence for F8's close is written first against the unseeded gate (see the Red evidence section). `REV` names the step's base — the parent of this brief commit — and is not claimed to be `FINAL`'s parent.
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.

Expected dispositions (rule 8 forms): F8 fixed with red evidence (named below — the seed closes the lottery, the flip shapes grade stable across N consecutive runs). F11 and F12 stay carried (both real, both named against the missing container boundary, both outside this brief's scope; the seed changes no kill surface and no whole-tree sentence).

IN SCOPE: src/orchestrator/project_oracle.py, tests/test_phase3_project_oracle.py
RESIDUALS:

none — rule 3 selection for this brief's `IN SCOPE`: no `docs/residuals.md` trigger glob matches `src/orchestrator/project_oracle.py` or `tests/test_phase3_project_oracle.py` (the `PILOT-R*` triggers name `planning_pilot.py`, `controller.py`, `reducer.py`, `decomposition.py`, `model.py`, and `derive_obligations.py`; the store is byte-verified against `docs/residuals.md` before this brief's commit, rule 2). No residual row rides, so the residual half of `scripts/check-scope` has nothing to carry here and it prints `tripped: none` — the line your report's `TRIPPED` field copies.

OUT OF SCOPE:
- Editing this brief file (`docs/research/phase6-grading-seed-brief.md`). A committed brief is never modified; a re-cut is a new file.
- `scripts/check-tests` in full: the gate script is delivered and frozen; the seed rides as an argument the oracle's frozen argv carries, not as a gate-script edit. If the gate script needs a code change, stop and report `IN SCOPE` as insufficient.
- `src/orchestrator/sandbox.py`, `scripts/supervise_run.py`, the supervisor's kill surface in full: F11/F12's container boundary is the next chain's work under a separate ruling (R13 names it when this brief is planned); the seed changes no kill surface and no whole-tree sentence. If the kill needs a code change, stop and report `IN SCOPE` as insufficient.
- `src/orchestrator/oracle.py`, `src/orchestrator/experiment_phases.py`, `src/orchestrator/hidden_oracle.py`, `src/orchestrator/conformance.py`: no grading-runner, calibration, probe-shape, or trusted-gate change rides here. No new event type, no `docs/tables/*` change and no table regeneration, no `docs/event-catalogue.md` change.
- `docs/self-host.md`, `docs/residuals.md`, `docs/record.md`, `docs/method.md`, `docs/templates/`: the status edit, if any is owed, rides a later step; this step delivers the seed.
- Every committed test module except the IN SCOPE fixture module — `tests/test_phase6_supervisor.py`, `tests/test_review_phase6_supervisor.py`, `tests/test_run_entry.py`, `tests/test_axis2_robustness.py`, and every other committed module are read-only here. No committed test file outside IN SCOPE is edited. If a pin would have to change for acceptance to pass, stop and report `IN SCOPE` as insufficient.
- `tests/open_defects.yaml` and the registry's meta-tests: no registration rides (F8 is the open finding whose next brief is this one; no `test_bug_*` name — the open-defect registry would then own it).
- Registry and control files: `tests/counterexamples.yaml`, `tests/guard_mutation_matrix.yaml`, `tests/fixture_fidelity.yaml`, `tests/verifier_registry.yaml`, `tests/spend_paths.yaml`, `tests/invariants.py`, `tests/helpers.py`, `pytest.ini`, tool configuration.
- No new dependencies, no tooling configuration, no reformatting. No new exception class and no `*Executor`/`*ModelClient` class or provider-registry registration.

ACCEPTANCE: Commands (run every one and paste what each prints into `VERIFIED`; expected result is green, exit 0, for each):

    scripts/check-tests --fast
    .venv/bin/python -m pytest tests/test_phase3_project_oracle.py --durations=5
    scripts/check-static
    scripts/check-docs
    scripts/check-scope 0c02b27 <FINAL> docs/research/phase6-grading-seed-brief.md

Every `pytest` line names `.venv/bin/python -m pytest` deliberately (the interpreter rule: the bare `pytest` on PATH has no `pytest-timeout` and `pytest.ini`'s `strict_config = true` rejects it — run these lines exactly as written and claim them under these names). The oracle line carries `--durations=5` (the budgets rule: the determinism pin's N and the 60s margin are set from measured per-test walls). The oracle line rides because this brief's IN SCOPE touches files under `src/` and `tests/` (rule: a brief that adds a file under `tests/` or `scripts/` also names `pytest tests/test_phase3_project_oracle.py`; this brief edits the oracle module and its fixture, so the line is the step's own battery). The docs gate is expected green with 0 errors — and every count figure you write in `VERIFIED` is the gate's own printed line, never the REV line quoted in this brief's CONTEXT and never recomputed from memory (rule 14). The scope line is expected green, exit 0, printing `tripped: none` (and the `claimed:` line the parser prints). `REV` below names the step's base — the parent of this brief commit — and is not claimed to be `FINAL`'s parent.

The seed (`src/orchestrator/project_oracle.py`, in place): the `gate-check-tests` check's frozen argv gains `--hypothesis-seed=424242`, placed after the `-k` exclusion expression and before the `--ignore=` entries, so the nested in-sandbox suite draws the measured seed's examples on every grading run. The value is a literal in the argv tuple at `src/orchestrator/project_oracle.py:730`–`:736` (the `build_project_oracle` gate-check-tests construction) — not a parameter, not an environment lookup: a grader defect's fix is a frozen constant, and the frozen argv (pinned per-directory membership plus the content identity the compare already holds) rejects any candidate-side substitution. No timeout value changes: the fixture's 60.0s and the default 300.0s both stand (R13). If `--hypothesis-seed` is not accepted by the pinned pytest/hypothesis versions on the nested run, stop and report `IN SCOPE` as insufficient rather than substituting a profile or settings-file seam.

The determinism pin (`tests/test_phase3_project_oracle.py`, in place — the module's sixth test): a new test grades one candidate tree N consecutive times through the manifest's `gate-check-tests` check and asserts identical verdicts every run. The candidate is the known-good shape the five-case corpus already builds (`_case_tree` plus `_edit_candidate_source` — a benign source edit over the intact tree, so the verdict asserted is the stable one, PASS, and the pin fails on any flip to CANDIDATE_TIMEOUT or FAIL). N is 5: five consecutive grades of the same tree, each through `oracle.grade_manifest` over the single-check manifest the other tests already assemble in `grade_one`. The pin reuses `project_oracle_context` (the module-scoped trusted manifest — no new fixture, no new builder flag). After the N runs the pin re-walks the process table for survivors of the nested runs (R13's orphan-probe duty: the sweep the seed brief repeats — no `/work/.venv` chain, no `sandbox_launcher` — and a survivor is a finding, not a pass). The pin carries `pytest.mark.timeout(1200)`: five seeded nested runs at the measured ~30s structural cost plus the probe-tree copies and identity digests each grade performs must fit inside one test's wall budget with margin for a loaded host.

Red evidence at `REV` `0c02b27` (each unit must be replayable; the oracle module is green at REV, so each red is written by this step and demonstrated at REV against the unseeded gate on a scratch copy diff-verified against `git show 0c02b27:…` before use). `FIXED` names the pin's node id, the command, the named failing assertion, and the delivered file's line numbers or none. Named reds to produce: F8's flip red — at REV, with the gate unseeded, N consecutive grades of the known-good tree produce non-identical verdicts (a named failing assertion on verdict identity across the N runs — the flip the lottery deals: PASS on one run, CANDIDATE_TIMEOUT on the next — an error or a hang is not red, the assertion must be the thing that failed). The red is the lottery's, not load's: the scratch run holds the tree and the manifest constant and varies only the draw, and the report discriminates (the seeded structural cost ~30s measured in the same shape, the unseeded spread the cause).

Named shapes to build — the list of shapes, not the number of tests. One shape needs at least one test, and every named shape needs one:

- `Determinism shape` (F8): N consecutive grades of one candidate tree through the seeded gate return identical verdicts — the determinism pin, red at REV on the unseeded gate (the flip), green at FINAL (the seed).

EXPECTED WALLS: none yet — this brief's REV `0c02b27` carries no report with VERIFIED lines for the IN SCOPE files (the supervisor chain's reports cover other files). The first VERIFIED lines this step writes set the budgets; the determinism pin's N=5 and its 1200s timeout are set from the measured ~30s seeded structural cost per nested run quoted in CONTEXT (five runs plus copies and digests, with margin for a loaded host — expected, with basis, per rule 15).

REV: 0c02b27
CLOSE OUT: yes
DIVERGENCES: none
REVIEW: one session — the seed above all: does the frozen argv carry the literal seed (no parameter, no environment seam, no gate-script edit), does the determinism pin grade one tree N consecutive times with identical verdicts (red at REV on the unseeded gate, green at FINAL), is the `IN SCOPE` line plain with scope green, are the docs figures the gate's own printed lines (rule 14), and does the step touch only the IN SCOPE files with every committed battery green and no committed test edit outside them. Whether anything remains open after this step — F11/F12's container boundary under its separate ruling — is the loop's exit input: report findings and let the planner decide (cycle step 5).

You implement one brief. You do not plan, re-scope, or decide what the work is. Read every file
in IN SCOPE before editing it; if what you find contradicts the brief, report that instead of
guessing. Modify only what IN SCOPE names. If you find uncommitted changes in the tree, stop and say
so. A new module under tests/ that runs trials or sandboxed suites carries
pytestmark = pytest.mark.slow at module level: the oracle's internal gate runs the fast suite
(-m "not slow") and an unmarked trial-running module breaks it. Stop and report rather than
improvise when IN SCOPE is
insufficient, the brief contradicts the code, you have already failed twice at this goal, or the
requirement is ambiguous and no single reading is consistent with the rest of the brief. If exactly
one reading is consistent, take it and file a FINDING with ORIGIN: BRIEF that names the reading you
took. No new dependencies, no tooling configuration, no reformatting. Run every ACCEPTANCE command;
fix what is in scope and report what is not.

A defect in the brief is a FINDING, never METHOD FRICTION. METHOD FRICTION is only for the method and
its templates: any place you deviated from them, found them ambiguous, or found them silent. Report
friction you worked around — that is the section the method learns from.

Commit your own work. When ACCEPTANCE passes, commit the files you changed, and only those, in one
commit whose message ends with the trailer `Actor: IMPLEMENTER`. That commit's full sha is FINAL.
Then append docs/templates/report.txt verbatim, fill it in, write it to
docs/research/<phase>-<subject>-implementer.md, and commit it in a second commit with the same
trailer. Do not amend the first commit to add the report: FINAL must not change after the report
names it. If you cannot commit, stop and say so; do not leave work uncommitted for someone else to
commit.
