Skip to content

fix(heldout): declare candidate-group DIF sample size - #1099

Draft
seonghobae wants to merge 4 commits into
codex/declared-assignment-trials-20260908from
codex/declared-dif-sample-size-20260908
Draft

fix(heldout): declare candidate-group DIF sample size#1099
seonghobae wants to merge 4 commits into
codex/declared-assignment-trials-20260908from
codex/declared-dif-sample-size-20260908

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Stack

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

Exact head: b975c3dde9c74a862696aa49c6668d6a2e3f567a.

Problem

Held-out candidate-group DIF evidence hid DIF_SAMPLE_SIZE = 4_000, so two-cohort purification used a repository-selected population.

Change

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

Verification

Local smallest tests:

  • 62 passed in 16.15s (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 (reliability, judge, exploration rate) remain later slices. No production policy or release is authorized. Parent #1067 still needs independent review.

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.
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

Signed-off-by: Seongho Bae <me@seonghobae.me>
@seonghobae

Copy link
Copy Markdown
Contributor Author

Normal merge at da4ceac preserves original DIF sample-size delta b975c3d and incorporates predecessor ae5aabf. Carries no-detection censoring repair, explicit alarm/detection denominators, null candidate when no calibration threshold is eligible, and retained calibration results. Merged-tree checks: 29 boundary and ADR identifier tests passed in 3.44 seconds, Ruff passed, diff whitespace check passed. CodeGraph indexing completed. DIF generation still uses the explicitly declared even sample count; no synthetic results are promoted to customer-data accuracy evidence. No force push, discarded delta, production change, or release claim. Hosted checks must validate this new head.

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