docs(valid-detection-benchmark): record the pre-11.6 hardening pass

Fold-in notes for the reviewer advisories closed before 11.6: reservation
identity, preparation-rooted spend and its harness adoption, the
wrong-typed stage product, the license fixture, the ledger and closure
type guards, the sourcing queue key, the runtime floor, the whole-tree
formatter gate, and the residuals left for the 11.6 owner.
This commit is contained in:
Marius Ciepluch
2026-11-23 21:55:38 +01:00
parent 081adfc052
commit 26833ffe52
@@ -456,3 +456,14 @@
- Task 11.3 review (2026-11-23), items for the 11.6 owner: (a) run.py's `bind_case_adapter_replay_stage`/`AdmissionCaseAdapterRequestV1` re-exports match the `BenchmarkRunStagesV1.replay` seam but have no in-repo consumer yet — 11.6 must adopt the preparation-rooted spend (`derive_case_adapter_preparation`; the CAS receipt must be minted from `preparation.label_release_request`, an 8.3-style `label_open_request` receipt can never satisfy core `_exact_successor_receipt`, proven) or the seam stays declaration-only; (b) the e2e synthetic population uses 20 ordinary pushes TOTAL for 40 positives with relaxed Wilson precision — the literal 3.2 ratio (>=20 per positive) and production precision bind real admission populations (10.6 proved the ratio at draw time); (c) `admission_spend.join_released_cases` now joins positives by `underlying_push_digest` (structurally necessary: core pins `projection.case_input_digest == ref.case_input_digest` at evaluation_observation.py:121 while sealed labels key raw identities) — 11.6 population builders must key both sides consistently; (d) hostile-decode parse hooks in `replacement_artifact_contract._decode_canonical` are defense-in-depth (downstream canonical re-encoding independently rejects non-finite values) — keep, but do not treat hook removal alone as a regression signal.
- Task 11.4 review (2026-11-23), item for the 11.6 owner (11.7 backstop): a run stage returning `None` instead of a product escapes `benchmark_run_command` as a raw `AttributeError` at run.py:445 (`_persist_terminal_outcome` on `None.outcome`; reviewer probe reproduced). Fails loud, never clean, and is a miswired caller contract rather than an operational failure — but 11.6 wires the production stages and owns run.py next: either type-check stage returns (closed INVALID_REQUEST/refusal) or document the seam contract. Optional hardening for the next fixtures owner: `CountingCrashLoader` (tests/valid_benchmark_failure_injection.py) counts reads without asserting custody SPENT itself (committed `_LabelSource` does); ordering violations are still caught via spent-state assertions and the committed pre-CAS refusal.
- Task 11.5 review (2026-11-23), items for the 11.6 owner: (a) RATIFIED trade-off — 11.5 ran freeze/manifest/policy/serialization/streaming at the full 840-input scale but execution/spend/release/projection/replay/reporting at a 240-input representative tier (4x the 11.3 scale), because the committed execution/sealing seam is super-linear (~n^1.67, triple-verified 7.2s@60 / 71.7s@240 / ~615s@840); a full-scale governed run needs >=2 such executions, so 11.6 must budget ~20+ minutes of execution alone and should measure again at the real population size; (b) a correctly-reviewed full-scale lifecycle has NEVER actually been completed — the 840-input probes' `manifest_invalid` refusals were probe-construction artifacts (default-population lru-cached review subject at tests/valid_benchmark_e2e_fixtures.py:1052-1058 vs per-population `_execution_subject` in tests/valid_benchmark_scale_support.py:623-632), not capacity caps; the budget ruling rests on timing alone; (c) minor: arm-runtime receipts use `max(0, ...)` clamps (a 0ms arm measurement would pass) and `runtime_ms >= 0` assertions — tighten to `> 0`/`max(1, ...)` next time the scale support module is owned.
- Hardening pass before 11.6 (2026-11-23), fold-in of the advisories above. Each item below has its own reviewer approval and a fresh controller test run before its commit; nothing in items 1 to 8 is left for the 11.6 owner. The open residuals are in the last note of this pass.
- Item 1 (11.1 review), reservation identity: the `.git` suffix is now stripped case-insensitively at one point (`strip_git_suffix` in `benchmarks/valid/reservation_identity.py`, also used by `reservation_guard.py`); identities of URLs without a mixed-case suffix are pinned byte-identical (six URLs and one four-member network digest). Commit 7e6da2e.
- Item 2 (11.3 review), preparation-rooted spend: production `commit_preparation_spend_and_release(request, preparation)` in `benchmarks/valid/admission_spend.py` mints the custody receipt from `preparation.label_release_request`, so core `validate_shared_spend` binds it (the legacy `commit_spend_and_release` receipt is refused with "shared-spend receipt does not match the preparation"); binder `bind_case_adapter_spend_stage` in `benchmarks/valid/admission_case_adapter.py`, exported from `run.py`, refuses an execution other than `request.execution` before any custody access; the legacy function keeps its mint order (receipt minted from the head after the head check; 392 logical lines). Commits 5fdf65e, f9d29aa.
- Item 2 follow-up (harnesses): the end-to-end and scale harnesses spend through the production stage via `bound_spend_stage` in `tests/valid_benchmark_e2e_fixtures.py` (bound while the population is still AVAILABLE, because the review subject is predicted before the spend); the failure-injection copy stays a raising fault injector so the failure matrix keeps its pinned outcomes; the sealed release the harness persists now has the production shape. Commit 081adfc.
- Item 3 (11.4 review), run command: a stage that returns `None` or a wrong-typed product yields a persisted IMPAIRED outcome at that phase with `INSTRUMENT_FAILURE` and the spent flag from custody (eight parametrized cases in `tests/test_valid_benchmark_run.py`). Commit 2951f7d.
- Item 4 (11.1 review): the `license_class` conjunct of `population_materials.py` has a mismatch fixture, proven by a mutation that was restored byte for byte. Commit 0d5aaee.
- Items 5a, 5b, 6 (10.4/10.5 reviews): `cohort_selection._ledger_facts` closes STATE_MISMATCH on a non-tuple `pending_entries` (sorted unique digest tuple); `positive_set_closure._validate_closure` accepts only a strict int total (float and bool refused on the direct and the decode path); the `_pending_by_ecosystem` docstring names the CONFLICTING_ACCEPTED_REVIEW corner. Commits 60bb7f0, 9e884e8, 364b4c0.
- Item 7 (10.2 review): `sourcing_queue_build._request_order` carries the fix-site path and function in its key (each element pinned by its own mutant). Two residual ties stay open: requests identical on all nine keys but with different fix revisions, and two requests sharing one candidate digest with a different family or CWE (`DUPLICATE_CANDIDATE` keeps the first by input order). Commits 67bc37c, 364b4c0.
- Item 8 (11.5 review): arm, streaming and lane runtimes are floored at 1 ms (frozen-clock test). Commit f2093a5.
- Style: CI runs `ruff format --check` over the whole tree; the benchmark modules it flagged were formatted with no semantic change (AST identical). Commits bacbe53, 58b2021.
- Residuals for the 11.6 owner, not changed in this pass: `.git` is still stripped case-sensitively outside `benchmarks/valid` (`benchmarks/search/pilot_select.py`, `benchmarks/learn/engine_trace.py`, `src/openultrasast/plane/memory.py`, `src/openultrasast/plane/runner.py`, `src/openultrasast/learn/labels.py`; none feeds reservation identity); `benchmarks/valid` is outside the mypy gate (7 pre-existing errors there); `workflow_journal.py` is at 408 logical lines against the 400 cap; the push eligibility registry has been stale since 2026-09-13 (its bindings no longer match the code, so the hook reports the registry as stale and emits no alert).