REPORT — phase5-run-entry-fixes-6-implementer
STEP: phase5-run-entry-fixes-6 (Phase 5: the loader face forced whole — F36)
REV: 9bb1d14181e34325820e0dedd3f2d43be1bd317f   FINAL: 8d219057a58df927edef10f91c43a01de1d07342
CHANGED: src/orchestrator/run_entry.py — `load_run_spec`'s parse except tuple is the read+decode+parse face's current inventory: `(yaml.YAMLError, UnicodeDecodeError, RecursionError)` wrapped as `RunSpecError(f"cannot parse run-spec {path!r}: {error}")` raised `from` the cause (the widened tuple is src/orchestrator/run_entry.py:272-273). The `OSError` read refusal is byte-for-byte as it was; `validate_run_spec` and everything downstream are untouched. One line changed.
VERIFIED: scripts/check-tests --fast — 961 passed, 99 deselected, 93.58s, exit 0
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, 28.08s, exit 0 (the absorbed F36 probe and the F37 and F34 pins among them, no test edit)
VERIFIED: scripts/check-static — exit 0 (104 advisory lint rows printed without gating; unchanged from REV's 104, no new row)
VERIFIED: scripts/check-docs — table verification passed, links 364/364 OK, 0 errors, exit 0
VERIFIED: scripts/check-scope 9bb1d14181e34325820e0dedd3f2d43be1bd317f 8d219057a58df927edef10f91c43a01de1d07342 docs/research/phase5-run-entry-fixes-6-brief.md — tripped: none; scope: ok (2 path(s)), exit 0
VERIFIED: Red evidence at REV 9bb1d14 (measured on the pre-fix tree, whose `src/` and `tests/` are byte-identical to REV — `git diff --name-only REV..HEAD -- src tests` empty at measurement) — `.venv/bin/python -m pytest tests/test_phase5_run_entry_fixes_5_review.py -v` → 1 failed, 1 passed, 2.93s. Named failing assertion: the probe's `pytest.fail` translation at tests/test_phase5_run_entry_fixes_5_review.py:31 — `Failed: F36: a deeply-nested spec file is refused as RecursionError, not the documented named `RunSpecError`: RecursionError('maximum recursion depth exceeded')`. Green at FINAL in the 54-passed battery above with no test edit.
VERIFIED: Face-completeness and wrap-honesty hand probes at FINAL (`.venv/bin/python`, `load_run_spec` on written tmp files) — 2000-deep flow nesting (the F36 face), 2000-deep block nesting, over-deep indent → `RunSpecError("cannot parse run-spec …")` raised `from RecursionError`; invalid UTF-8 → raised `from UnicodeDecodeError`; unparseable YAML → raised `from ParserError`; alias-expanded document and a 5MB scalar line parse and land in `validate_run_spec`'s named refusals (no raw escape); `OSError` read family unchanged — missing path → `RunSpecError("cannot read run-spec …")` from `FileNotFoundError`, directory → from `IsADirectoryError`, symlink loop → from `OSError`; every message names the path and every wrap chains `__cause__`; the refusal opens no store (the tmp dir holds only the bad spec). Hand measurement, named in SHAPES — not a test.
NOT VERIFIED: the full unfiltered `scripts/check-tests` — per the brief, a full run is never put in ACCEPTANCE and the reviewer runs it. None otherwise.
FINDINGS:
  F36 | SEVERITY: P2 | ORIGIN: CODE | STATE: fixed
  `yaml.safe_load` overflows the parser's recursion on a deeply-nested document (2000+ nested flow sequences) and raises `RecursionError`, which the delivered `(yaml.YAMLError, UnicodeDecodeError)` tuple at `load_run_spec` did not catch — the raw class escaped and falsified `RunSpecError`'s "one named failure, never a run-time surprise" (pre-existing since `dae836f`).
  FIXED: tests/test_phase5_run_entry_fixes_5_review.py::test_review_f36_deeply_nested_spec_refused_as_a_named_run_spec_error — at REV the named assertion failed at tests/test_phase5_run_entry_fixes_5_review.py:31: `Failed: F36: a deeply-nested spec file is refused as RecursionError, not the documented named `RunSpecError`: RecursionError('maximum recursion depth exceeded')` (`.venv/bin/python -m pytest tests/test_phase5_run_entry_fixes_5_review.py -v`, 1 failed, 1 passed). Green at FINAL with no test edit; the delivered line numbers are src/orchestrator/run_entry.py:272-273 (the widened except tuple inside the unchanged clause pair at :270-273).
SHAPES: the `OSError` read family — hand-probed at FINAL (missing path → `RunSpecError("cannot read run-spec …")` from `FileNotFoundError`, directory → from `IsADirectoryError`, symlink loop → from `OSError`), unchanged behaviour kept as-is, no pin owed (the fixes-5 review's disclosure stands); the committed suite does not build it (no test drives the read-refusal face). The parse-depth `RecursionError` class is the absorbed probe's built face (the F36 probe is its pin; the over-deep-indent and 2000-deep block-nesting inputs reduce to the same class and the same wrap); the `UnicodeDecodeError` and `ParserError` classes are the F37 and F34 pins' built faces. The alias-expanded and over-long-line hostile inputs parse and land in `validate_run_spec`'s named refusals — a face `tests/test_run_entry.py` builds. The Clause-restate shape is not a probe I built: its faces are the already-committed pins `tests/test_phase5_run_entry_fixes_4_review.py::test_review_f33_residual_crafted_terminal_owned_artefact_retained`, `tests/test_run_entry.py::test_stale_admission_race_log_replays`'s unknown-id assertion, and `tests/test_phase5_run_entry_fixes_4_review.py::test_review_f33_owner_payload_branch_is_admission_inaccessible`, all green in the 54-passed battery; no code or text on that surface changed.
TRIPPED: none
PROPOSED ROWS: none
METHOD FRICTION: none
INHERITED:
none — the received INHERITED carried exactly one open item, F36 (the fixes-5 review's carried P2, moved into this brief's body). It is fixed in this step (FINDINGS, F36); nothing is carried forward and nothing new is left open.
