Skip to content

Fix trailing MSSQL GO batch separators - #69

Merged
melonamin merged 2 commits into
pondpilot:masterfrom
dvasdekis:fix/issue-68-mssql-go-batches
Sep 24, 2026
Merged

melonamin merged 2 commits into
pondpilot:masterfrom
dvasdekis:fix/issue-68-mssql-go-batches

Conversation

@dvasdekis

@dvasdekis dvasdekis commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Addresses #68. The MSSQL GO splitter left a trailing separator as a standalone SQL range when it overlapped a semicolon-delimited range. The parser then reported PARSE_ERROR for a valid batch script.

The splitter now clips overlapping GO lines to each statement range. Intermediate, repeated, leading, and trailing separators remain batch boundaries.

Changes

  • Cover trailing, repeated, case-insensitive, CRLF, and leading GO separators, plus GO inside strings, comments, and bracket-quoted identifiers.
  • Verify best-effort parsing reports only invalid SQL when GO separates batches.
  • Verify the native CLI handles two files with trailing GO, preserving source names, statement indexes, and spans.
  • Test the native WASM API and the generated browser WASM artifact.
  • Fix the browser harness string escaping so its MSSQL case executes.
  • Rebuild the optimized WASM binary included in the repository.
  • Document the fix in the unreleased changelog.

Validation

  • just check passed, including Rust and TypeScript tests, lint, formatting, typechecks, and schema checks.
  • cargo test -p flowscope-core mssql_ --locked passed.
  • cargo test -p flowscope-cli --test mssql_go_cli --locked passed.
  • cargo test -p flowscope-wasm --test analysis --locked passed.
  • just build-wasm passed. The browser harness passed against the optimized WASM artifact: two MSSQL statements, no PARSE_ERROR.
  • A locally packed and installed @pondpilot/flowscope-core tarball passed the reproduction from Release and verify MSSQL GO batch support in the published npm/WASM package #68: two statements, no PARSE_ERROR.

The CI workflow builds WASM but does not currently invoke the browser harness. Adding that CI step requires a GitHub token with workflow scope.

Publishing and checking the upstream npm package remain part of #68.

@dvasdekis
dvasdekis marked this pull request as ready for review September 1, 2026 04:49
@codecov

codecov Bot commented Sep 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@melonamin
melonamin merged commit 077a79f into pondpilot:master Sep 24, 2026
9 checks passed
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.

2 participants