Skip to content

Expose official column descriptions through the existing MCP schema cache - #361

Draft
seyoung4503 wants to merge 2 commits into
fix/benchmark-selection-countfrom
fix/mcp-official-schema-cache
Draft

seyoung4503 wants to merge 2 commits into
fix/benchmark-selection-countfrom
fix/mcp-official-schema-cache

Conversation

@seyoung4503

@seyoung4503 seyoung4503 commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Official BIRD column/value descriptions reach Codex in the initial task input, but SQLite explore_schema responses contain no descriptions. Add an opt-in --cache-official-columns benchmark condition that exposes the same pinned descriptions through the existing production schema-enrichment cache. No new definitions are inferred and no semantic terms are approved.

Each case receives a fresh, isolated SQLite metadata store, passed via the existing MCP --store option. The existing schema loader validates the pinned supplemental BIRD context before output creation or model invocation; the flag rejects the original baseline and other suites. Initial user prompt bytes, model instructions, source DB, official questions and scoring remain unchanged. The option defaults off, and the ongoing full500 validation is unaffected.

Reuse: load_schema_documents, SqliteStore, the existing enrichment _kv_key, MCP mcp_settings/--store, and ExploreSchema cache lookup. The existing description delimiter is shared with the offline builder without changing the generated map. Net +33 benchmark runtime lines, one new function for cache seeding; no production-code change. Synchronous SQLite setup runs via asyncio.to_thread; cleanup uses finally, failures propagate, and successful seeding logs the case-specific path/count. No environment variables or new deployment configuration.

Validation covers actual stdio MCP description delivery, no implicit business-definition approval, isolation from a second case's store, the runner's real argument-construction seam, rejection before inference, and original schema-map byte reproducibility. Root suite: 374 passed, 1 skipped; scoped Ruff and diff checks pass. No CODE MAP generator exists in this repository.

A prespecified failure-only experiment will compare bird093/107/148 against their completed supplemental-context attempts. These are metadata-sensitive column/filter/grain decisions, not proven cache-caused failures. No prior answers, grades or analyst hints enter inference. Same initial prompt and production source will be checked. Results, including failures, will be retained; no accuracy gain is claimed before scoring, and selected repair rates are not full benchmark accuracy.

Principle Result Evidence
Reuse O Existing pinned loader, storage/cache key, MCP options and schema tool; +33 runtime lines, one seed function.
Cause only O Missing tool-visible metadata → existing cache populated from identical supplied metadata. Causal accuracy effect remains unproven.
Logging O Case-specific cache path/count plus existing run/model/DB traces and initial-store hash.
Errors O Unsupported input fails before inference; seeding failures propagate and store closes in finally.
Environment N/A No new environment reads or variables.
Issue comments O No issue-number comments.
Verification O Root tests, actual stdio integration, scoped Ruff and diff check; no CODE MAP script exists.
Authorization O Draft PR only, no merge.
Request path O Pinned descriptions → isolated case store → MCP --store → explore_schema.
Async O One synchronous seed implementation, called through asyncio.to_thread.
Constants/deployment O Fixed format delimiter and existing benchmark identity; opt-in CLI flag, no operational env or deployment change.

Official failure-only result: 0/3 repaired. All three initial prompts are byte-identical to their baseline; production source trees are identical; persisted cache contents exactly match the pinned metadata; each trace contains schema responses with descriptions. Metadata visibility alone did not repair these cases. The option remains off by default and is not promoted as an accuracy improvement. No unchanged retry is planned. All raw traces, cache stores, results and validated comparisons are preserved under tool-schema-cache (34 verified hashes).

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