Skip to content

Story 19.4 — BI-tool emitted-SQL capture: CapturedSqlProbe (layer-2 parser verdicts for the R2a MINIMUM set) #254

Description

@fupelaqu

Epic 19 (R2a function-library audit) — Story 19.4: capture the SQL that real BI tools actually put on the wire against SoftClient4ES, at a falsified seam, verbatim, and intersect it with 19.1's census (#248) to derive R2a's MINIMUM function set.

What ships in the repo

One main-bearing test source (deliberately NOT a ScalaTest suite — its input is a gitignored capture artefact, so a suite would either pass vacuously or stay permanently red):

  • sql/src/test/scala/app/softnetwork/elastic/sql/census/CapturedSqlProbe.scala — layer 2 of the two-layer extraction: reads the corpus CSV (RFC-4180, explicit UTF-8), runs the real Parser on every captured statement (Throwable-guarded — Parser.apply can throw ValidationError instead of returning Left on parenthesized WHERE clauses #250), emits per-row verdicts, debound re-parses for ?-bearing rows, census-id resolution (census_ids_for, form-level where decidable, ALL candidates token-level otherwise — the inflating, safe direction), and the unmatched_spellings scan backed by the real SQLKeywords registry. Run via sbt "sql/Test/runMain …"; sbt "sql/test" does not collect it (verified: 532/532, count unchanged).

Everything else (capture logs, pipeline scripts, corpora, deliverable) is local-only under the gitignored _bmad-output/ tree by design.

Result highlights (full deliverable: _bmad-output/planning-artifacts/epic-19-bi-emitted-sql-corpus.md)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions