Skip to content

Share session options, budget and schema parser; playground production items - #73

Closed
kvlonge wants to merge 2 commits into
mainfrom
land/r2
Closed

kvlonge wants to merge 2 commits into
mainfrom
land/r2

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Two commits:

  • Share session options, the conversion budget and the schema parser. The policy and session option modules move from sqlquack::analysis into sqlquack-rules::session; within_budget moves into sqlquack-rules::conversion; the schema-file parser moves into sqlquack-semantics as types::main::parse_schema; Policy implements FromStr. Behaviour is unchanged; callers change only their imports. sqlquack-syntax is untouched.
  • Playground: worker, policy and session, budget, self-hosted DuckDB-WASM. Website-only, plus website.yml gaining pull-request and manual runs that build and test the engine (never on push to main, never deploys).

So that the browser playground can reuse them rather than copy them:

- The policy and session option modules move from the sqlquack crate's
  analysis into sqlquack-rules::session (conversion_options,
  confirm_utc_session, session_conversion_options, parse_session and the
  profile matching), and BUILTIN_PROFILE moves with them.
- within_budget moves into sqlquack-rules::conversion.
- The schema-file parser moves into sqlquack-semantics as
  types::main::parse_schema, with SchemaError and DECLARABLE_OFFSETS; the
  CLI's load_schema reads the file and calls it.
- Policy implements FromStr, validating text as load_policy does a file.

Behaviour is unchanged; callers change only their imports.
- The engine runs in a Web Worker; stale replies are dropped.
- Spans index by code point, tested with non-ASCII text before a span.
- The page takes a policy file, Snowflake session parameters, --strict
  and --utc-session, through the shared session options, and reports the
  matched profile; the schema is read by the shared parse_schema.
- Conversion is timed with performance.now against the policy's budget.
- DuckDB-WASM 1.33.1-dev114.0 (DuckDB 2.0) is copied from node_modules at
  build time and served from the site.
- The Website workflow also lints, builds and tests the engine, on pull
  requests and by hand; it never runs on push to main and never deploys.

kvlonge commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Landed on main by fast-forward as 53ea383a (e0c4d70..53ea383).

  • Gate: make check-merge RECORDER=0 on the exact head 53ea383: exit code 0.
  • Public-repository hygiene scan on the same head: exit code 0.

kvlonge commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Closing: this head is on main by fast-forward (see the landing comment above); GitHub did not mark it merged.

@kvlonge kvlonge closed this Nov 5, 2026
@kvlonge
kvlonge deleted the land/r2 branch November 9, 2026 21:32
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