Skip to content

Preserve stored output types when casting for numeric ordering - #353

Draft
seyoung4503 wants to merge 2 commits into
experiment/codex-coverage-completionfrom
fix/preserve-sort-value-types
Draft

seyoung4503 wants to merge 2 commits into
experiment/codex-coverage-completionfrom
fix/preserve-sort-value-types

Conversation

@seyoung4503

Copy link
Copy Markdown
Collaborator

A query for the latest stored frame year returned the right year and count but changed the year from its stored TEXT value to INTEGER. BIRD's unchanged native-tuple evaluator treats those values as different. Clarify the existing output-representation guidance: preserve stored projected values unless conversion is requested; a cast needed only for numeric ordering belongs in ORDER BY, not automatically in SELECT.

Tool-first diagnosis confirmed that MCP executed and returned exactly the model's SQL. The executor did not change types. Before:integer2015,count820; reference:string"2015",count820. An offline projection-only cast removal matches native reference tuples. This is a representation mismatch, not an incorrect business count. The grader, DB, reference and denominator stay unchanged; no implicit result coercion is added.

One original failed case is rerun fresh with Astra/high through ChatGPT-auth Codex→Lang2SQL MCP, frozen88f3d1. No reference, previous attempt or counterfactual SQL enters model input. The product change is one existing instruction bullet; no new functions/tools/runtime paths. Original broad BIRD execution continues on0c79539.

Validation:339 root tests passed,1 skipped. Scoped Ruff passes excluding the existing unrelated BLE001 in this prompt module; diff checks pass. No CODE MAP generator exists. The source branch is based directly on0c79539 to isolate this change from later share-unit guidance.

Selected-case official result:bird086 repaired0→1 (1/1). New SQL projects original frameVersion and casts only ORDER BY; result is now(string"2015",820). It also uses non-empty ID checks; baseline profiling observed no blank IDs. This is one stochastic selected-case repair, not full accuracy or deterministic enforcement. Keep draft pending broader integration/validation.

Exact original prompt bytes match. Archive:bench/accuracy/mcp-review-results/sort-value-types/,24verified hashes, raw before/after traces, SQL/CSV, paired HTML/JSON comparison and offline native-type diagnosis. Original checkpoint004 remains92/94; the separate repair does not rewrite its score.

Principle Verdict Evidence
Reuse O Existing prompt builder/runner/scorer; no new function; one replaced line, product net0lines
Cause/scope O Projection type conversion only; no SQL rewrite or grading normalization
Logging N/A No new execution branch; existing complete trace capture
Errors N/A No new catch/fallback/retry
Environment N/A No new settings or reads
Issue comments O No issue references in source comments
Verification O 339passed/1skipped, scoped Ruff/diff, existing BLE001 disclosed; no CODE MAP generator
Authority O PR only, no merge or live-job restart
Consumers O Prompt builder→MCP instructions→external Codex SQL generation
Sync/async N/A No I/O or additional implementation path
Constants/deployment N/A No operational configuration introduced

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