feat(valid-detection-benchmark): 8.3 commit spend before label release with independent V3 case review

This commit is contained in:
Marius Ciepluch
2026-11-21 14:11:01 +01:00
parent 14bf931f01
commit 14036e1ec9
5 changed files with 1412 additions and 3 deletions
@@ -245,7 +245,7 @@
- _Requirements: 5.2, 5.3, 5.5, 5.6, 6.6, 6.7, 7.4, 7.5, 8.4, 8.5, 9.1, 9.2_
- _Boundary: Admission Orchestrator, Isolated Arm Executor, Workflow Journal_
- _Depends: 6.4, 7.2, 8.1_
- [ ] 8.3 Commit spend before releasing labels and independently review V3 cases
- [x] 8.3 Commit spend before releasing labels and independently review V3 cases
- Conditionally append and reread the exact available-to-spent successor before opening nonzero sealed-label bytes inside the custodian boundary.
- Join ground truth to frozen observations without exposing labels to arms and bind every released case to exact scope, role, pair, result, evidence, change inputs, observation, and reviewed manifest.
- Require an independent post-spend release review with producer/reviewer separation, policy satisfaction, and conflict disclosure.
@@ -443,4 +443,6 @@
- The approved Task 6.5 boundary amendment keeps sealed diagnostics and reviewed development opening in the executor/lifecycle seam; Tasks 7.2 and 8.1–8.2 persist and select the immutable retry authority only after feasible preflight, and Task 8.6 resolves it from the CAS workflow head instead of accepting an original identity from a caller.
- Task 7.3 pre-registers the operator replay-artifact envelope: stored replay artifacts carry `payload["replay_digest"]` equal to the decoded replay digest; Tasks 8.5 and 9.3 must honor this binding when persisting replays (load-bearing for `REPLAY_MISMATCH` detection).
- Task 8.2 places the execution phase in `admission_execution.py`, which sits at exactly the 400-line module cap: any further admission-boundary growth (8.3 spend, 8.5 replay) must start a new sibling module rather than extend it. Its sealed admission-manifest witness is a closed digest artifact (`admission-manifest-witness.v1`); the core `EvaluationAdmissionManifestV3` object travels in the product for Task 8.3's `authorize_evaluation` + custody CAS.
- Task 9.1 review empirically confirmed a hardening gap in the committed 8.1 module: `admission_orchestrator._freeze_gate` catches only `(TypeError, ValueError)` while `population_freeze_bytes` raises `AttributeError` for dict-shaped freeze inputs, escaping as an unhandled traceback instead of a closed `FREEZE_NOT_ADMISSION_CLASS` refusal (fail-closed either way). The next task owning that module (8.3) should fold in the one-line except-tuple extension plus an adversarial test.
- Task 9.1 review empirically confirmed a hardening gap in the committed 8.1 module: `admission_orchestrator._freeze_gate` catches only `(TypeError, ValueError)` while `population_freeze_bytes` raises `AttributeError` for dict-shaped freeze inputs, escaping as an unhandled traceback instead of a closed `FREEZE_NOT_ADMISSION_CLASS` refusal (fail-closed either way). The next task owning that module (8.3) should fold in the one-line except-tuple extension plus an adversarial test. (Folded in by 8.3: tuple now `(TypeError, ValueError, AttributeError)` plus adversarial orchestrator test.)
- Task 8.3 (load-bearing for 8.5/11.3): core `authorize_evaluation` cannot run over the committed 8.1/8.2 products — empirically confirmed by two independent reviews: (a) 8.2 `_content_ref` builds ContentRefs over repository artifact *envelopes* while core `resolve_content`/`decode_arm_observation_set` expect raw documents, so no digest-honest resolver can bridge them; (b) `compose_plan_manifest` binds `readiness_digests=(capability_report_digest,)` while core `_validate_readiness` requires real `ReadinessResult` objects whose re-derived digests match. 8.5 must repair the manifest/ref composition in a NEW sibling module (`admission_execution.py` is sealed at 400 LLOC) or amend the core seam before replay; the interim authority is the benchmark-owned `AdmissionSpendReleaseV1` bound to the committed custody receipt.
- Hostile-decode discipline (from 8.3's three review rounds): every `json.loads` on untrusted sealed bytes must use `parse_constant` rejection plus a finite `parse_float` hook (numeric-overflow literals like `1e999` bypass `parse_constant`), and `RecursionError` must appear in every recursion-exposed except tuple. Tasks 8.5, 8.6, and 9.3 must apply this to any new decoder of untrusted bytes.