-
Notifications
You must be signed in to change notification settings - Fork 1
fix(heldout): declare item-covariate sample size #1104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
seonghobae
merged 5 commits into
main
from
codex/declared-item-covariate-sample-size-20260908
Sep 17, 2026
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2e0619b
test(heldout): require declared item-covariate sample size
seonghobae cb5a41e
fix(heldout): declare item-covariate sample size
seonghobae 232502f
docs: record declared item-covariate sample size
seonghobae 87642d7
fix(heldout): validate two-group covariate sample boundary
seonghobae 69d5056
test(heldout): restore SimpleNamespace import for covariate fixtures
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
docs/planning/adrs/0053-declared-item-covariate-sample-size.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| --- | ||
| id: "0053" | ||
| title: "Declare held-out item-covariate sample size" | ||
| status: proposed | ||
| proposed_date: "2026-09-08" | ||
| deciders: | ||
| - "repository maintainer" | ||
| affected_components: | ||
| - "scripts/benchmark_psychometric_heldout.py" | ||
| related: | ||
| - path: "docs/planning/adrs/0044-declared-heldout-bootstrap-coverage.md" | ||
| relation: extends | ||
| success_criteria: | ||
| - metric: "no hidden item-covariate sample default" | ||
| target: "omitted, boolean, or sample_size below two fails closed" | ||
| source: "tests/test_psychometric_benchmark_boundaries.py::test_item_covariate_requires_declared_sample_size" | ||
| - metric: "declared count is the person population" | ||
| target: "report sample_size equals the declared count" | ||
| source: "tests/test_psychometric_benchmark_boundaries.py::test_item_covariate_uses_declared_sample_size" | ||
| --- | ||
|
|
||
| # ADR 0053: Declare held-out item-covariate sample size | ||
|
|
||
| - Status: Proposed | ||
| - Date: 2026-09-08 | ||
| - Doctoring record: [`docs/doctoring/nim-benchmark-evidence-grade.md`](../../doctoring/nim-benchmark-evidence-grade.md) | ||
|
|
||
| ## Product requirement | ||
|
|
||
| Buyer-facing item-side language/domain contrast evidence must be | ||
| reconstructible. A hidden `ITEM_COVARIATE_SAMPLE_SIZE = 1_200` chose Monte | ||
| Carlo precision without an operator declaration. | ||
|
|
||
| ## Decision | ||
|
|
||
| The two-group contrast requires at least two observations. A declaration of | ||
| one produces only group zero while the covariate matrix contains two groups; | ||
| reject it before fitting rather than exposing a downstream matrix-shape error. | ||
| This is a structural minimum, not evidence of adequate statistical power. | ||
| Boundary tests retain both groups for counts two, three, and forty. The | ||
| full-size report test independently pins this run's declared count to 1,200. | ||
|
|
||
| In the context of the held-out multigroup item-covariate screen, facing | ||
| `ITEM_COVARIATE_SAMPLE_SIZE = 1_200`, we chose a required `sample_size` | ||
| declaration and against restoring that constant, to keep the person | ||
| population reconstructible, accepting that `_validate_item_covariate_effect` | ||
| without the argument fails closed. | ||
|
|
||
| The harness run writes 1,200 as this run's choice and records `sample_size`. | ||
| Optimizer max-iter stays later work. Production route/conduct defaults stay | ||
| locked. | ||
|
|
||
| ## Alternatives considered | ||
|
|
||
| - Keep 1,200 as a module constant. Rejected: it hides the person population | ||
| from the report consumer. | ||
| - Declare max_iter in the same slice. Rejected: it is optimizer budget, not | ||
| the sample size. | ||
|
|
||
| ## Consequences | ||
|
|
||
| Positive: item-covariate sample size is reconstructible from the report and | ||
| the helper signature. | ||
|
|
||
| Negative: library callers of `_validate_item_covariate_effect` must pass the | ||
| declaration. | ||
|
|
||
| ## Remaining work | ||
|
|
||
| Other repository-authored harness sample sizes stay open. This ADR is | ||
| Proposed until independent review and protected delivery. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.