Skip to content

fix: preserve database text collation in SQL guidance - #327

Draft
seyoung4503 wants to merge 2 commits into
fix/codex-failed-case-selectionfrom
fix/sql-text-ordering
Draft

seyoung4503 wants to merge 2 commits into
fix/codex-failed-case-selectionfrom
fix/sql-text-ordering

Conversation

@seyoung4503

@seyoung4503 seyoung4503 commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

A repeated Spider failure constructs an ordered ingredient list using an unrequested NOCASE collation. Re-executing the same SQL with that override removed reproduces all 14 reference row IDs and ingredient strings. Add general shared guidance to preserve declared/default collation and explicitly order aggregate inputs. No SQL rewrite, benchmark identifier, reference output or gold-derived definition is injected into the product.

Validation: 260 root tests passed, 1 skipped; diff clean. Ruff passes with BLE001 excluded; unmodified base has the same pre-existing blind exception in system_prompt.py. Only one prompt line changes. Completed fresh Codex MCP evaluation on the preceding run's eight remaining Spider failures: 1/8 repaired, local073. Its generated SQL no longer adds NOCASE and the unchanged official grader accepts the result. The other seven remain incorrect. Solved local264 was excluded through --failures-from. BIRD is not replayed for this text-ordering change. Model gpt-6.2-sol/high, ChatGPT login, unchanged official grader. This is a targeted repair result, not full benchmark accuracy; a single stochastic run does not isolate causal effect.

Stacked on #326. Full answers, MCP traces, scores, settings and hashes are committed under bench/accuracy/mcp-review-results/text-ordering-3533981. Reused BASE_INSTRUCTIONS consumed by the production MCP server and internal harness; +1 line, no new function.

Principle Result Evidence
Reuse O Existing shared instruction path
Cause O Reproduced change in string ordering from added collation
Logging/errors N/A No execution or exception-handling change
Environment/config N/A No new env or runtime constants
Comments O No issue-number comments
Verification O 260 passed, 1 skipped; baseline lint finding disclosed
Authorization O PR only; no merge
Call path O BASE_INSTRUCTIONS -> MCP initialization -> SQL generation
Sync/async N/A No new I/O or execution loop

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