REVIEW BRIEF — phase5-exit-gate (Phase 5: claim the exit gate — the loop's exit is the gate)
REV: 21d891aaa6d572adcfcb24fd6f762b6b0485040a
FINAL: b6bc9f3a6de41df4ffed0ef6b10110ff0d3c5ceb
REVIEW ACCEPTANCE: scripts/check-scope 21d891aaa6d572adcfcb24fd6f762b6b0485040a b6bc9f3a6de41df4ffed0ef6b10110ff0d3c5ceb docs/research/phase5-exit-gate-brief.md
FOCUS: the gate claim above all — are the four externally drivable classes re-driven live at FINAL through the documented `python3` heads against a real frozen repository (each a settled terminal outcome, the documented JSON and exit codes, no traceback, document == durable fresh outcome), the validation-stage face with the store absent, and the `ProtocolViolation` class carried by its committed pin named (not rebuilt); is F1's one-reading marker flip the one consistent reading; is `run_entry.py` byte-identical to `ca9a25a` with every battery module green and no test edit; is the `IN SCOPE` line plain with scope green; are the docs figures the gate's own printed lines (rule 14); and does the status edit claim only the gate (goal, exit gate, other phases untouched).
SEVERITY SCALE: P0 blocks the step; P1 is serious; P2 is minor.
QUESTIONS TO ATTACK:

  F1 | SEVERITY: P2 | ORIGIN: BRIEF | STATE: fixed
  The brief's OUT OF SCOPE parenthetical names only the exit-gate sentence replacement and the ten-round sentence standing, and does not name the status marker; keeping "Status: **in progress.**" beside "The exit gate is claimed" would be self-contradictory and would not record the claim the GOAL requires.
  FIXED: no regression test — a committed brief's prose has none; the reading taken is the one consistent with the brief's GOAL ("the Phase 5 status records the claim"): a claimed exit gate is a delivered phase (the Phases 1/2/3 convention), so the status marker flips from "in progress" to "delivered" as the claim's necessary companion, in the same work commit as the exit-gate sentence replacement. No brief text correction is needed because no other reading keeps the GOAL's sentence true. Named 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").

  1. The gate claim live at FINAL — the one question. Re-drive the four externally drivable classes as subprocesses through the documented `python3 scripts/orchestrate.py` heads (`docs/run-entry.md`'s Commands section) against a real frozen repository (created via `git init`/`add`/`commit`, one derivable component): (a) accept — `start` exits 0, JSON `accepted: true`, `outcome: ACCEPTANCE_CLAIMED`, no traceback, and the document's outcome equals a fresh connection's `replay_fresh` outcome; (b) failing-command refusal — exit 1, `accepted: false`, `outcome: INFEASIBLE`, no traceback, document == durable fresh outcome, and `stop` on the settled run exits 0 with the outcome un-re-written; (c) wall-clock timeout (`limits.wall_clock_seconds: 1`, a sleeping command) — exit 1, `INFEASIBLE`, no traceback, document == durable fresh outcome; (d) mid-run cancel — the second process's documented `stop` head exits 0 and the launcher exits 1 with `accepted: false`, `outcome: CANCELLED`, the document equal to the durable fresh replay; `inspect` reads clean in every case. Then the validation-stage face: a wrong-typed spec (a dict `project_kernel.kernel_id`) through the documented `start` head refuses at load with the store file ABSENT (not merely zero events). Report each guarantee as falsified-with-reproducer or attacked-and-not-falsified with the method. Then the carried class: `test_protocol_violation_refusal_shape` exists, is green in the battery line, and is an executor-seam monkeypatch — adjudicate the "named not rebuilt" carry as honest (a reviewer fixes nothing; external re-drive would need an `IN SCOPE` edit). File a finding per falsified class.

  2. F1's one-reading claim. The brief's OUT OF SCOPE names only the exit-gate sentence replacement and the ten-round sentence standing, never the status marker; the GOAL requires "the Phase 5 status records the claim". Verify the Phases 1/2/3 status convention (`grep -n "Status:" docs/self-host.md` — a claimed exit gate reads "delivered"), and verify `git diff 21d891aaa6d572adcfcb24fd6f762b6b0485040a b6bc9f3a6de41df4ffed0ef6b10110ff0d3c5ceb -- docs/self-host.md` touches only the Phase 5 status paragraph (goal, exit-gate definition, Phase 6/7/8 sections, every other phase's status byte-identical). Is the marker flip exactly the one reading consistent with the rest of the brief, and does the status edit otherwise claim only the gate? If a second consistent reading exists, the finding is not one-reading and the step returns to planning. Also adjudicate F1's `STATE: fixed` against rule 5's expectations for a brief defect with no later brief to correct it: is "the reading taken is named in this finding" an available close, or does a finding with no possible next action close only at closeout as `fixed: recorded in` the review that filed it?

  3. The untouched seam and the report's forms and counts (J-class). `git diff ca9a25a82aa562692ff4302275970fc52658c43c b6bc9f3a6de41df4ffed0ef6b10110ff0d3c5ceb -- src/orchestrator/run_entry.py` is empty (the seam byte-identical) and `git diff 21d891aaa6d572adcfcb24fd6f762b6b0485040a b6bc9f3a6de41df4ffed0ef6b10110ff0d3c5ceb -- tests/` is empty (no test edit) — verify both rather than taking the report's word. Re-run the brief's ACCEPTANCE lines at FINAL (fast suite 963/106, the 7-passed kernel-id line, the 54-passed battery, static gated `BLE001,S110` clean with advisory `Found 104 errors.` unchanged, docs printed line with 0 errors — every figure the gate's own printed line, rule 14, never the REV line quoted in CONTEXT); `FINAL` is the work commit `b6bc9f3a6de41df4ffed0ef6b10110ff0d3c5ceb`, never the report commit `a4d0dc8`; `TRIPPED: none` matches check-scope's `tripped:` line and REVIEW ACCEPTANCE is green run first. `SHAPES: none` read against rule 7: every re-driven face names its pin in the battery — adjudicate whether the subprocess re-drive itself or the "document == durable fresh replay" check is an unbuilt shape (verify the report's `_run_cli`/`_make_repo` sameness claim against `tests/test_run_entry.py` rather than taking its word). `INHERITED`'s `none` against the received set (the fixes-9 review's clean block; F1 fixed-not-carried). Every field of the report present and filled, nothing outside the template added. Standing battery: `scripts/check-tests` (your full run — record it in `VERIFIED`).

--- BEGIN BRIEF UNDER REVIEW (copy of docs/research/phase5-exit-gate-brief.md; the committed file is authoritative) ---
IMPLEMENTER BRIEF — phase5-exit-gate (Phase 5: claim the exit gate — the loop's exit is the gate)

GOAL: The Phase 5 exit gate is claimed — an operator can start, observe, and stop a run on an arbitrary
repository without importing the experiment harness — and `docs/self-host.md`'s Phase 5 status records the
claim. This is the loop's exit: `docs/self-host.md:164`'s own sentence ("The exit gate is not yet claimed")
is what this step turns. No code change: the seam is delivered (`run_entry.py` byte-identical to `ca9a25a`),
the pin battery is green as maintained, and the gate's five operator classes were last re-verified live at
fixes-6 against a real frozen repository. The evidence is re-driven at FINAL through the documented heads and
recorded in the report; what changes is the claim and its status line.

CONTEXT: Ten recorded rounds closed out (`docs/record.md`'s fixes-9 row at REV `49e9840…`, Fixed 2 / Red 0 /
Carried 0 / Declined 0 / Reviews 1). The loader chain ends: F26–FRK-1/FFR-1–FFR-4/F43 disposed, R11 consumed,
`INHERITED: none` in the fixes-9 review. The gates at REV `21d891a` (this step's base): `scripts/check-tests
--fast` prints `963 passed, 106 deselected in 69.67s (0:01:09)`; `scripts/check-docs` prints `376 Total (in
190ms) 174 Unique 376 OK 0 Errors`; `scripts/check-static` exits 0 with the advisory line `Found 104 errors.`;
the loader battery prints `7 passed` (2 kernel-id cases + 2 envelope cases + 3 probes) and `54 passed` (the
four earlier modules). The five operator classes and their pins: (a) accept — `ACCEPTANCE_CLAIMED`,
`test_start_shape_authorises_acceptance` / `test_settled_start_shape_relative_workdir`; (b) failing-command
refusal — `INFEASIBLE`, `test_start_shape_records_a_refusal_without_authorising`; (c) wall-clock timeout —
`INFEASIBLE`, `test_settled_start_shape_wall_clock_overrun`; (d) mid-run cancel — `CANCELLED`,
`test_cancelled_launcher_shape` / `test_cancel_race_class_shape` / `test_cancel_race_shape_stop_after_observation` /
`test_stale_admission_race_log_replays`; (e) injected-`ProtocolViolation` — `INFEASIBLE`,
`test_protocol_violation_refusal_shape` (the injection is an executor-seam monkeypatch; external re-drive would
need an `IN SCOPE` edit and the committed pin carries the class). The validation-stage face the later fixes
touched rides as the gate's input face: a wrong-typed spec through the documented `start` head refuses at load
with the store absent (re-driven as a runner in both the fixes-8 and fixes-9 reviews). No `docs/residuals.md`
trigger glob matches this brief's IN SCOPE (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).

INHERITED:

none — the received INHERITED is the fixes-9 review's clean block (nothing carried, FFR-4/`DIVERGENCES CLOSED:
document amended (b68be80…)` closed at the fixes-9 closeout). Nothing is open; nothing is carried forward.

IN SCOPE: docs/self-host.md

RESIDUALS:

none — rule 3 selection for this brief's `IN SCOPE`: no `docs/residuals.md` trigger glob matches
`docs/self-host.md` (see CONTEXT). 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/phase5-exit-gate-brief.md`). A committed brief is never modified; a re-cut is a new file.
- `docs/self-host.md` beyond the Phase 5 status paragraph: only the status lines change (the gate claim — the
  exit gate sentence is replaced by the claim with its evidence — and the ten-round delivery sentence stands).
  The Phase 5 goal, exit gate, Phase 6/7/8 sections, and every other phase's status are untouched. If the status
  needs any other change, stop and report `IN SCOPE` as insufficient.
- `src/orchestrator/run_entry.py` in full: the seam is delivered (byte-identical to FINAL `ca9a25a` — diff it).
  No code is written, read-for-edit, or re-derived here. If acceptance needs a code change, stop and report
  `IN SCOPE` as insufficient.
- Every committed test module — `tests/test_run_entry.py`, `tests/test_run_entry_kernel_id_refusal.py`,
  `tests/test_run_entry_loader_envelope.py`, `tests/test_phase5_run_entry_fixes_6_review.py`,
  `tests/test_phase5_run_entry_fixes_5_review.py`, `tests/test_phase5_run_entry_fixes_4_review.py`, and
  `tests/test_phase5_run_entry_fixes_2_review.py` are read-only here. No test file is created or 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 (no ORIGIN: CODE finding is
  opened or closed here; the gate is a claim, not a fix).
- Every other document: 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/method.md` or `docs/templates/` edit.
- The controller stack, the store, the experiment harness, `scripts/orchestrate.py`, `experiment_target.build_target`, `schemas.py`.
- 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.
- Name no test `test_bug_*` (the open-defect registry would then own it).

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_kernel_id_refusal.py tests/test_run_entry_loader_envelope.py tests/test_phase5_run_entry_fixes_6_review.py
    .venv/bin/python -m pytest tests/test_phase5_run_entry_fixes_5_review.py tests/test_phase5_run_entry_fixes_4_review.py tests/test_run_entry.py tests/test_phase5_run_entry_fixes_2_review.py
    scripts/check-static
    scripts/check-docs
    scripts/check-scope 21d891aaa6d572adcfcb24fd6f762b6b0485040a <FINAL> docs/research/phase5-exit-gate-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). The kernel-id module shares a line with the envelope
module and the three absorbed probes — expected at FINAL: 7 passed (2 kernel-id cases + 2 envelope cases + 3
probes), exit 0. The four earlier modules are the loader's whole committed battery and must not regress (54
passed). The fast suite's expected shape: 963 passed, 106 deselected (the kernel-id module's two cases ride
slow). 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 F41 class). 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 (F4's lesson).

The gate claim (re-drive at FINAL; record each guarantee as attacked-and-not-falsified with the method):
- The five operator classes as subprocesses against a real frozen repository (each created via `git
  init`/`add`/`commit`, one derivable component) through the documented heads (`docs/run-entry.md`'s Commands
  section — the `python3` forms): (a) accept: `start` exits 0, JSON `accepted: true`, `outcome:
  ACCEPTANCE_CLAIMED`, no traceback, and the document's outcome equals a fresh connection's `replay_fresh`
  outcome; (b) failing-command refusal: exit 1, `accepted: false`, `outcome: INFEASIBLE`, no traceback, document
  == durable fresh outcome, `stop` on the settled run exits 0 with the outcome un-re-written; (c) wall-clock
  timeout (`limits.wall_clock_seconds: 1`, `sleep`ing command): exit 1, `INFEASIBLE`, no traceback, document ==
  durable fresh outcome; (d) mid-run cancel: the second process's documented `stop` head exits 0, the launcher
  exits 1 with `accepted: false`, `outcome: CANCELLED` — the document equals the durable fresh replay; (e) the
  validation-stage face: a wrong-typed spec through the documented `start` head refuses at load with the store
  absent (the fixes-8/9 runner). The injected-`ProtocolViolation` class rides on the committed pin
  (`test_protocol_violation_refusal_shape`, green in the battery line) — it is an executor-seam monkeypatch, so
  external re-drive would need an `IN SCOPE` edit; name the pin and do not rebuild it. `inspect` reads clean in
  every externally drivable case. `run_entry.py` byte-identical to `ca9a25a` (diff it); no test edit.

Maintained unchanged (no new test owed; green in the battery lines): the `kernel_id load refusal` pin, the
`kernel_id fallback` pin, the envelope property (`Loader-refusal envelope`), the `Read-refusal pin`, and the
absorbed typed-scalar probes (F38/F39/F40) — all green at `FINAL`, none edited; no code is touched, so every
surface is undisturbed.

REV: 21d891aaa6d572adcfcb24fd6f762b6b0485040a
CLOSE OUT: yes
DIVERGENCES: none
REVIEW: one session — the gate claim above all: are the four externally drivable classes re-driven live at FINAL
through the documented `python3` heads against a real frozen repository (each a settled terminal outcome, the
documented JSON and exit codes, no traceback, document == durable fresh outcome), the validation-stage face
with the store absent, and the `ProtocolViolation` class carried by its committed pin named (not rebuilt); is
`run_entry.py` byte-identical to `ca9a25a` with every battery module green and no test edit; is the `IN SCOPE`
line plain with scope green; are the docs figures the gate's own printed lines (rule 14); and does the status
edit claim only the gate (goal, exit gate, other phases untouched). Whether anything remains open after this
step 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. 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.
--- END BRIEF UNDER REVIEW ---

You did not write this code and you will not fix it; a finding is output, not an action. The step's
decision is the planner's (cycle step 5): report findings, never decisions. 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 method's only gated check. The ACCEPTANCE lines inside the brief
under review are the implementer's; re-run them to verify the delivery, and run `scripts/check-tests`
as your standing battery — the full suite is your falsification ground — recording both 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; the registry owns test_bug_* pins only, and a
test_review_* probe rides red until absorbed. 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. Answers live in the form's fields —
a finding in FINDINGS, a measurement in VERIFIED/SHAPES. 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.
