feat(valid-detection-benchmark): 10.2 ingest bounded reviewed Python cohort

This commit is contained in:
Marius Ciepluch
2026-11-22 10:25:59 +01:00
parent 34344234d5
commit 825e680804
7 changed files with 1798 additions and 5 deletions
@@ -311,7 +311,7 @@
- Done when independent reviewers receive canonical evidence packages with no model verdict presented as authority and a restart reproduces the same pending queue identities.
- _Requirements: 1.1, 1.2, 1.5, 1.8, 2.1, 2.2, 4.1, 4.4, 7.4, 7.5_
- _Boundary: Replacement Population Sourcing_
- [ ] 10.2 Ingest the first bounded independently reviewed Python cohort
- [x] 10.2 Ingest the first bounded independently reviewed Python cohort
- Accept only externally supplied review records with distinct producer/reviewer identities, policy satisfaction, conflict disclosure, required ground-truth judgments, reachability, canonical ecosystem, and exact verified scopes.
- Limit this ingestion unit to one supplied batch of at most twenty candidate review records.
- Record every exclusion and insufficiency reason without fabricating or self-approving missing reviews.
@@ -450,3 +450,4 @@
- R1 final validation (2026-11-21): the pre-existing decoders behind the operator read path predate the hostile-decode discipline and lack it — `replacement_artifact_contract.py:207` (json.loads with no parse_constant/finite parse_float/RecursionError), plus `workflow_outcome._decode_canonical` (workflow_outcome.py:394) and `workflow_journal._decode_canonical` (workflow_journal.py:379); 9.3 review reproduced an unhandled RecursionError through them (closed at the run.py boundary only). Owner: task 11.1 (validation harness) or the next task owning `replacement_artifact_contract.py`; 9.3's boundary-level closure is interim.
- R1 final validation (2026-11-21), minor drift items: two module-local `OPERATOR_READ_POLICY_DIGEST` constants exist (`admission_replay.py` "scoped-replay-operator-read-policy" vs `run.py` "operator-command-read-policy" — caller-side only, no artifact-key coupling); `sealed_retry.py` imports the private `_reference_value` from `sealed_diagnostics` (not in `__all__`); 9.2's `score_replacement_replay` and 8.5's `derive_scoped_replay` are parallel wrappers over the same core `score_and_replay` (the admission path uses 8.5's; 9.2's seam is the 10/11+ product surface). Revisit when 11.x wires the entry points.
- Task 10.1 review: `sourcing_queue_build._request_order` sorts by (url, advisory_locator, reachability_digest, model_digest) with a stable sort, so two distinct candidates tying on all four keys get cap selection decided by input order (restart reproducibility still holds — decode is canonical-bytes-bound — but permutation-rebuild determinism does not). The next task owning that module (10.2+) should extend the sort key with the remaining content digests or refuse tied-but-distinct requests closed. Also noted: an `INSUFFICIENT_FAMILIES` refusal does not durably persist that attempt's exclusions (10.2 owns review-record exclusion durability).
- Task 10.2 review (2026-11-22): both 10.1 fold-ins landed (7-key `_request_order` discriminating old four-key ties + `InsufficientFamiliesRefusal.attempt_exclusions` durable persistence). Residual, forwarded to the next owner of `sourcing_queue_build.py`: distinct candidates differing only in non-digest fix-site scalars (path/function under identical repo/advisory/reachability/manifest/license digests) still tie on all seven keys and get cap selection by input order (round-1 reviewer reproduced divergent state digests across permutations); fix is fix-site scalars in the key or a closed refusal of residual ties. Optional hardening forwarded for the cohort modules: `project_accepted_ground_truth` call sits outside a closed-refusal wrapper (defense-in-depth only; unreachable with a consistent queue), and `decode_cohort_batch` accepts self-consistent forgeries whose `pending_entries`/`outcome.queue_entry_digest` are non-digest strings (downstream matching fails closed; a digest check would match sibling-field rigor). Real Python cohort remains PENDING external review records — the 10.2 done criterion is fixture-verified only.