REPORT — phase5-run-entry-fixes-8-implementer
STEP: phase5-run-entry-fixes-8 (Phase 5: kernel_id refused at load — FRK-1; FFR-1–FFR-3 close by text)
REV: b68be80aa9762eb964bd27190331617e404014ae   FINAL: ca9a25a82aa562692ff4302275970fc52658c43c
CHANGED: src/orchestrator/run_entry.py — `validate_run_spec` refuses a present-but-wrong-typed `project_kernel.kernel_id` as a named `RunSpecError` naming the value (six lines after the existing `project_kernel` checks); every other function — including `run_configuration` and its `str()`-coercion, byte-identical to REV per the diff — and both docstrings are untouched.
CHANGED: tests/test_run_entry_kernel_id_refusal.py — new module: `kernel_id load refusal` (the wrong-typed matrix — dict, list, int, bool, explicit null, empty, whitespace-only — through `validate_run_spec` in loop form, plus one file-backed `load_run_spec` drive whose refusal leaves no store file in the tmp dir) and `kernel_id fallback` (a spec with no `kernel_id` key validates clean and `run_configuration` against a stub target admits it with `kernel_id` equal to the snapshot id), both slow-marked.
VERIFIED: scripts/check-tests --fast — 963 passed, 106 deselected in 76.45s (0:01:16), exit 0 (passed unchanged from REV's 963; deselected grew from 104 by this module's two cases).
VERIFIED: .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 — 7 passed in 6.25s, exit 0 (2 new cases + 2 envelope cases + 3 probes).
VERIFIED: .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 — 54 passed in 23.53s, exit 0 (the loader's whole committed battery, no regression).
VERIFIED: .venv/bin/python -m pytest tests/test_phase3_project_oracle.py — 5 passed in 289.84s (0:04:49), exit 0.
VERIFIED: scripts/check-static — exit 0. Gated `ruff check --select BLE001,S110 src/orchestrator` prints "All checks passed!"; the advisory line prints "Found 104 errors." (unchanged from REV's 104).
VERIFIED: scripts/check-docs — exit 0. Prints "371 Total (in 919ms) 172 Unique 371 OK 0 Errors".
VERIFIED: scripts/check-scope b68be80aa9762eb964bd27190331617e404014ae ca9a25a82aa562692ff4302275970fc52658c43c docs/research/phase5-run-entry-fixes-8-brief.md — exit 0. Prints `claimed: src/orchestrator/run_entry.py tests/test_run_entry_kernel_id_refusal.py`, `tripped: none`, `scope: ok (3 path(s) in b68be80aa9762eb964bd27190331617e404014ae..ca9a25a82aa562692ff4302275970fc52658c43c)`.
NOT VERIFIED: the full `scripts/check-tests` (no `--fast`): the brief's standing rule assigns the full run to the reviewer and the implementer does not re-run it.
FINDINGS:
  FRK-1 | SEVERITY: P1 | ORIGIN: CODE | STATE: fixed
  `validate_run_spec` checked only that `project_kernel` is a non-empty mapping, so a present-but-wrong-typed `kernel_id` (dict, list, int, bool, explicit null, empty, whitespace-only) passed validation and was `str()`-coerced in `run_configuration` into the admitted contract (a mapping admitted as `kernel_id="{'a': 1}"`, which the admin schema's `_non_empty_str` accepts) — a configuration the controller's schema intent would reject, admitted at load.
  FIXED: tests/test_run_entry_kernel_id_refusal.py::test_kernel_id_load_refusal — at REV `.venv/bin/python -m pytest tests/test_run_entry_kernel_id_refusal.py -v` failed at tests/test_run_entry_kernel_id_refusal.py:86 with `Failed: FRK-1: a dict kernel_id was admitted by validate_run_spec` (1 failed, 1 passed in 0.23s; the working tree's `src/orchestrator/run_entry.py` was REV-identical — `git diff b68be80aa9762eb964bd27190331617e404014ae HEAD -- src/orchestrator/run_entry.py` was empty before the edit); at FINAL the same command is green (2 passed) with the fix alone. The brief's live-bug reproducer (`PYTHONPATH=src .venv/bin/python -c "…validate_run_spec(document)['project_kernel']…"` with `kernel_id={'a': 1}`) printed `{'kernel_id': {'a': 1}}` at REV and at FINAL raises `RunSpecError: project_kernel.kernel_id must be a non-empty string is invalid: {'a': 1}` — the refusal names the value and precedes any store open.
  FFR-1 | SEVERITY: P1 | ORIGIN: BRIEF | STATE: fixed
  The fixes-7 brief's backticked `IN SCOPE:` line defeated `scripts/check-scope`'s awk extractor, which did not strip backticks, so the claimed patterns matched no path and the gate exited 1 naming both intended files "not in IN SCOPE".
  FIXED: no regression test — a committed brief's prose has none; the correcting text is this brief's own `IN SCOPE:` line (plain un-backticked comma-separated paths), fixed by this brief's commit `12738ff27ef8a03b34cdb85e8d5742d144b054a1` (`git rev-parse HEAD` at dispatch, cross-checked with `git log -1 --format=%H -- docs/research/phase5-run-entry-fixes-8-brief.md`); `scripts/check-scope` is green on the committed brief (VERIFIED above).
  FFR-2 | SEVERITY: P2 | ORIGIN: BRIEF | STATE: fixed
  The fixes-7 brief's ACCEPTANCE sentence predicted the docs gate's total (361) as expected-to-hold; the count drifts as `docs/research/` grows, so the prediction went stale (363 at that step's FINAL).
  FIXED: no regression test — a count figure in a committed brief's prose has none; the correcting text is this brief, which carries no predicted docs total anywhere (ACCEPTANCE names exit 0 with 0 errors and every figure is recorded from the gate's own printed line), fixed by this brief's commit `12738ff27ef8a03b34cdb85e8d5742d144b054a1`.
  FFR-3 | SEVERITY: P2 | ORIGIN: BRIEF | STATE: fixed
  The fixes-7 review brief's mutant-(d) prediction (drop `{path!r}` from the format string: the read-refusal pin reds) was falsified as written — on a scratch copy with the prefix dropped the committed pin passed, because each `OSError`'s own text embeds the tmp path.
  FIXED: no regression test — a mutant prediction in a committed review brief's prose has none; the correction is omission per R11: this brief restates no mutant prediction about the message prefix anywhere, fixed by this brief's commit `12738ff27ef8a03b34cdb85e8d5742d144b054a1`.
SHAPES: none — every shape the brief names has a test. The wrong-typed matrix (dict, list, int, bool, explicit null, empty string, whitespace-only) through `validate_run_spec` and the file-backed `load_run_spec` refusal with the store absent from the tmp dir are `test_kernel_id_load_refusal`'s loop and drive; the missing-key fallback through `run_configuration` against a stub target (the eight read fields, no git repository) is `test_kernel_id_fallback`. Maintained unchanged and green in the battery lines: the envelope property (`Loader-refusal envelope`), the `Read-refusal pin`, and the absorbed typed-scalar probes (F38/F39/F40) — the fix touches only the validation stage, which the envelope explicitly does not enclose, so the property's either/or is undisturbed (a refused document is its refusal arm).
TRIPPED: none
PROPOSED ROWS: none
METHOD FRICTION: none
INHERITED:
none — the received INHERITED carried exactly four open items (FRK-1, FFR-1, FFR-2, FFR-3, moved into this brief's body). All four are disposed by this step: FRK-1 is fixed by this step's work (FINDINGS, FRK-1), and FFR-1, FFR-2, FFR-3 close by this brief's own text under rule 8 (FINDINGS). Nothing is carried forward and nothing new is left open.
