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.
