REPORT — phase5-run-entry-fixes-6-review
STEP: phase5-run-entry-fixes-6 (Phase 5: the loader face forced whole — F36)
REV: 9bb1d14181e34325820e0dedd3f2d43be1bd317f   FINAL: 8d219057a58df927edef10f91c43a01de1d07342
CHANGED: tests/test_phase5_run_entry_fixes_6_review.py — three review probes for the findings below (F38, F39, F40), red at FINAL in the F36 translation form (named, message-full, the raw class that escaped) and riding red-until-absorbed like F27's, F28's, F34's, F36's, and F37's probes before them; no `tests/open_defects.yaml` registration is owed (they are `test_review_*`; the registry's meta-test stays green), which also settles the fixes-5 review's falsified "needs registering" note by the same ground as the brief's CONTEXT note 1. This report.
VERIFIED: REVIEW ACCEPTANCE first — `scripts/check-scope 9bb1d14181e34325820e0dedd3f2d43be1bd317f 8d219057a58df927edef10f91c43a01de1d07342 docs/research/phase5-run-entry-fixes-6-brief.md` → `tripped: none`, `scope: ok (2 path(s) in 9bb1d14…8d21905)`, exit 0, re-run twice (real 0m0.533s).
VERIFIED: `scripts/check-tests` (the standing battery, my own full run) at the reviewed tree whose `src` and `tests` are byte-identical to FINAL (`git diff 8d21905..HEAD -- src tests` empty) — **1060 passed, 0 failed, 473.42s (0:07:53), exit 0**: the fixes-5 review's red F36 probe is absorbed green, and 1060 = the fixes-5 tree's 1059 passed + 1 (that probe). A second full run with this review's own probes in tree (the tree that this review commits) names the probes as its only failures — see the next line.
VERIFIED: `scripts/check-tests` with `tests/test_phase5_run_entry_fixes_6_review.py` in tree — 3 failed (exactly this review's three probes, the carried findings below), 1060 passed, 658.29s (0:10:58), pytest's exit nonzero by construction on failure; the probes are the only failures: `test_phase5_run_entry_fixes_6_review.py FFF` collected beside every green module, and the three tracebacks land the mechanism to the constructor line (`constructor.py:263` the `!!int` conversion's `int(value)`, `:325` the `!!timestamp` regex's `match.groupdict()` over `None`, `:235` the `!!bool` `self.bool_values[value.lower()]` — none of them `yaml.YAMLError`). Every pre-existing node stayed green.
VERIFIED: `scripts/check-tests --fast` — 961 passed, 99 deselected, 104.04s, exit 0. The 99 slow nodes accounted: 40 test_run_entry + 12 test_planning_pilot_routing + 7 test_phase5_run_entry_fixes_2_review + 7 test_milestone6_acceptance + 5 test_phase5_run_entry_fixes_4_review + 5 test_phase3_project_oracle + 4 test_ledger_fuzzer + 4 test_crash_matrix + 4 test_axis2_robustness + 3 test_review_depth_walk + 3 test_milestone7_acceptance + 2 test_phase5_run_entry_fixes_5_review (the F36 probe and F37 pin) + 1 test_spend_multi_writer + 1 test_phase0_defects + 1 test_grade_cache = 99.
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 -v` — 54 passed, 28.73s, exit 0; the four modules' collected counts re-measured as `--collect-only`: 2 + 5 + 40 + 7 (fixes_5_review: the F36 probe + the F37 pin; fixes_4_review: 5 test functions; test_run_entry: 25 test functions + 15 parametrised instances = 40; fixes_2_review: 7 test functions). The F36 probe, the F37 pin, the F34 probe, and all the F33/F27/F28/F30 pins are among them.
VERIFIED: `scripts/check-static` — exit 0; gated BLE001/S110 clean; advisory `Found 104 errors.` at FINAL, and the B,SIM row set byte-identical to REV's (both trees re-run from scratch copies, the rows diffed with line numbers normalised: empty diff); 5 B904 rows at both REV and FINAL; the widened raise introduces no new B904 and no row for `src/orchestrator/run_entry.py` at all (no row in the output mentions run_entry).
VERIFIED: `scripts/check-docs` on scratch copies of both commits — at the FINAL tree: `🔍 366 Total … ✅ 366 OK, 0 Errors`, exit 0; at the REV tree: `🔍 366 Total … ✅ 366 OK, 0 Errors`, exit 0 (offline variant at FINAL: 363 OK + 3 Excluded remote, exit 0; a `lychee --dump` cross-check shows the range's only added local request is the brief's single `../record.md` link). The report's figure "364/364" matches no run reproducible from the committed content — F41 below.
VERIFIED: Work diff — `git diff 9bb1d14 8d21905 -- src/orchestrator/run_entry.py tests/` is exactly the one delivered line (line 272's parse-except tuple gains `RecursionError`); the `OSError` clause pair at 270-271, its message string, the `from error`, `validate_run_spec`, both docstrings, and every module sentence are byte-for-byte as at REV; `tests/` is empty (no test edit), and `git diff --stat` shows only run_entry.py and the brief file in the range.
VERIFIED: Red re-measure at REV on a scratch copy diff-verified byte-identical to `git show 9bb1d14:…` for `src/orchestrator/run_entry.py`, the probe module, and `pytest.ini` — `.venv/bin/python -m pytest tests/test_phase5_run_entry_fixes_5_review.py -v` → 1 failed, 1 passed, 4.26s, the probe's `pytest.fail` translation at tests/test_phase5_run_entry_fixes_5_review.py:31 named exactly as the report says: `Failed: F36: a deeply-nested spec file is refused as RecursionError, not the documented named \`RunSpecError\`: RecursionError('maximum recursion depth exceeded')`. The F37 pin is the 1 passed beside it. Green at FINAL in both full runs above with no test edit — the red→green pair holds.
VERIFIED: Mutants, each on a scratch copy diff-verified against `git show 8d21905:src/orchestrator/run_entry.py` before use (only the mutant's lines differ) — (a) drop `RecursionError` from the tuple: the F36 probe goes red with its named translation, the F37 pin stays green; (b) drop `UnicodeDecodeError`: the F37 pin goes red with its named translation (`Failed: F37: an invalid-UTF-8 spec file is refused as UnicodeDecodeError, not the documented named \`RunSpecError\`: UnicodeDecodeError('utf-8', b'run_id: \xff\xfe\n', 8, 9, 'invalid start byte')`), the F36 probe stays green; (c) revert the parse clause to `OSError`-only: the F36 and F37 probes and the fixes-4 F34 probe all go red with their named translations while every F33 face (`test_review_f33_breadth…`, `test_review_f33_owner_payload_branch_is_admission_inaccessible`, `test_review_f33_residual_crafted_terminal_owned_artefact_retained`) stays green. Each tuple entry is pinned by a probe that answers it, and each entry's probe fails when the entry is removed.
VERIFIED: The fixes-5 review's malformed-class corpus re-driven at `load_run_spec` on written tmp files at FINAL (`.venv/bin/python`, hand probed, one run) — the fixes-5 review's banner calls the corpus nineteen classes while its own corpus line names seventeen; both counts are reconciled below (F42). Every one of the seventeen classes that corpus line names refuses as a named `RunSpecError` at FINAL: unparseable YAML (cause `ParserError`), tab-scanned indent (`ScannerError`), NUL byte (`ReaderError`), invalid UTF-8 (`UnicodeDecodeError`), truncated multi-byte (`UnicodeDecodeError`), truncated UTF-8 tail (`UnicodeDecodeError`), UTF-16 BOM (`UnicodeDecodeError`), empty file, wrong top-level type (sequence and scalar both), missing keys, alias-cyclic, billion-laughs-shaped bomb, cyclic root alias (both self-referential shapes — `&x [*x]` and `{b: *a}`), directory (`IsADirectoryError`), symlink loop (`OSError`), missing path (`FileNotFoundError`), and the corpus's one escape class (deeply-nested flow — named at FINAL, its probe green). The `__cause__` chain is the real cause, never `None`, for every decode/parse face (ParserError/ScannerError/ReaderError/UnicodeDecodeError/RecursionError); every wrapped message names the path (`cannot parse run-spec '<abs path>': …` / `cannot read run-spec '<abs path>': …`); and the validate-landed shapes this corpus adds (duplicate keys, boolean key, null top level) refuse with `__cause__ is None` — `validate_run_spec`'s own direct refusals, not wraps.
VERIFIED: The corpus's new classes at `load_run_spec` at FINAL — 2000-deep block nesting → named `RunSpecError` from `RecursionError`; 900-level over-deep indent → named, from `RecursionError`; a 5MB single-line scalar → parses and lands in `validate_run_spec`'s named refusal; a well-formed 5MB bulk document (400k distinct keys, ~5MB) loads under this host's normal memory (no raw escape, refusal shape quiet); a multi-document stream → named, from `ComposerError`; an unhashable mapping key → named, from `ConstructorError`; invalid `!!binary` padding → named, from `ConstructorError`; a `!!python/object` tag → named, from `ConstructorError`; a merge-from-null key (`<<: *m` over a null anchor) → named, from `ConstructorError`. The raw classes: `!!int 'garbage'`/`!!float 'garbage'` → raw `ValueError`; `!!timestamp 'nope'` → raw `AttributeError`; `!!timestamp '2020-13-45T99:99:99Z'` → raw `ValueError`; `!!bool 'garbage'` → raw `KeyError` — four raw escape shapes inside the parse face (F38, F39, F40), each re-driven through the documented `python3 scripts/orchestrate.py start …` head: exit 1, terminal stderr line the raw class's traceback (`ValueError: could not convert string to float: 'garbage'` … `KeyError: 'garbage'`), store ABSENT.
VERIFIED: The CLI heads over the whole corpus (`python3 scripts/orchestrate.py start/inspect/stop …` as written, subprocess with a clean env) — for every class the delivered tuple covers: `start` exits 1 with the named refusal as the terminal exception (`orchestrator.run_entry.RunSpecError: cannot parse run-spec '<path>': …` or `… cannot read run-spec '<path>': …` with the cause chain shown above it), empty stdout, and the store file ABSENT (not merely zero events — `EventStore(args.store)` is never constructed, orchestrate.py:69 raising before :75); `inspect --run-id RUN-DEMO` exits 0 with clean JSON (null fields) and no traceback; `stop --run-id RUN-DEMO` exits 1 with `orchestrator.run_entry.RunSpecError: run 'RUN-DEMO' has no root node to cancel` — the same forms the fixes-5 review recorded. A surrogate-escaped path (invalid-UTF-8 byte in argv, the operator-deliverable mangled-path class) refuses as the named `cannot read run-spec …` from `FileNotFoundError`.
VERIFIED: The MemoryError-shaped class (this host permits one) — a bulk well-formed document (400k distinct keys, ~5MB) loaded under `RLIMIT_AS` set to a measured address-space floor (the child's own VmPeak after imports, 34348kB, plus 30MB) raises `MemoryError` inside `yaml.safe_load`; the exception escapes `load_run_spec` raw (not in the tuple) and through the documented head under `ulimit -v 64000`: exit 1, terminal stderr line `MemoryError`, store ABSENT. The control run in the same child without the limit shows the same document resolving to a named `validate_run_spec` refusal — the document is well-formed and the failure is the host's. The declared boundary is evidenced in the sentence's words: the claim's subject is "a loader-refusable **malformed** spec" (docs/run-entry.md:12) — malformedness is a property of the document's form, and this document's form is not the failure; "loader-refusable" qualifies the loader's own refusal decision about the document, and under resource exhaustion the loader forms no view of it at all (the host halts it first). The same reading is the one the work commit declares. The fail-closed halves hold for the class; only the claim's "named RunSpecError" half does not apply to it. Not a narrowing finding; recorded as a shape below.
VERIFIED: The five operator classes of the Phase 5 exit gate as subprocesses against a real frozen repository (each created via `git init`/`add`/`commit`, one derivable component) through the documented heads — (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 (every non-accepted class is non-zero), `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 — with the no-traceback half asserted by the committed cancel pins (green in both full runs); (e) the injected-`ProtocolViolation` class: `tests/test_run_entry.py::test_protocol_violation_refusal_shape` PASSED at the reviewed tree (1 passed, 0.59s) — the injection is an executor-seam monkeypatch, so external re-drive would need an `IN SCOPE` edit and the committed pin carries the class. All four externally drivable classes: attacked-and-not-falsified; the class's guarantees hold live. `inspect` reads clean in every case.
VERIFIED: The held sets of the whole run-entry stream — the load and refusal shapes (`test_run_spec_load_shape`), the settle-claim interleave pins (`test_settle_claim_shape_stale_outcome_read`, `…fresh_outcome_read`, `…double_stop_after_settled_timeout`), the import matrix (`test_no_harness_import_shape` + the five spelling instances), `test_clean_env_cli_shape`'s documented forms, the F21 drift pin (`test_fail_closed_load_shape_freeze_boundary_admits_zero_events`), the absorbed F27/F28/F30 pins (fixes-2's seven and fixes-4's five modules), the cancel-race and cancel-observe pins (`test_cancelled_launcher_shape`, `test_cancel_race_class_shape`, `test_cancel_race_shape_stop_after_observation`, `test_stale_admission_race_log_replays`), and the open-defect-registry meta-tests — all green in both full runs.
VERIFIED: The report's form — every `report.txt` field present and filled, nothing outside the template added; `FINAL` is the work commit, never the report commit f0e1f3c; `TRIPPED: none` copies `check-scope`'s own line; `SHAPES` names every probed-but-unbuilt shape with its reason (the MemoryError boundary, the NUL-path read face, the OSError family's three input shapes, and the YAMLError entry's non-`ParserError` faces) and the typed-tag faces as this review's three built probes; `INHERITED` leads with the carried IDs and nothing it received is still open in it.
NOT VERIFIED: none — every command named above ran and its output is quoted here.
FINDINGS:
  F38 | SEVERITY: P1 | ORIGIN: CODE | STATE: carried
  A malformed typed scalar (`run_id: !!int 'garbage'` / `!!float 'garbage'`) fails the safe constructor's own conversion and raises a raw `ValueError` out of `yaml.safe_load`; it is not a `yaml.YAMLError`, so the delivered tuple `(yaml.YAMLError, UnicodeDecodeError, RecursionError)` does not catch it — the raw class escapes `load_run_spec` (and the documented `start` head dies on its traceback, terminal line `ValueError: could not convert string to float: 'garbage'`) instead of the named refusal. The step's central claim — the work commit's "every failure the loader's read+decode+parse can produce is now the named refusal", the GOAL's face, and `RunSpecError`'s "one named failure, never a run-time surprise" docstring — is falsified for this operator-reachable malformed-spec family; this is the enumerated-class trap returning a fourth time inside the same face (F35's `UnicodeDecodeError`, F36's `RecursionError`, now the typed-conversion leak class), which is why it is graded serious. The fail-closed halves hold (store ABSENT through the head, zero events). Pre-existing at every earlier step (the face was never guarded for it), not a regression of this one.
  FIXED: tests/test_phase5_run_entry_fixes_6_review.py::test_review_f38_int_float_typed_scalar_refused_as_a_named_run_spec_error — at FINAL the named assertion fails at tests/test_phase5_run_entry_fixes_6_review.py:35 as `.venv/bin/python -m pytest tests/test_phase5_run_entry_fixes_6_review.py -v` → `Failed: F38: an ill-typed int scalar is refused as ValueError, not the documented named \`RunSpecError\`: ValueError("invalid literal for int() with base 10: 'garbage'")` (the `!!float` half names `could not convert string to float: 'garbage'` in the same probe's second iteration) — 1 failed, 2 passed with this review's probes; the probe rides red until a loader widening absorbs it green with no test edit.
  F39 | SEVERITY: P1 | ORIGIN: CODE | STATE: carried
  A malformed `!!timestamp` typed scalar raises a raw non-YAMLError exception out of the safe constructor — `run_id: !!timestamp 'nope'` crashes on `'NoneType' object has no attribute 'groupdict'` (an `AttributeError` from the constructor's own regex handling) and an out-of-range value (`!!timestamp '2020-13-45T99:99:99Z'`) raises a raw `ValueError` (`month must be in 1..12`) — both escape `load_run_spec`'s tuple raw and the documented head dies on their tracebacks instead of the named refusal. Same central-claim falsification and same trap as F38; fail-closed halves hold.
  FIXED: tests/test_phase5_run_entry_fixes_6_review.py::test_review_f39_timestamp_typed_scalar_refused_as_a_named_run_spec_error — at FINAL → `Failed: F39: an ill-typed timestamp scalar (nope) is refused as AttributeError, not the documented named \`RunSpecError\`: AttributeError('\\'NoneType\\' object has no attribute \\'groupdict\\'')` under the same command as F38 (1 failed, 2 passed).
  F40 | SEVERITY: P1 | ORIGIN: CODE | STATE: carried
  A malformed `!!bool` typed scalar (`run_id: !!bool 'garbage'`) raises a raw `KeyError` out of the safe constructor's bool handling; not a `yaml.YAMLError`, so the delivered tuple misses it — the raw class escapes `load_run_spec` and the documented head dies on `KeyError: 'garbage'` instead of the named refusal. Same central-claim falsification and same trap as F38; fail-closed halves hold.
  FIXED: tests/test_phase5_run_entry_fixes_6_review.py::test_review_f40_boolean_typed_scalar_refused_as_a_named_run_spec_error — at FINAL → `Failed: F40: an ill-typed bool scalar is refused as KeyError, not the documented named \`RunSpecError\`: KeyError('garbage')` under the same command as F38 (1 failed, 2 passed).
  F41 | SEVERITY: P2 | ORIGIN: DOCUMENT | STATE: carried
  The implementer report's `VERIFIED` figure "links 364/364 OK" does not match what the gate prints for the committed content: `scripts/check-docs` on scratch copies of both the REV tree and the FINAL tree measures `366 Total / 366 OK / 0 Errors`, and the range's own diff adds the brief's single local `../record.md` request (the `lychee --dump` cross-check) — no content state in the measured neighbourhood prints 364. The gate's substance holds (exit 0, 0 errors, both trees measured), so this is a copied-or-guessed figure rather than a run record — the J-class ("a claim not checked against the artifact it cites"), here in a direction that changed nothing material. A later actor corrects it by naming the gate's own line (a figure copied from the printed source, never recomputed from memory).
  FIXED: no regression test — a prose figure in a committed report has none; the close form is the review that filed this one (this report's VERIFIED) and, if the step closes out, a record.md Observations line for the count-figure class.
  F42 | SEVERITY: P2 | ORIGIN: BRIEF | STATE: carried
  The corpus-count number is a claim not checked against the artifact it cites: this review brief's QUESTIONS line (and the fixes-5 review's own banner, and this brief's CONTEXT sentence "the review's 19-class corpus") count the malformed-class corpus at nineteen classes, while the fixes-5 review's own VERIFIED corpus line names exactly seventeen; the two extra classes are named nowhere and cannot be re-driven by name. The fixes-5 review's own summary ("attacked-and-not-falsified for 18 of 19 classes") inherits the same unreconciled count. No coverage gap results — this review drove all seventeen named members to fill the demand's substance — but the number travelled through two committed documents unverified, so a later committed brief corrects the text to the artifact's own list (seventeen named classes) or drops the banner number.
  FIXED: no regression test — a count in a committed brief's prose has none; the correcting text is the next committed brief naming the corpus size from the artifact's own list (the fix-form rule 8 gives ORIGIN: BRIEF findings).
SHAPES: the typed-tag conversion faces (raw `ValueError`/`AttributeError`/`KeyError` through `!!int`/`!!float`/`!!timestamp`/`!!bool`) — probed, now BUILT as this review's three red probes above. The remaining shapes probed but left unbuilt, with the reasons: (1) the MemoryError host-resource class — probed with an `RLIMIT_AS` reproducer and adjudicated outside `docs/run-entry.md`'s claim (the boundary's words named in VERIFIED); a pin would be an rlimit-dependent subprocess test and no pin is owed for a class the claim's own words exclude — if an OWNER later widens "loader-refusable" over host-resource, an OWNER ruling supersedes this entry and the class needs one then; (2) the NUL-byte-in-path read face — `open()` raises a raw `ValueError` before any file exists, probed in-process at FINAL; there is no malformed *spec* at such a path (the claim's subject is the spec document), and the operator's interface cannot deliver the class (execve argv cannot carry NUL; the surrogate-escaped argv class — which the interface CAN deliver — refuses named); and (3) the `OSError` read family's three input shapes (missing path, a directory, a symlink loop) and the `yaml.YAMLError` entry's non-`ParserError` faces (tab-indent `ScannerError`, NUL-byte `ReaderError`, the `ConstructorError` family) — all hand-measured named at FINAL by this review's corpus and CLI matrix, and previously disclosed unbuilt by the fixes-5 review; the `OSError` face has its reason (unchanged behaviour, byte-verified), and the YAMLError entry's other faces are represented by the F34 probe through the entry they ride.
TRIPPED: none
PROPOSED ROWS: none
METHOD FRICTION: none
INHERITED:
F38, F39, F40, F41, F42 are filed carried by this review and live in its FINDINGS above. Nothing else is still open: what this review received is fully disposed — F36 (the only item carried by the fixes-5 review's INHERITED) is fixed by the step under review (its red probe green in both full runs with no test edit), F37 is fixed at the fixes-5 step and green as a maintained pin, the fixes-5 implementer's INHERITED block reads none with nothing open, and the brief's two copied blocks resolve to those same two findings.
