Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions bench/accuracy/experiments/sort-value-types/bird-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"benchmark": "BIRD Mini-Dev SQLite 500 (2026-10-25)",
"upstream_commit": "5b256b5a9c17478f06ed6912612e9a14d17065c8",
"question_file_sha256": "926af2a0d1b47e5d0d15a7aa8a34d4721007f4550a881555b6a89496b54a2606",
"evaluator_sha256": "da1bbcd4530be83692d7c650c814ea9704bb710d0c953eb75d02ccb38233cf89",
"cases": [
{
"instance_id": "bird086",
"db": "card_games",
"question": "Among the Commander-leadable cards that the Card Kingdom catalog lists for both a foil printing and a regular non-foil printing \u2013 cards listed for only one of the two printings don't count \u2013 I want the single most recent card frame year (the latest calendar year among the frame versions), and the count of cards in that group whose frame version is that year. Please return just that one row: the frame year and its card count.",
"evidence": "A card 'may lead a Commander deck' if it can be the deck's commander \u2013 the one card that leads the deck and sets its color identity \u2013 not merely be included among the deck's other cards."
}
],
"db_sha256": {
"california_schools": "c0903eec662e63068fd1d14403d3d6c1d473287fc10c4356333ea58f878db983",
"card_games": "c98bdb57fe7474da798b407785544b9af0daaad5d61fd21e2a73309493bc1227",
"codebase_community": "92101be6d2a9f6adceea59d38f6d1c556087f9eea1432432a21268cb1348036d",
"debit_card_specializing": "b3d149ad05746dbbe5116e229e17e18f09c39db43cf117d9ef3441753608b691",
"european_football_2": "f72f5c9b990371417288a67b27a02e601ef904d45525c2c9f7931fb01001c536",
"financial": "d15d89cdb068a202b6f2b99342af44dffc1d52545b39ceaf62efdc0ba570101e",
"formula_1": "79770caf966707e35516fa566e24b40ae515c74ec1ec4631235245645b87b24d",
"student_club": "eb89bcfe97eefa386a27904ec5aa15159811a7eac894ec659a36e48fa9f76b77",
"superhero": "75e94a2c3236ee3bb2c01fb97a1c4b4c1c269bcefd4eab1d04be323d2d0825b1",
"thrombosis_prediction": "87583183c3dc472fba04de702965560a9d7c0a548836613f242317e0eeb83f00",
"toxicology": "4df4094208e0799d5e5f0e2b5bc5c415cf87b1208ebaf8f4c14c7af445b682c5"
},
"suite": "bird",
"development_ids": [
"bird086"
],
"holdout_ids": [],
"split_seed": 20261126
}
14 changes: 14 additions & 0 deletions bench/accuracy/experiments/sort-value-types/protocol.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"purpose": "Keep numeric ordering conversions separate from original projected values",
"source": "/Users/seyoung/workspace/benchmarks/codex-mcp-unobserved-20261127/checkpoints/004/bird",
"ids": [
"bird086"
],
"baseline_revision": "0c79539",
"model": "gpt-6.2-astra",
"reasoning_effort": "high",
"change": "One existing output-representation guidance bullet expanded. No tool, SQL execution, database or grader changes.",
"inference": "Original question/evidence/schema only; no prior answer, reference SQL/results or analyst diagnosis.",
"metric": "Selected failure repair only, not full accuracy or semantic-value correction.",
"source_record_sha256": "98c5370b6c2bf7baec7706f2e2c1d381286d898add83a34b7f89daf63c1048ca"
}
30 changes: 30 additions & 0 deletions bench/accuracy/mcp-review-results/sort-value-types/analysis.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"model": "gpt-6.2-astra/high",
"baseline_revision": "0c79539",
"current_revision": "88f3d1",
"case": "bird086",
"official_transition": [
0,
1
],
"before_native_result": [
[
2015,
820
]
],
"after_native_result": [
[
"2015",
820
]
],
"observation": "The new SQL selects original frameVersion and casts only the ORDER BY expression. It also expresses ID presence as non-empty checks; original profiling found no blank IDs.",
"scope": "One selected failure repair, not full accuracy or repeated reliability. The original94-case checkpoint stays92/94.",
"inference": "Original prompt bytes identical; only MCP output-representation instruction changed. No prior answer, references or analyst SQL supplied.",
"validation": "339passed/1skipped; scoped Ruff with pre-existing BLE001 excluded; diff checks pass.",
"limits": [
"Prompt guidance does not deterministically enforce output types.",
"This repairs representation compatibility with unchanged native-tuple grading, not an incorrect numerical business result."
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
```sql
SELECT CAST(frameVersion AS INTEGER) AS frame_year, COUNT(*) AS card_count
FROM main.cards
WHERE INSTR(leadershipSkills, '''commander'': True') > 0
AND cardKingdomFoilId IS NOT NULL
AND cardKingdomId IS NOT NULL
AND frameVersion GLOB '[0-9][0-9][0-9][0-9]'
GROUP BY frame_year
ORDER BY frame_year DESC
LIMIT 1
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{"type":"thread.started","thread_id":"01a219c9-3a0e-7282-901e-5f713b111f62"}
{"type":"turn.started"}
{"type":"item.completed","item":{"id":"item_0","type":"agent_message","text":"I’ll check the Commander eligibility and catalog fields in Lang2SQL, then execute the query and verify that it returns one row."}}
{"type":"item.started","item":{"id":"item_1","type":"mcp_tool_call","server":"lang2sql","tool":"resolve_business_terms","arguments":{"terms":[]},"result":null,"error":null,"status":"in_progress"}}
{"type":"item.completed","item":{"id":"item_1","type":"mcp_tool_call","server":"lang2sql","tool":"resolve_business_terms","arguments":{"terms":[]},"result":{"content":[{"type":"text","text":"{\"definition_check_id\": \"I7a7CChCLf6PvYvkAX9jIY-XkHVb8Ll3A4wly8ABdDg\", \"definitions\": [], \"instruction\": \"For oracle_view the operator has confirmed the contract: call run_sql with this definition_check_id, period_start and exclusive period_end, without sql. An explicit calendar year/month is sufficient to derive these dates. Ask only if the period or business meaning is actually unclear. For text definitions use SQL. Discover schema and use qualified table names before run_sql. A receipt is not proof of SQL semantic correctness.\"}"}],"structured_content":null},"error":null,"status":"completed"}}
{"type":"item.started","item":{"id":"item_2","type":"mcp_tool_call","server":"lang2sql","tool":"explore_schema","arguments":{"table":"cards"},"result":null,"error":null,"status":"in_progress"}}
{"type":"item.completed","item":{"id":"item_2","type":"mcp_tool_call","server":"lang2sql","tool":"explore_schema","arguments":{"table":"cards"},"result":{"content":[{"type":"text","text":"cards (table)\n- id: INTEGER NOT NULL\n- artist: TEXT\n- asciiName: TEXT\n- availability: TEXT\n- borderColor: TEXT\n- cardKingdomFoilId: TEXT\n- cardKingdomId: TEXT\n- colorIdentity: TEXT\n- colorIndicator: TEXT\n- colors: TEXT\n- convertedManaCost: REAL\n- duelDeck: TEXT\n- edhrecRank: INTEGER\n- faceConvertedManaCost: REAL\n- faceName: TEXT\n- flavorName: TEXT\n- flavorText: TEXT\n- frameEffects: TEXT\n- frameVersion: TEXT\n- hand: TEXT\n- hasAlternativeDeckLimit: INTEGER NOT NULL\n- hasContentWarning: INTEGER NOT NULL\n- hasFoil: INTEGER NOT NULL\n- hasNonFoil: INTEGER NOT NULL\n- isAlternative: INTEGER NOT NULL\n- isFullArt: INTEGER NOT NULL\n- isOnlineOnly: INTEGER NOT NULL\n- isOversized: INTEGER NOT NULL\n- isPromo: INTEGER NOT NULL\n- isReprint: INTEGER NOT NULL\n- isReserved: INTEGER NOT NULL\n- isStarter: INTEGER NOT NULL\n- isStorySpotlight: INTEGER NOT NULL\n- isTextless: INTEGER NOT NULL\n- isTimeshifted: INTEGER NOT NULL\n- keywords: TEXT\n- layout: TEXT\n- leadershipSkills: TEXT\n- life: TEXT\n- loyalty: TEXT\n- manaCost: TEXT\n- mcmId: TEXT\n- mcmMetaId: TEXT\n- mtgArenaId: TEXT\n- mtgjsonV4Id: TEXT\n- mtgoFoilId: TEXT\n- mtgoId: TEXT\n- multiverseId: TEXT\n- name: TEXT\n- number: TEXT\n- originalReleaseDate: TEXT\n- originalText: TEXT\n- originalType: TEXT\n- otherFaceIds: TEXT\n- power: TEXT\n- printings: TEXT\n- promoTypes: TEXT\n- purchaseUrls: TEXT\n- rarity: TEXT\n- scryfallId: TEXT\n- scryfallIllustrationId: TEXT\n- scryfallOracleId: TEXT\n- setCode: TEXT\n- side: TEXT\n- subtypes: TEXT\n- supertypes: TEXT\n- tcgplayerProductId: TEXT\n- text: TEXT\n- toughness: TEXT\n- type: TEXT\n- types: TEXT\n- uuid: TEXT NOT NULL\n- variations: TEXT\n- watermark: TEXT\nPRIMARY KEY (id)"}],"structured_content":null},"error":null,"status":"completed"}}
{"type":"item.started","item":{"id":"item_3","type":"mcp_tool_call","server":"lang2sql","tool":"run_sql","arguments":{"definition_check_id":"I7a7CChCLf6PvYvkAX9jIY-XkHVb8Ll3A4wly8ABdDg","sql":"SELECT leadershipSkills, GROUP_CONCAT(DISTINCT frameVersion) AS frames,\n COUNT(*) AS rows, COUNT(cardKingdomFoilId) AS foil_ids, COUNT(cardKingdomId) AS regular_ids,\n SUM(cardKingdomFoilId = '' OR cardKingdomId = '') AS blank_ids\nFROM main.cards\nGROUP BY leadershipSkills"},"result":null,"error":null,"status":"in_progress"}}
{"type":"item.completed","item":{"id":"item_3","type":"mcp_tool_call","server":"lang2sql","tool":"run_sql","arguments":{"definition_check_id":"I7a7CChCLf6PvYvkAX9jIY-XkHVb8Ll3A4wly8ABdDg","sql":"SELECT leadershipSkills, GROUP_CONCAT(DISTINCT frameVersion) AS frames,\n COUNT(*) AS rows, COUNT(cardKingdomFoilId) AS foil_ids, COUNT(cardKingdomId) AS regular_ids,\n SUM(cardKingdomFoilId = '' OR cardKingdomId = '') AS blank_ids\nFROM main.cards\nGROUP BY leadershipSkills"},"result":{"content":[{"type":"text","text":"6 row(s):\nResult coverage: fetched_rows=6; displayed_rows=6; fetch_truncated=false; display_truncated=false; sql_rewritten=true; query_timeout_enforced=true; query_timeout_scope=sqlite_vm. Counts refer to the executed SQL, not the source table size.\nObserved value types (displayed rows): leadershipSkills=NoneType,str; frames=str; rows=int; foil_ids=int; regular_ids=int; blank_ids=int\nleadershipSkills | frames | rows | foil_ids | regular_ids | blank_ids\n--- | --- | --- | --- | --- | ---\nNone | 2003,1993,2015,1997,future | 53072 | 26382 | 41047 | 0\n{'brawl': False, 'commander': False, 'oathbreaker': True} | 2015,2003 | 724 | 554 | 297 | 0\n{'brawl': False, 'commander': True, 'oathbreaker': False} | 2003,2015,1993,1997,future | 2660 | 1643 | 1529 | 0\n{'brawl': False, 'commander': True, 'oathbreaker': True} | 2015 | 45 | 15 | 17 | 0\n{'brawl': True, 'commander': False, 'oathbreaker': True} | 2015 | 66 | 63 | 58 | 0\n{'brawl': True, 'commander': True, 'oathbreaker': False} | 2015 | 255 | 255 | 252 | 0\nSQL: SELECT leadershipSkills, GROUP_CONCAT(DISTINCT frameVersion) AS frames,\n COUNT(*) AS rows, COUNT(cardKingdomFoilId) AS foil_ids, COUNT(cardKingdomId) AS regular_ids,\n SUM(cardKingdomFoilId = '' OR cardKingdomId = '') AS blank_ids\nFROM main.cards\nGROUP BY leadershipSkills\nLIMIT 1000"}],"structured_content":null},"error":null,"status":"completed"}}
{"type":"item.started","item":{"id":"item_4","type":"mcp_tool_call","server":"lang2sql","tool":"resolve_business_terms","arguments":{"terms":[]},"result":null,"error":null,"status":"in_progress"}}
{"type":"item.completed","item":{"id":"item_4","type":"mcp_tool_call","server":"lang2sql","tool":"resolve_business_terms","arguments":{"terms":[]},"result":{"content":[{"type":"text","text":"{\"definition_check_id\": \"lIEgyDqTh0XzcRyJrrtHdRNg-cWcxFtCWcc4uMUIylM\", \"definitions\": [], \"instruction\": \"For oracle_view the operator has confirmed the contract: call run_sql with this definition_check_id, period_start and exclusive period_end, without sql. An explicit calendar year/month is sufficient to derive these dates. Ask only if the period or business meaning is actually unclear. For text definitions use SQL. Discover schema and use qualified table names before run_sql. A receipt is not proof of SQL semantic correctness.\"}"}],"structured_content":null},"error":null,"status":"completed"}}
{"type":"item.started","item":{"id":"item_5","type":"mcp_tool_call","server":"lang2sql","tool":"run_sql","arguments":{"definition_check_id":"lIEgyDqTh0XzcRyJrrtHdRNg-cWcxFtCWcc4uMUIylM","expected_columns":["frame_year","card_count"],"sql":"SELECT CAST(frameVersion AS INTEGER) AS frame_year, COUNT(*) AS card_count\nFROM main.cards\nWHERE INSTR(leadershipSkills, '''commander'': True') > 0\n AND cardKingdomFoilId IS NOT NULL\n AND cardKingdomId IS NOT NULL\n AND frameVersion GLOB '[0-9][0-9][0-9][0-9]'\nGROUP BY frame_year\nORDER BY frame_year DESC\nLIMIT 1"},"result":null,"error":null,"status":"in_progress"}}
{"type":"item.completed","item":{"id":"item_5","type":"mcp_tool_call","server":"lang2sql","tool":"run_sql","arguments":{"definition_check_id":"lIEgyDqTh0XzcRyJrrtHdRNg-cWcxFtCWcc4uMUIylM","expected_columns":["frame_year","card_count"],"sql":"SELECT CAST(frameVersion AS INTEGER) AS frame_year, COUNT(*) AS card_count\nFROM main.cards\nWHERE INSTR(leadershipSkills, '''commander'': True') > 0\n AND cardKingdomFoilId IS NOT NULL\n AND cardKingdomId IS NOT NULL\n AND frameVersion GLOB '[0-9][0-9][0-9][0-9]'\nGROUP BY frame_year\nORDER BY frame_year DESC\nLIMIT 1"},"result":{"content":[{"type":"text","text":"1 row(s):\nOutput columns validated (projection only).\nResult coverage: fetched_rows=1; displayed_rows=1; fetch_truncated=false; display_truncated=false; sql_rewritten=false; query_timeout_enforced=true; query_timeout_scope=sqlite_vm. Counts refer to the executed SQL, not the source table size.\nObserved value types (displayed rows): frame_year=int; card_count=int\nframe_year | card_count\n--- | ---\n2015 | 820\nSQL: SELECT CAST(frameVersion AS INTEGER) AS frame_year, COUNT(*) AS card_count\nFROM main.cards\nWHERE INSTR(leadershipSkills, '''commander'': True') > 0\n AND cardKingdomFoilId IS NOT NULL\n AND cardKingdomId IS NOT NULL\n AND frameVersion GLOB '[0-9][0-9][0-9][0-9]'\nGROUP BY frame_year\nORDER BY frame_year DESC\nLIMIT 1"}],"structured_content":null},"error":null,"status":"completed"}}
{"type":"item.completed","item":{"id":"item_6","type":"agent_message","text":"```sql\nSELECT CAST(frameVersion AS INTEGER) AS frame_year, COUNT(*) AS card_count\nFROM main.cards\nWHERE INSTR(leadershipSkills, '''commander'': True') > 0\n AND cardKingdomFoilId IS NOT NULL\n AND cardKingdomId IS NOT NULL\n AND frameVersion GLOB '[0-9][0-9][0-9][0-9]'\nGROUP BY frame_year\nORDER BY frame_year DESC\nLIMIT 1\n```"}}
{"type":"turn.completed","usage":{"input_tokens":182488,"cached_input_tokens":168576,"cache_write_input_tokens":0,"output_tokens":669,"reasoning_output_tokens":0}}
Loading