Skip to content

fix(heldout): declare judge-effect sample size - #1101

Merged
seonghobae merged 35 commits into
mainfrom
codex/declared-judge-sample-size-20260908
Sep 17, 2026
Merged

seonghobae merged 35 commits into
mainfrom
codex/declared-judge-sample-size-20260908

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Stack

Draft successor of #1100 (9ff12b5d). Parents #1099, #1098, #1097, #1096, #1095, #1093, #1092, #1091, #1090, #1074, and psychometric KPI owner #1067 stay open. This PR does not close #1100.

Exact head: cdbc6a03605bff2d3a66b6404b324c3e376b30f2.

Problem

Held-out judge-severity evidence hid JUDGE_SAMPLE_SIZE = 1_000, so the fully crossed many-facet design used a repository-selected person population.

Change

  • Require declared sample_size on _validate_judge_effects. Missing, boolean, or non-positive values fail closed.
  • The harness run still writes 1,000 as this run's choice and records sample_size.
  • ADR 0052 is Proposed. Production route/conduct defaults stay locked.

Verification

Local smallest tests:

  • 66 passed in 16.32s (tests/test_psychometric_routing.py, tests/test_psychometric_benchmark_boundaries.py, tests/test_planning_adr_identifiers.py)
  • interrogate on the held-out script: 100%

This is declaration-contract evidence, not buyer-held-out accuracy, p95 latency, or protected merge.

Remaining no-heuristics work

Other harness sample sizes (exploration rate, item-covariate) remain later slices. No production policy or release is authorized. Parent #1067 still needs independent review.

RED: nested JSON fields still embed 95 in the name even though coverage
is a run declaration. The next commit must rename those fields.
Rename nested *_ci95 JSON keys to *_interval. Declared coverage stays in
bootstrap_confidence_level. IRT interval_95_coverage_rate diagnostics are
unchanged. Production route/conduct defaults stay locked.
ADR 0045 is Proposed. Gap baseline, changelog, and doctoring keep coverage
in the declared field rather than the JSON name.
CUSUM delay KPIs must fail closed without replications, horizon,
change-point, and coverage, and must keep no-alarm replications as
horizon-censored missed detections.
…lays

Remove the abort-on-no-alarm and the baked-in 500/250/100 CUSUM screen.
Wilson coverage comes from the declared interval and is stored as
false_alarm_rate_upper_bound.
ADR 0046 is Proposed. Production route/conduct defaults stay locked.
Paired ranking timings must fail closed without a positive per-context
repetition count, and the declared count must be the actual timing loop.
Remove the hidden 200-repetition timing default. The harness run still
writes 200 as this run's choice and records latency_repetitions_per_context.
ADR 0047 is Proposed. Production route/conduct defaults stay locked.
Accuracy and decision-latency helpers must fail closed without a positive
context_count, and the declared count must be the actual quality loop.
Remove the hidden 24-context TRAIN_CONTEXTS default from evidence
construction, quality evaluation, and paired timings. The harness run still
writes 24 as this run's choice.
ADR 0048 is Proposed. Production route/conduct defaults stay locked.
Logging-design evidence must fail closed without a positive trial_count,
and the declared count must be the actual assignment loop.
Remove the hidden 24,000-trial logging default. The harness run still
writes 24,000 as this run's choice and records trials.
ADR 0049 is Proposed. Production route/conduct defaults stay locked.
DIF evidence must fail closed without an even positive sample_size, and
the declared count must be the two-group population.
Remove the hidden 4,000-row DIF default. Odd counts fail closed so the two
cohorts stay equal. The harness run still writes 4,000 as this run's choice.
ADR 0050 is Proposed. Production route/conduct defaults stay locked.
Reliability evidence must fail closed without a positive sample_size, and
the declared count must be the person population per case.
Remove the hidden 1,200-row reliability default. The harness run still
writes 1,200 as this run's choice and records sample_size_per_case.
ADR 0051 is Proposed. Production route/conduct defaults stay locked.
Judge-severity evidence must fail closed without a positive sample_size,
and the declared count must be the fully crossed person population.
Remove the hidden 1,000-row many-facet default. The harness run still
writes 1,000 as this run's choice and records sample_size.
ADR 0052 is Proposed. Production route/conduct defaults stay locked.
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 52 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: c8053186-0896-4690-89d5-18e78393164b

📥 Commits

Reviewing files that changed from the base of the PR and between dff0375 and 3d3d19e.

📒 Files selected for processing (15)
  • CHANGELOG.md
  • docs/doctoring/nim-benchmark-evidence-grade.md
  • docs/planning/adrs/0044-declared-heldout-bootstrap-coverage.md
  • docs/planning/adrs/0045-heldout-coverage-neutral-interval-keys.md
  • docs/planning/adrs/0046-declared-sequential-drift-horizon.md
  • docs/planning/adrs/0047-declared-latency-repetitions.md
  • docs/planning/adrs/0048-declared-heldout-context-count.md
  • docs/planning/adrs/0049-declared-assignment-trials.md
  • docs/planning/adrs/0050-declared-dif-sample-size.md
  • docs/planning/adrs/0051-declared-reliability-sample-size.md
  • docs/planning/adrs/0052-declared-judge-sample-size.md
  • docs/product-technical-gap-baseline.md
  • scripts/benchmark_psychometric_heldout.py
  • tests/test_psychometric_benchmark_boundaries.py
  • tests/test_psychometric_routing.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae seonghobae added bug Something isn't working priority: medium Normal-priority or P2 work labels Sep 8, 2026 — with ChatGPT Codex Connector
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
@seonghobae

Copy link
Copy Markdown
Contributor Author

Normal predecessor integration at 8a04a5c retains original judge sample declaration cdbc6a0 and includes predecessor 3e85d32. No-detection censoring, alarm/detection denominators, null ineligible calibration candidate and retained calibration results now propagate through this stack. Merged-tree validation: 33 boundary/ADR identifier tests passed in 5.80 seconds; Ruff and diff whitespace checks passed; CodeGraph indexing completed. No force push or discarded delta. This is local regression evidence, not real-data accuracy, protected merge or release evidence. Required checks and reviews must use the new head.

Preserve declared judge/drift sample-size contracts while absorbing main's
changelog structure and newer gap-baseline receipts.

Co-authored-by: Cursor <cursoragent@cursor.com>
After restacking onto main, keep main's seeded and mixed-denominator
coverage while calling declared replications/horizon instead of the
removed SEQUENTIAL_DRIFT_REPLICATIONS constant.

Co-authored-by: Cursor <cursoragent@cursor.com>
@seonghobae seonghobae reopened this Sep 17, 2026
@seonghobae
seonghobae changed the base branch from codex/declared-reliability-sample-size-20260908 to main September 17, 2026 23:38
@seonghobae
seonghobae marked this pull request as ready for review September 17, 2026 23:38
Keep declared judge/DIF/reliability contracts while requiring declared
item-covariate sample_size from #1104 on the shared harness entry.

Co-authored-by: Cursor <cursoragent@cursor.com>
@seonghobae
seonghobae merged commit 62d7457 into main Sep 17, 2026
16 of 21 checks passed
@seonghobae
seonghobae deleted the codex/declared-judge-sample-size-20260908 branch September 17, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: medium Normal-priority or P2 work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant