fix(v5): reject duplicate repeatability input identities
Scope
Fail-closed correction to the input identity gate only for the prospectively frozen V5 S1 unchanged-base repeatability analysis.
Prior to this correction, passing the same R1 matrix twice to scripts/v5_s1_repeatability_analysis.py returned repeat_count=2 and four zero primary repeatability estimates. This is a concrete invalid acceptance of duplicate evidence, not an observed scientific repeatability result. Require strictly typed integer labels repeat=1 for R1 and repeat=2 for R2, in order, before any metric is calculated.
Scientific freeze preservation
- No metric, formula, split, 95th-percentile algorithm, clustering, numeric precision, tokenizer/model configuration, prompt, dataset, frozen source, model execution or authentic evidence is changed.
- Adds targeted tests for duplicate R1, swapped R2/R1, Boolean, float and string aliases. Preserves zero repeatability for two separately labelled genuinely distinct run inputs with equal logits.
- The new check is necessary but not sufficient: archive-level, source-bound, independent per-run verification remains mandatory before R1/R2 synthesis. It does not itself prove independence of Kaggle runs.
- The ongoing private Kaggle R2 run remains frozen at scientific branch head
819cf1dda443937eec0360e6051a89062b545cb9. This PR is separate and targets the research branch; do not advance that branch or merge this PR until the running experiment has completed and its evidence is durable.
macOS qualification (Apple Silicon, Python 3.13)
PYTHONPATH=src python3 -m pytest -q tests/reliability_v5/test_repeatability_analysis.py: 6 passed.PYTHONPATH=src python3 -m pytest -q --disable-warnings --maxfail=1: 1353 passed, 264 subtests passed.python3 -m compileallon changed Python paths: PASS.git diff --check(three-file change): PASS.- Alibaba OpenCodeReview
v1.12.13genuine zero-costocr delegate previewreviewed file eligibility: 1 production Python file eligible, test file excluded by default_path, Markdown excluded by unsupported_ext. Host inspected all three files. No external LLM verdict or cryptographic commit-signature claim is made; commit has DCO sign-off. Jev isDEFERRED_ZERO_COST_POLICYuntil a genuinely authorized zero-cost path exists. - No model run, PHI, Kaggle run duplicate, paid compute/API, confirmatory/reserve use, publication or merge.
Review disposition
DRAFT, REVIEW-ONLY — do not merge while R2 is running. Validate required exact-head and governance review before incorporation. Source research branch and canonical main remain untouched.
Summary by cubic
Rejects duplicate or invalid repeat identity inputs in scripts/v5_s1_repeatability_analysis.py so passing the same R1 matrix twice no longer falsely reports zero primary repeatability estimates.
- Requires exact integer labels
repeat=1andrepeat=2in order before any metric is computed; swapped, Boolean, float, and string aliases are rejected. - Adds tests for duplicate R1, swapped R2/R1, and alias labels. No metrics, formulas, or frozen scientific analysis change; the guard covers input integrity only.
- Review-only for now — do not merge while the running Kaggle R2 experiment is in progress.