Skip to content

fix: preserve aggregate eligibility scope in SQL guidance - #328

Draft
seyoung4503 wants to merge 2 commits into
fix/sql-text-orderingfrom
fix/sql-aggregate-scope
Draft

seyoung4503 wants to merge 2 commits into
fix/sql-text-orderingfrom
fix/sql-aggregate-scope

Conversation

@seyoung4503

@seyoung4503 seyoung4503 commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

A recurring grouped-analysis failure correctly selects entities by their overall positive total, then adds the same positivity condition to component rows used for attribution. That extra condition drops qualifying affiliations and changes the ranked result. Re-executing the recorded SQL with only the extra component filter removed reproduces the reference result.

Add one general rule to the existing shared instructions: keep eligibility predicates at the requested grain and do not infer component eligibility from an overall aggregate condition. No reference answers, benchmark identifiers, schema names or automatic SQL replacement are added.

Validation: root tests 260 passed, 1 skipped; diff clean. Ruff passes excluding the existing BLE001 finding in the unchanged schema enrichment exception handler (also reproduced at base). Completed targeted Codex MCP run: local335 changed from incorrect to correct, 1/1 repaired using gpt-6.2-sol/high through ChatGPT login. The model used overall driver-season points for eligibility and the drives relationship for constructor attribution, without a component positivity filter. The unchanged official grader accepts the result. This is a single targeted repair, not full benchmark accuracy or proof of a causal effect independent of model variability. Full MCP observations, answer, input manifest, settings, scores and source hashes are committed under bench/accuracy/mcp-review-results/aggregate-scope-14dc9ef. Stacked on #327; no merge.

Reused BASE_INSTRUCTIONS -> MCP initialization and internal harness. +1 line, no new functions or environment/configuration values.

Principle Result Evidence
Reuse O Existing shared prompt
Cause O One-condition counterfactual reproduces membership difference
Logging/errors N/A Execution/log paths unchanged
Environment/config N/A No new runtime parameters
Comments O No issue-number comments
Verification O 260 passed, 1 skipped; pre-existing lint finding disclosed
Authorization O Draft PR only
Call path O Shared instructions -> Codex MCP SQL generation
Sync/async N/A No new I/O

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