Skip to content

Reject unexpected benchmark case selection before model calls - #358

Draft
seyoung4503 wants to merge 3 commits into
fix/official-value-descriptionsfrom
fix/benchmark-selection-count
Draft

seyoung4503 wants to merge 3 commits into
fix/official-value-descriptionsfrom
fix/benchmark-selection-count

Conversation

@seyoung4503

@seyoung4503 seyoung4503 commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

A prespecified 31-case failure manifest was intersected with the CLI's default development split, so only one case ran. Add optional --expected-cases to reject an unexpected final selection before creating output or calling a model. Logs and settings record the input, selected and expected counts. Existing split, exclusion and scoring behavior is unchanged.

The check runs after split and failure/pass filtering, including the zero-case path. Expected zero permits a confirmed no-op; negative expectations fail. For a prespecified failure manifest, use --split all --expected-cases N. Here, “all” means every case in that manifest, not the full benchmark.

Validation: 370 tests passed, 1 skipped, scoped Ruff and diff checks passed. Tests cover the development-split mismatch, post-exclusion mismatch, zero no-op, negative expectation, successful matching count and settings provenance. The existing runner and settings paths are reused: no new runtime functions, net +19 runner lines, no product code changes.

Runtime evidence is archived in bench/accuracy/mcp-review-results/selection-count-validation with 39 verified hashes. The original one-case run (bird146, official 0/1) is preserved. Its other 30 cases were started in a fresh output with explicit --split all; actual manifest IDs were verified 30/30. No already-executed case was repeated. A subsequent two-case run verified input=2, selected=2 and expected=2 through the new guard. It scored 1/2: bird495 improved, bird467 did not. The guard is not claimed to improve SQL accuracy.

A controlled offline audit isolated bird467's remaining mismatch: changing only the protein predicate leaves 71 patients; removing only the model-added requirement that the test date follow the birth date yields the reference's 73. Two additional patients qualify through pre-birth-date records. This is diagnostic evidence, not a model repair or a change to product policy; the original score remains zero.

Principle Result Evidence
Reuse O Existing run/main selection and settings;0newruntimefunctions, runnernet+19.
Cause only O Observed31→1selection mismatch; countguard/logging only.
Logging O Logs split/input/selected/expected before model calls.
Errors O Mismatch raises; no silent fallback.
Environment N/A CLI input only; no env added.
Issue comments O No issue-number comments.
Verification O Root tests, scopedRuff, diff checks; no CODE MAP generator.
Authorization O DraftPRonly; no merge.
Request path O CLI→existingfilters→countassertion→existinginference; failbeforeoutput.
Async O No blocking calls, newI/Oor duplicateworkflow.
Constants/deployment N/A Expectedcount is explicitCLIinput; no deployment/env changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant