REVIEW BRIEF — phase5-run-entry-fixes-4 (Phase 5: the cancel-race disposal — F29–F32)
REV: 5711e48a57dcd9df9184083009be720bd20cd7bf
FINAL: 7f4381ad7f3a410f27831c02680f3daa1f9e1bcf
REVIEW ACCEPTANCE: scripts/check-scope 5711e48a57dcd9df9184083009be720bd20cd7bf 7f4381ad7f3a410f27831c02680f3daa1f9e1bcf docs/research/phase5-run-entry-fixes-4-brief.md
FOCUS: the stale-admission pair's fail-closed unknown-id shape — F33's owner-id reading, its named residual, and every artefact-machine follow-on — and the class pin's second-process faces (`inspect`, a fresh connection's replay, the TOCTOU window the report names).
SEVERITY SCALE: P0 blocks the step; P1 is serious; P2 is minor.
QUESTIONS TO ATTACK:

  F33 | SEVERITY: P2 | ORIGIN: BRIEF | STATE: fixed
  The brief requires the reducer to tell a retained admission's follow-on from a genuinely unknown `artefact_id`, but `reducer.reduce(state, event)` sees no event log and `model.py` (the only place a retained-admission marker could live) is outside IN SCOPE; the brief names no mechanism.
  FIXED: the one reading consistent with the brief's own fail-closed clause and with the "retained, never created" Exec F2 guard is the controller's deterministic owner id: `ARTEFACT_INTEGRATED`'s id is `{attempt_id}-artefact`, and the owning attempt is terminal, so `_retained_artefact_admission` (src/orchestrator/reducer.py:904) retains exactly that case and raises for an id no terminal attempt owns. This is the reading the brief's "follow-on of a retained admission is itself late" requires; pinned by tests/test_run_entry.py::test_stale_admission_race_log_replays (red at REV, green at FINAL) with the unknown-id fail-closed assertion. No brief text correction is needed because no other reading is consistent with IN SCOPE. Residual of the reading, named in SHAPES: because retention leaves no state record, a crafted `{terminal_attempt}-artefact` id with no prior `ARTEFACT_ADMITTED` is retained rather than refused; the fail-closed pin uses an id owned by no terminal attempt.

The copied block above is the report's only entry that questions the brief (`METHOD FRICTION: none`); the claims are attacked below. This review decides whether the loop's exit condition holds ("no P1 or P2 finding remains") and whether the fixes-4 step closes out.

1. F33's `ORIGIN: BRIEF` reading, its mechanism, and its close form. The brief's `Stale-admission replay shape` named the pair's guarantees with no mechanism ("the follow-on of a retained admission is itself late … a genuinely unknown `artefact_id` … still fails closed"), `reducer.reduce(state, event)` is pure, and `model.py`/`store.py` are `OUT OF SCOPE` — so the implementer took the one reading and filed F33: `_retained_artefact_admission` (`src/orchestrator/reducer.py:904`) treats an artefact-machine event whose owning attempt is terminal as late, where the owner is the payload's `attempt_id` when present, else the `{attempt_id}-artefact` suffix derivation, and any other unknown id raises. Attack: (a) The catalogue's `ARTEFACT_INTEGRATED` payload is `artefact_id, merge_info` — no `attempt_id` ([event-catalogue](../event-catalogue.md)) — so is the payload branch dead and the suffix derivation the only live face? Grep every `artefact_id` mint (`controller.admit_artefact`, `conformance.py`, `run_entry.py`, the harness) and every artefact event's emitted payload: a mint shape outside `{attempt_id}-artefact`, or a follow-on carrying a mismatched `attempt_id`, lands on the raise or on a false retention. (b) The reading's named residual (its `SHAPES`): a crafted `{terminal_attempt}-artefact` id with no prior `ARTEFACT_ADMITTED` is retained rather than refused. Who can inject one (the payload is a plain string — walk `EventStore`'s admission surface and the schema check), is it reachable outside an experimenter, and is the brief's fail-closed clause true in the brief's sense (an id no terminal attempt owns) or false in the literal sense (an id never admitted)? File a finding if the clause's meaning shifted under the reading. (c) Was the reading genuinely forced? A tombstone in `model.py` is out of scope, but `store.py`'s `_replay_all` sees the whole log — is the missing mechanism the brief's own `ORIGIN: BRIEF` defect (the shape pair tasks a pure function without naming a state carrier), with `store.py`'s exclusion the real cause? (d) The close form: report.txt's `ORIGIN: BRIEF` rule reads "fixed once a later committed brief corrects the text: `FIXED:` names that brief's commit and reads `no regression test`", while F33 closes `fixed` with a red pin and "no brief text correction is needed". The implementer template's taken-reading form names no close. Is this close honest (the reading's red is the pin), or is a later brief's text correction owed (the close-form lesson in `record.md#observations`)? File it either way.

2. The stale-admission pair's every face. Reproduce the red first in the report's `git archive` scratch form (diff-verify the scratch `reducer.py` and `tests/test_run_entry.py` against `git show 5711e48:…` before trusting any result): the three named failures at `tests/test_run_entry.py:1064/1111/1211`. Then: (a) Exec F2's purpose — the race-order log must replay to `CANCELLED` without creating or integrating the cancelled attempt's candidate: assert the artefact never advances (absent, or never `INTEGRATED`/`VALIDATED`/`PUBLISHED`), not only that no `ReducerError` raised. (b) The retention is wired into `_on_artefact_integrated` (whose terminal-attempt guard covers `ARTEFACT_INTEGRATED` and `ARTEFACT_PUBLISHED`): drive the same retained-admission follow-on for `ARTEFACT_VALIDATED`, `ARTEFACT_REJECTED`, and `ARTEFACT_SUPERSEDED` — do those handlers still raise `unknown artefact_id` on a never-created id? The CONTEXT claims "the follow-on of a retained admission is itself late", not "integration's follow-on": file the breadth gap (or the claim's honest narrowing) either way. (c) Mutant both faces of `_retained_artefact_admission`: always-retain (does the unknown-id fail-closed assertion go red?) and never-retain (does `test_stale_admission_race_log_replays` go red?). (d) The live face: the same race order through a live two-connection store (the stop's admissions between the launcher's stale admissions) — does the live admit path retain (Exec F2's `_on_artefact_admitted` guard at `:885`) and does the cached projection end equal `replay_fresh`?

3. F29's class pin and the document == durable fresh outcome guarantee. The subprocess drive (the documented `start`/`stop`/`inspect` heads, a real frozen repository): (a) every guarantee sentence — the JSON carries `accepted: false` and `outcome: CANCELLED`; `start`'s exit is non-zero; no traceback on EITHER process (the fixes-3 review's lesson: the observable failure hides in the second process — drive `inspect` and assert its stderr is empty and its exit is 0); `inspect`'s outcome equals a brand-new connection's `replay_fresh`. (b) The TOCTOU window the report's `SHAPES` names (a stop landing between a fresh read and the admission it guards): walk one order — the stop between `_bind_acceptance`'s re-read and `authorise_acceptance` — and record the document, the exit code, and the log's replay. The report claims `_cancel_attempt` leaves a `RESULT_PRODUCED` attempt untouched so the acceptance bindings still resolve on replay: verify, and verify no new `ReducerError` face opens over the late `EVIDENCE_ADMITTED`/`ACCEPTANCE_AUTHORISED` pair. (c) `test_cancel_race_shape_stop_after_observation` — does it pin the second process's exit code and JSON document too, or only the launcher's? (d) The named REV reds (`:1064` `assert 0 != 0`; `:1111` `assert True is False`; `:1211` `pytest.fail` naming the `ReducerError`): each must be the named failing assertion at REV and green at `FINAL`; F22's lesson — do the line numbers land? An error or a crash is not red, and a `pytest.fail` wrapper is not an `assert` (see question 8).

4. F30's four facet pins and the F27 guard's changed face. Mutant the idempotency key at all three emit sites (the fixes-3 review's key mutant, under which both modules passed 40/40) — do the four new pins go red? Mutate the F27 precondition to always pass — does `test_review_f30_zero_fingerprint_terminal_run_refuses` go red? Is the refusal's shape asserted (the `WorkflowError`, node and outcome unchanged, history unchanged), or only that some exception raised? "Settles exactly once" — what enforces exactly-once (the shared `infeasible-{node_id}` key's idempotency, or an assertion on the history shape)? Drive the accepted lineage's settle twice and assert the history. And the late-retention facet: is the with-fingerprint terminal call's retention asserted (history +1, no outcome rewrite) or only its non-raise?

5. F31 and F32's claim hygiene. (a) The renamed id `test_review_f28_documented_commands_are_python3_and_run_as_written` — does it name the enforced property exactly (row J), and is the old name gone everywhere (the module docstring, any live reference)? (b) F32's fence-stripping helper (`_commands_section_prose`, `tests/test_phase5_run_entry_fixes_2_review.py:160`) — drive the report's two mutants at `FINAL` (a `json`-naming sentence; deletion of the sentences) and confirm the red at `:194`; then the mutant the report did not name: move the prerequisite sentence INTO the fenced block (the surrounding prose empty) — does the pin refuse, or pass vacuously (row I again)? (c) Row J on the doc's prose: every documented head run as written on this host (the full forms, not only `--help`), and the `yaml`-prerequisite sentence's truth (the system `python3` resolves `yaml`).

6. The Phase 5 exit gate as a whole — the loop's exit is at stake. The five operator classes as subprocesses against a real repository (accept, failing-command refusal, wall-clock timeout, mid-run cancel, the injected-`ProtocolViolation` class): each a settled terminal outcome, the documented JSON and exit codes, no traceback, document == durable fresh outcome. Plus every documented head run as written. Report each guarantee falsified-with-reproducer or attacked-and-not-falsified. This review decides whether the loop's exit condition holds and whether the fixes-4 step closes out.

7. Regressions over the whole stream. The battery (the report's counts — fast 961 passed / 92 deselected; the two modules 47; conformance 41; oracle 5; static 104 advisory rows; docs 353/353) and the held sets of the run-entry through fixes-3 steps — the load and refusal shapes, the one-stamp and settle-claim interleave pins, the import matrix, `test_clean_env_cli_shape` (still executing the form the doc names?), the F21 drift pin, the absorbed F27/F28 pins (renamed and reshaped here), and the budgets/`run_specification`/late-event guarantees. Re-measure `TRIPPED` from `scripts/check-scope`'s own line (the report claims `PILOT-R1`). The deselected count moved 85 → 92: account for the +7.

8. Report hygiene (J-class). Every `VERIFIED` count re-measured (961+92 and 47 = 40+7 — account for each new case); `FINAL`'s form (the report names the short `7f4381a` — the work commit `7f4381ad7f3a410f27831c02680f3daa1f9e1bcf`, never the report commit `b87be69`; expand and verify); the red-evidence scratch form's honesty (each named failure a real failing assertion at REV — report.txt: "An error or a collection failure is not red"; is `:1211`'s `pytest.fail` wrapper the assertion that failed, or a translation of the reducer's raise?); `SHAPES` against the brief's four shapes (every named shape needs a test — the TOCTOU window and the F33 residual are named, not hidden); `INHERITED` against the received set and rule 8; and the one-line `METHOD FRICTION: none` against the template's field.

--- BEGIN BRIEF UNDER REVIEW (copy of docs/research/phase5-run-entry-fixes-4-brief.md; the committed file is authoritative) ---
IMPLEMENTER BRIEF — phase5-run-entry-fixes-4 (Phase 5: the cancel-race disposal — F29–F32)

GOAL: F29–F32 are disposed and the Phase 5 exit gate is claimable on the next clean review. F29: the mid-run-cancel operator class settles honestly and its log stays replayable — with a second process's documented `stop` landing while a launcher's root execution is live, `start`'s JSON carries the durable fresh outcome (`accepted: false`, `outcome: CANCELLED`), `start`'s exit is non-zero, neither process prints a traceback, the documented `inspect` head runs clean on the produced store and reads the same outcome as a brand-new connection's replay, and every new connection replays the durable log to that outcome with no `ReducerError`. F30: the Guarded-surface shape's three facets are pinned — an accepted lineage settles exactly once (one `NODE_MARKED_INFEASIBLE`), a duplicate `mark_infeasible` dedupes against the shared `infeasible-{node_id}` key (history +0), a late call with a recorded failure on a terminal run is retained with no outcome rewrite — and the behaviour the F27 guard changed is named by a pin (a zero-fingerprint `mark_infeasible` on a terminal run refuses with `WorkflowError`, node and outcome unchanged). F31: the absorbed F28 pin's node id names the property the pin enforces (every documented head is the `python3` form and runs as written; no bare head is documented) with its docstring's meaning unchanged. F32: the prerequisite assertion binds the claim (a mutant naming only `json`, and a deletion of the sentence, both go red at `FINAL`) or is dropped with the reason named.

CONTEXT: The fixes-3 step returned to planning (its review raises F29 as P1); F26–F28 are disposed and F30–F32 ride this continuation. F29's mechanism is two halves, both inside the existing late-event rule — no `docs/tables/*` change, no new event type, no catalogue or conformance entry (the artefact machine is silent on a cancelled attempt's candidate: [artefact-lifecycle.yaml](../tables/artefact-lifecycle.yaml) has no such row, and the Exec F2 guard in `reducer.py` is code). (1) The launcher drives its execution-phase admissions on its in-memory projection, which never observes a second process's `stop` (F20's lesson — already applied at `_settle_executor_refusal`, which reads `controller.store.replay_fresh(run_id).outcome` before deciding, re-reads before emitting, and re-reads after admissions for the returned document). The same discipline belongs at the live `DISPATCH_ACKNOWLEDGED`/observation boundary and at `start_run`/`_bind_acceptance`'s returns: the node-level chain is skipped when the fresh outcome is already terminal, and the returned `StartResult`/CLI JSON keys on the durable fresh outcome (`accepted` is true and the exit zero only when that outcome is `ACCEPTANCE_CLAIMED`). (2) The reducer's own pair makes such a log unwritable-but-unreadable: `_on_artefact_admitted` late-retains a terminal attempt's artefact without creating it (the Exec F2 guard), and `_on_artefact_integrated` then raises `ReducerError: unknown artefact_id` on the id that guard refused to create (`reducer.py:908`) — under the late-event rule the follow-on of a retained admission is itself late. A genuinely unknown `artefact_id` (never admitted anywhere in the log) must still fail closed. The class pin is subprocess-level (the review's shape: a launcher and a second process's documented `stop` — never an in-process double-`stop` alone), and every "no traceback" drive exercises the documented `inspect` head against the produced store, not only the launcher's stderr (the observable failure hides in the second process). F30's three facets are the fixes-3 brief's Guarded-surface shape (named there, left unbuilt behind `SHAPES: none`); that report's "unchanged as measured by the fixes-2 review" is false for the zero-fingerprint terminal call (the F27 guard made it refuse). F31 and F32 are the absorbed F28 pin's claim hygiene (row J: the id is the claim; row I: a presence assertion binds words, not claims). Claim discipline: the pinned threat set is the review's deterministic drives (the stop landing while the visible command runs, and after the observation); a same-instant race beyond the check-before-emit claim is named in `SHAPES`, not hidden. `REV` names the step's base — the parent of this brief commit — and is not claimed to be `FINAL`'s parent (F4's lesson).

INHERITED:

From `docs/research/phase5-run-entry-fixes-3-implementer.md`, its `INHERITED` block verbatim:

  INHERITED:
  none — every received INHERITED item (F26, F27, F28) is fixed by this step; nothing is carried.

From `docs/research/phase5-run-entry-fixes-3-review.md` — the report is outside `report.txt`'s shape and has no `INHERITED` block to copy (see `record.md#observations`), so its carried set is moved verbatim from its `FINDINGS` section:

  **F29 (P1, origin: code) — the mid-run-cancel operator class falsifies the exit gate's
  document contract and leaves the durable log unreplayable.** The failure reproduced in
  every drive attempted: the full-gate class-4 drive, two race-driver drives at FINAL
  (delays 2s and 4s), one isolated drive, and twice at `REV 6ad0989` with the same script —
  pre-existing, not a regression of this step's work; the F27 guard is nowhere in the trace.
  Drive: a launcher runs `python3 scripts/orchestrate.py start --spec … --workdir … --store …`
  (visible command `sleep 15`/`sleep 30`, `wall_clock_seconds: 60`);
  while the visible command is running a second process runs the documented `stop`
  (`python3 scripts/orchestrate.py stop --run-id RUN …`): the stop exits 0 and records the
  cancellation (`CANCELLATION_CONFIRMED`, `ATTEMPT_COST_SETTLED_CONSERVATIVELY`,
  `NODE_CANCELLED` — seqs 9–11), and the launcher — whose in-memory projection never observes
  the second process's admissions — continues the live lifecycle on its own stale
  projection: `DISPATCH_ACKNOWLEDGED`, `EXECUTOR_OBSERVATION_ADMITTED`,
  `ATTEMPT_EXECUTION_ENDED_UNRECONCILED`, `ATTEMPT_COST_RECONCILED`, `RESULT_ADMITTED`,
  `ARTEFACT_ADMITTED`, `ARTEFACT_INTEGRATED`, `EVIDENCE_ADMITTED`, `VALIDATION_STARTED`,
  `VALIDATION_PASSED`, `ACCEPTANCE_AUTHORISED` (seqs 12–22) are all admitted; the launcher
  exits **0** with JSON `accepted: true`, outcome `ACCEPTANCE_CLAIMED` — a cancelled run, so
  the documented contract ("`start` exits zero when acceptance was authorised and non-zero
  for every non-accepted class — a recorded refusal, a **cancelled run**, or a timed-out
  attempt") is falsified. Worse: the durable log is **unreplayable** — any new connection
  (`inspect`, a recover, a fresh `EventStore`) raises `ReducerError:
  ARTEFACT_INTEGRATED: unknown artefact_id 'RUN-…-artefact'` (`reducer.py:908`, via
  `store.py:133`'s `_replay_all`), because on the replay the cancellation already reached the
  node and the artefact-registration branch the live (stale-cache) path had taken cannot
  recur. The documented `inspect` head — "It admits no events and is safe against a run
  another process started" — exits 1 with a traceback. So of the exit gate's contract
  sentences: "each a settled terminal outcome, the documented JSON and exit codes, no
  traceback, document == durable fresh outcome" — falsified-with-reproducer (the terminal
  outcome is `ACCEPTED`/claims-accepted instead of cancelled; the exit code is 0 instead of
  1; a documented head traces back — though not the launcher itself; and "document ==
  durable fresh outcome" fails harder: the durable fresh outcome is not computable at all).
  The committed interleave pins cover the settle machinery's cross-connection order;
  this class — the stop of a second process landing against a **purely live exec** — is
  unpinned. Carried: F29 stays P1 until a next brief either orders the launcher's every
  execution-phase admission against a fresh read (the F20 triple-read discipline applied at
  the live `DISPATCH_ACKNOWLEDGED`/observation boundary, not only at the settle seam), or
  re-edges the machine's cancellation-concurrency contract — and pins the class
  (subprocess-level, like the old `cancel-race` drives, never an in-process double-`stop`
  alone).

  **F30 (P2, origin: report) — the implementer report's `SHAPES: none` claims hand
  measurements as covered shapes, and one claimed-unchanged facet actually changed.**
  Evidence: (i) the key mutant — both modules pass 40/40 with the shared key changed at all
  three emit sites — proves no committed test pins the dedup/settle-once/late-retention
  facets of `mark_infeasible`; (ii) the zero-fingerprint terminal-run late call — the
  fixes-2 review's answer-2 drive — now raises under the guard (behaviour changed), so
  "unchanged as measured by the fixes-2 review" is false for that drive; (iii) the brief's
  shape names all three facets and the brief's rule says every named shape needs a test.
  Carried: the three facets' pins — or an honest `SHAPES` naming them unbuilt and naming the
  behaviour change — in the next brief.

  **F31 (P2, origin: code) — the absorbed F28 pin's node id
  `test_review_f28_documented_bare_command_is_executable` misstates the enforced
  property** (the id claims the documented bare command is executable; the pin enforces "no
  bare head documented and the documented `python3` form runs"). The docstring is honest;
    the claim-bearing id is not (and the id's claim is the opposite of the pin's own
    `assert not head.startswith(...)`). Carried: rename the node id in the next brief — the
    id is the claim (F24's honesty rule) — with the docstring unchanged.

  **F32 (P2, origin: code) — the F28 pin's prerequisite sentence assertion binds word
  presence, not the named claim** (row I's vacuous-truth class): `"yaml" in section` and
  `"python3" in section` are already satisfied by the argument shape inside every head
  (`--spec RUN_SPEC.yaml` and the `python3` interpreter), so the pin stays green through both
  mutants (a `json`-naming prerequisite sentence; deletion of the new sentences). Carried:
  bind the claim (e.g. the pin parses the sentences' heads separately from the argument
  shapes), or drop the assertion and rely on the module docstring — but then say so.

IN SCOPE: src/orchestrator/run_entry.py, src/orchestrator/reducer.py, docs/run-entry.md, tests/test_run_entry.py, tests/test_phase5_run_entry_fixes_2_review.py

RESIDUALS:

Rule 3 selection for this brief's `IN SCOPE`, copied verbatim from `docs/residuals.md` and byte-verified against it (fenced so the store's relative evidence links are not re-resolved from this directory): `IN SCOPE` matches `PILOT-R1`'s trigger globs (`src/orchestrator/reducer.py`); `PILOT-R2` and `PILOT-R10` (`planning_pilot.py`, `controller.py`, `decomposition.py`) do not match and do not ride.

```
| ID | State | Trigger | Risk | Rationale | Evidence |
| --- | --- | --- | --- | --- | --- |
| `PILOT-R1` | accepted | `src/orchestrator/planning_pilot.py`, `src/orchestrator/controller.py`, `src/orchestrator/reducer.py` | mutable admitted payload (wiring constraint): the caller holds a mutable reference to the admitted payload, and a post-return mutation of a child's scope survives the reducer's re-validation. Any integration must therefore not mutate a payload between the guard and event admission. | the admitted payload is mutable; the reducer's re-derivation runs at admission and on replay, so the guard's result is only as safe as the wiring keeps it | [pilot re-review 3](research/phase4-recursive-planning-pilot-re-review-3.md) |
```

A tripped trigger is a finding: fixed with red evidence, or carried into the closeout with its reason. `scripts/check-scope` prints the `tripped: <ids>` line your report's `TRIPPED` field copies. `PILOT-R1` stays accepted: this brief admits no decomposition and mutates no admitted payload (the reducer's pair change touches the late-retention branches only).

OUT OF SCOPE:
- Editing this brief file (`docs/research/phase5-run-entry-fixes-4-brief.md`). A committed brief is never modified; a re-cut is a new file.
- The controller stack: `src/orchestrator/controller.py`, `store.py`, `executor.py`, `executor_protocol.py`, `command_executor.py`, `acceptance_checks.py`, `schemas.py`, `glossary.py`, `experiment_target.py`, `derive_obligations.py`, `scripts/orchestrate.py`, and the experiment harness (`experiment.py`, `experiment_spec.py`, `experiment_phases.py`, `trial_driver.py`, `hidden_oracle.py`, `scripts/smoke_run.py`, `scripts/stress_run.py`). If one of these must change, stop and report `IN SCOPE` as insufficient. The fresh reads are the launcher's own between-call reads through `controller.store.replay_fresh` — no new `Controller` surface.
- No `docs/tables/*` change and no table regeneration, no `docs/event-catalogue.md` change and no new event type, no `docs/control-plane.md` edit, no `docs/residuals.md` or `docs/record.md` edit, no `docs/self-host.md` edit, no `docs/method.md` or `docs/templates/` edit. `docs/run-entry.md` may sharpen the `start` contract sentence to name the settled outcome the exit code keys on; it is not otherwise reshaped.
- The Exec F2 guard's purpose stands: a cancelled or failed attempt's candidate is never integrated and never published. Only the retained-admission pair's consistency changes, inside `reducer.py`.
- `mark_infeasible`'s precondition (`state.failure_fingerprints[node_id]` non-empty), `evaluate_repeated_failure`, `record_failure`'s fingerprint material, and the `infeasible-{node_id}` idempotency key stay unchanged (F30's pins bind the behaviour as measured; they do not re-shape it).
- Model-produced candidates and recursive decomposition driving (unchanged): `start` drives the root's execution only.
- Registry and control files: `tests/open_defects.yaml`, `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 or `*Executor`/`*ModelClient` class and no provider-registry registration. No new arm and no `docs/tables/limits.yaml` change.
- Name no test `test_bug_*` (the open-defect registry would then own it).
- Do not mutate an admitted payload between the guard and event admission.

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_run_entry.py tests/test_phase5_run_entry_fixes_2_review.py
    .venv/bin/python -m pytest tests/test_milestone2_conformance.py
    .venv/bin/python -m pytest tests/test_phase3_project_oracle.py
    scripts/check-static
    scripts/check-docs
    scripts/check-scope 5711e48a57dcd9df9184083009be720bd20cd7bf <FINAL> docs/research/phase5-run-entry-fixes-4-brief.md

Every `pytest` line names `.venv/bin/python -m pytest` deliberately (F17's carried correction: the bare `pytest` on PATH has no `pytest-timeout` and `pytest.ini`'s `strict_config = true` rejects it on this host — run these lines exactly as written and claim them under these names). `tests/test_milestone2_conformance.py` is named because the reducer's late-event surface changes. `tests/test_phase3_project_oracle.py` is named under the standing rule for `tests/` changes. Never put a full run in `ACCEPTANCE`; the reviewer runs `scripts/check-tests`. `REV` below names the step's base — the parent of this brief commit — and is not claimed to be `FINAL`'s parent (F4's lesson).

Red evidence at `REV` `5711e48a57dcd9df9184083009be720bd20cd7bf` (command `scripts/check-tests`; each unit must be replayable): the suite is green at `REV` (measured here: `scripts/check-tests --fast` 961 passed, 85 deselected, 70.83s; `scripts/check-tests` 1046 passed, 454.16s; `scripts/check-docs` 352/352 links, 0 errors; `scripts/check-static` exit 0), so each red is written by this step and demonstrated at `REV` against the unfixed code (scratch copy diff-verified against `git show 5711e48a57dcd9df9184083009be720bd20cd7bf:…` before use). `FIXED` names the pin's node id, the command, the named failing assertion, and the delivered file's line numbers or none (F22's lesson). Named reds to produce: the cancel-race class pin (F29 — at `REV` the launcher's `start` exits 0 with `accepted: true` and `outcome: ACCEPTANCE_CLAIMED` while the documented `inspect` head traces back on `ReducerError`; the pin asserts non-zero exit, `accepted: false`, `CANCELLED`, no traceback on either process, and `inspect` clean and equal to a fresh connection's replay); the stale-admission replay pin (F29's log half — at `REV` the race order's replay raises `ReducerError: ARTEFACT_INTEGRATED: unknown artefact_id …`; the pin asserts the same order replays to `CANCELLED` with no `ReducerError` and without integrating the cancelled attempt's candidate, while a genuinely unknown `artefact_id` still raises). F30, F31, and F32 close `no regression test` (green-at-both drift guards): the three facet pins bind behaviour that already holds at `REV` (settle-once, dedup on `infeasible-{node_id}`, the with-fingerprint terminal late retention) plus the zero-fingerprint refusal the F27 guard already enforces; the F28 pin's rename is claim hygiene; the strengthened prerequisite assertion is green at `REV` and its two review mutants go red at `FINAL`.

Slow-mark convention: every case in `tests/test_run_entry.py` and `tests/test_phase5_run_entry_fixes_2_review.py` stays slow-marked by each module's existing `pytestmark = pytest.mark.slow` (`src/orchestrator/project_oracle.py:731`'s internal gate runs `scripts/check-tests --fast`, and the pre-commit hook deselects the same way); no new module is needed — put the pins in the existing ones.

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:

- `Cancel-race class shape` (F29): the subprocess-level class pin — a launcher running the documented `python3 scripts/orchestrate.py start …` form against a real frozen repository with a long visible command, a second process running the documented `stop --run-id …` form mid-run, then: `start`'s JSON carries the durable fresh outcome (`accepted: false`, `outcome: CANCELLED`), its exit is non-zero, no traceback on either process, the documented `inspect` head runs clean on the produced store and its outcome equals a brand-new connection's `replay_fresh`, and every new connection replays the log with no `ReducerError`. The review's deterministic drives (the stop landing while the visible command runs, and after the observation) are the pinned threat set; any same-instant race beyond the check-before-emit claim is named in `SHAPES`, not hidden.
- `Stale-admission replay shape` (F29's log half): a durable log containing the race order (the second process's `CANCELLATION_CONFIRMED`/`NODE_CANCELLED`, then the launcher's execution-phase admissions through `ARTEFACT_ADMITTED`/`ARTEFACT_INTEGRATED`) replays to `CANCELLED` with no `ReducerError` and without integrating the cancelled attempt's candidate (Exec F2's guard intact — retained, the artefact never advances); a genuinely unknown `artefact_id` (never admitted anywhere in the log) still fails closed with `ReducerError`. The existing conformance set stays green.
- `Guarded-surface shape` (F30): `Controller.mark_infeasible`'s three facets as pins beside the absorbed F27 probe: an accepted lineage settles exactly once (one `NODE_MARKED_INFEASIBLE`, `READY → INFEASIBLE` via `any_non_terminal`), a duplicate call dedupes against the shared `infeasible-{node_id}` key (history +0), a late call with a recorded failure on a terminal run is retained with no outcome rewrite — and the behaviour the F27 guard changed is named: a zero-fingerprint call on a terminal run refuses (`WorkflowError`, node and outcome unchanged) instead of retaining late. The precondition and the key are unchanged.
- `Runnable-doc pin shape` (F31, F32): the absorbed F28 pin's node id names the property it enforces (every documented head is the `python3` form and runs as written; no bare head is documented), its docstring's meaning unchanged; the prerequisite sentence's assertion binds the claim (a mutant naming only `json`, and a deletion of the sentence, both go red), not word presence (row I's vacuous-truth class: `"yaml" in section` matches `RUN_SPEC.yaml` inside the heads' own arguments). Either strengthen the assertion (parse the sentence's heads separately from the argument shapes) or drop it and rely on the module docstring — but say which in the report.

REV: 5711e48a57dcd9df9184083009be720bd20cd7bf
CLOSE OUT: yes
DIVERGENCES: none
REVIEW: one session — attack the cancel-race class pin's subprocess drive and the document == durable fresh outcome guarantee (including the documented `inspect` head and the fresh replay), the stale-admission pair's Exec F2 retention and fail-closed unknown-id shape, and F30–F32's pin claims (the three facets' bindings and the F28 pin's id and prerequisite assertion).

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. 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.

# report.txt

REPORT — <phase>-<subject>-<role>
STEP: <implementer brief subject>
REV: <copied from the brief's REV — the step's base, not FINAL's parent>   FINAL: <implementer: sha of your work commit, never the commit that holds this report;
  reviewer: the sha under review, copied from the review brief>
CHANGED: <files, one line each>
VERIFIED: <command, duration, counts>
         Every VERIFIED and ACCEPTANCE claim names the command that actually ran — never a
         substituted interpreter, wrapper, or narrowed form. If the documented form cannot run in
         your environment, record both commands and the documented form's separate check.
NOT VERIFIED: <why, or none>
FINDINGS: none | one block each:
  ID | SEVERITY: P0|P1|P2 | ORIGIN: BRIEF|CODE|DOCUMENT | STATE: fixed|declined|carried
  <root cause, one line>
  FIXED: <node id, command, and the named failing assertion at REV — or "no regression test">
         An error or a collection failure is not red. The assertion has to be the thing that
         failed; a run that merely crashed proves nothing.
  STATE means: fixed (above); declined = not a defect, with the reason; carried = a real defect
  left unfixed, passed on in INHERITED. A defect you will not fix now is carried, never declined.
  An ORIGIN: BRIEF finding is fixed once a later committed brief corrects the text: FIXED: names
  that brief's commit and reads "no regression test". Carried means a future actor has something to
  do with it; at closeout a finding with no possible next action is closed — a defect in an
  already-committed report reads FIXED: recorded in the review that filed it, and an authoring
  lesson from a finished brief goes into record.md's Observations.
SHAPES: <shapes probed that the suite does not build, or none with a reason>
TRIPPED: <copied from check-scope's tripped: line>
PROPOSED ROWS: <ledger rows, or none>
METHOD FRICTION: none | <where you deviated from the method or its templates, misread them, or
  found them silent. A defect in the brief is a FINDING, not friction.>
INHERITED:
<<every INHERITED item you received that is still open, copied verbatim; then each
  finding you marked carried, with its ID>>
Rule 2 governs the planner's copy of this block. What goes in it is yours: an implementer or
reviewer who received an obligation, finding, entry or trigger carries it forward verbatim, and
adds anything new that is still open. A block reading `none` is correct only when nothing came in
and nothing is open. INHERITED never carries residual rows; they are re-selected from the store per
brief.
--- END BRIEF UNDER REVIEW ---

You did not write this code and you will not fix it; a finding is output, not an action. The
commits under review carry the trailer `Actor: IMPLEMENTER`; if your session wrote any of them, stop
and say so. Run REVIEW ACCEPTANCE first: it is the only automated check in the method. The
ACCEPTANCE lines inside the brief under review are the implementer's; re-run them to verify the
delivery and record the results in VERIFIED. The embedded brief is a convenience copy: if the
standalone file it names differs, file a FINDING with ORIGIN: BRIEF and review against the committed
file.

You may create new test files to prove a finding, and modify nothing else. If a failing test would
need registering in tests/open_defects.yaml, say so in the report and leave the registration to the
next implementer brief rather than editing that file. Read pre-images with git show <rev>:..., not
the implementation's account of them. Run every mutant on a scratch copy of the tree, and diff each
mutant against git show <rev>:... before trusting its result. Attempt to falsify the brief, not only
the code: a finding that the brief was wrong is a finding, and so is a defect the implementer filed
only as friction. Answer every item under QUESTIONS TO ATTACK. An added review's QUESTIONS TO
ATTACK come only from the implementer's report — never from another review's findings. Enumerate
the shapes you probed that
the existing suite does not build, as a list; zero with a stated reason is legitimate. Report each
guarantee as falsified-with-reproducer or attacked-and-not-falsified with the method.

Commit your own work: your new test files and your report, together, in one commit whose message
ends with the trailer `Actor: REVIEWER`. Append docs/templates/report.txt verbatim, fill it in, and
write it to docs/research/<phase>-<subject>-review.md. If you cannot commit, stop and say so.

# report.txt

REPORT — <phase>-<subject>-<role>
STEP: <implementer brief subject>
REV: <copied from the brief's REV — the step's base, not FINAL's parent>   FINAL: <implementer: sha of your work commit, never the commit that holds this report;
  reviewer: the sha under review, copied from the review brief>
CHANGED: <files, one line each>
VERIFIED: <command, duration, counts>
         Every VERIFIED and ACCEPTANCE claim names the command that actually ran — never a
         substituted interpreter, wrapper, or narrowed form. If the documented form cannot run in
         your environment, record both commands and the documented form's separate check.
NOT VERIFIED: <why, or none>
FINDINGS: none | one block each:
  ID | SEVERITY: P0|P1|P2 | ORIGIN: BRIEF|CODE|DOCUMENT | STATE: fixed|declined|carried
  <root cause, one line>
  FIXED: <node id, command, and the named failing assertion at REV — or "no regression test">
         An error or a collection failure is not red. The assertion has to be the thing that
         failed; a run that merely crashed proves nothing.
  STATE means: fixed (above); declined = not a defect, with the reason; carried = a real defect
  left unfixed, passed on in INHERITED. A defect you will not fix now is carried, never declined.
  An ORIGIN: BRIEF finding is fixed once a later committed brief corrects the text: FIXED: names
  that brief's commit and reads "no regression test". Carried means a future actor has something to
  do with it; at closeout a finding with no possible next action is closed — a defect in an
  already-committed report reads FIXED: recorded in the review that filed it, and an authoring
  lesson from a finished brief goes into record.md's Observations.
SHAPES: <shapes probed that the suite does not build, or none with a reason>
TRIPPED: <copied from check-scope's tripped: line>
PROPOSED ROWS: <ledger rows, or none>
METHOD FRICTION: none | <where you deviated from the method or its templates, misread them, or
  found them silent. A defect in the brief is a FINDING, not friction.>
INHERITED:
<<every INHERITED item you received that is still open, copied verbatim; then each
  finding you marked carried, with its ID>>
Rule 2 governs the planner's copy of this block. What goes in it is yours: an implementer or
reviewer who received an obligation, finding, entry or trigger carries it forward verbatim, and
adds anything new that is still open. A block reading `none` is correct only when nothing came in
and nothing is open. INHERITED never carries residual rows; they are re-selected from the store per
brief.
