Story 19.4 — BI-tool emitted-SQL capture: CapturedSqlProbe (layer-2 parser verdicts for the R2a MINIMUM set) - #255
Merged
Merged
Conversation
… the BI emitted-SQL corpus (R2a MINIMUM set) A main-bearing Test/runMain object (deliberately not a ScalaTest suite: its input is a gitignored capture artefact — a suite would pass vacuously or stay permanently red). Reads the BI corpus CSV (RFC-4180, explicit UTF-8), runs the real Parser on every captured statement (Throwable-guarded, #250), emits verdicts + debound re-parses + census-id resolution (form-level where a measured discriminator decides, ALL candidates token-level otherwise — T4) + the unmatched-spellings scan backed by the real SQLKeywords registry. Self-checked resolver/splitter/codec on every run. sbt "sql/test" does not collect it (532/532 unchanged). Corpus results (local-only artefacts): 99 statements / 2 tools / 2 venues, MINIMUM = 49 census rows (17 form / 32 token_only), OQ-4 dialect symmetric difference = 25 ids. Product issues filed during capture: jdbc#32-#35, arrow#166-#169, SoftClient4ES#251-#253. Closed Issue #254 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
fupelaqu
marked this pull request as ready for review
September 1, 2026 13:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Story:
_bmad-output/implementation-artifacts/19-4-bi-emitted-sql-capture.md(Epic 19 — R2a function-library audit, Layer 1).Closes #254
What this PR adds (one tracked source, by design)
sql/src/test/scala/app/softnetwork/elastic/sql/census/CapturedSqlProbe.scala— layer 2 of the BI emitted-SQL extraction: amain-bearingTest/runMainobject, deliberately NOT a ScalaTest suite (its input is a gitignored capture artefact that does not exist on a clean checkout — a suite would either pass vacuously viaassumeor leavesql/testpermanently red). It reads the corpus CSV (RFC-4180, explicit UTF-8), runs the realParseron every captured statement (Throwable-guarded — #250 can throw instead ofLeft), and emits per-row verdicts, debound re-parses for?-bearing rows, census-id resolution (form-level where a measured discriminator decides; ALL candidates of the token otherwise — the inflating, safe direction), and anunmatched_spellingsscan backed by the realSQLKeywordsregistry. A resolver/splitter/codec self-check runs before every probe.Verified: cross-compiles on 2.12.20 + 2.13.16;
sbt "sql/test"stays 532/532 and does not collect the probe; scalafmt clean; bareheaderCheckunaffected (Apache-2.0 header copied fromSQLKeywordsSpec).Investigation results (artefacts are local-only under gitignored
_bmad-output/, per the epic's design)spelling∪aliases, keyed on 19.1's censusid(Authoritative source-derived dialect census with anti-drift guards (R2a function-library audit) #248)."schema"."table"), see Identifier quoting coverage: backticks rejected in every position; double-quoted table names unparseable in FROM #252;SELECT 1health checks abort flows, see Support FROM-less SELECT of literal expressions — SELECT 1 is the connection/health idiom of Tableau and Superset and is rejected #251.Findings — 10 product issues filed during capture (lead-approved) + 1 amendment
elasticsearch, schema = cluster name — homogeneous with story 1.2's pinnedCatalogName), #35 (misleadingError parsing schema DDL statement:prefix)ELASTIC_HOST, docs sayES_HOST)🤖 Generated with Claude Code