You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
- add one package-owned relation dialect runtime for PostgreSQL, DuckDB,
BigQuery, and Dremio
- unify identifier decoding, CTE equality/prefix rules, query-path
decoding, role-aware rendering, reserved words, and CTE/query recognizer
policy
- authenticate each runtime through the opaque built-in dialect handle
while keeping callbacks private
- add hostile-input bounds and fail-closed behavior, exact dialect
corpora, production-backed recognizer tests, and bundle budgets
## Correctness and performance
- changed production coverage: 97.10% statements, 96.18% branches, 100%
functions, 97.05% lines
- exact packed core: 15,028 gzip / 47,141 raw bytes under 16 KiB / 52
KiB limits
- exact packed worker output: 125,937 gzip / 572,982 raw bytes under 128
KiB / 570 KiB limits
- comparator hot paths use bounded allocation-free ASCII loops; private
path scratch arrays are not copied or frozen
## Verification
- 1,646 tests passed, 1 governed expected failure
- all five TypeScript configurations passed
- oxlint and test-integrity checks passed
- browser suite passed in Chromium
- exact tarball package smoke and SSR import passed
- worker placement, strict CSP, lazy loading, and parser isolation
passed
- query-site and CTE benchmarks passed
- exact head 6e80f2f approved
independently by three adversarial reviewers
Part of #169.
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Unifies the relation dialect runtime across PostgreSQL, DuckDB,
BigQuery, and Dremio with a single, package-owned policy for
identifiers, CTEs, query paths, and role-aware rendering. Tightens the
public API and enforces strict size budgets and hostile-input
boundaries. Part of #169.
- **New Features**
- Added a unified `relation-dialect` runtime for completion, CTE layout,
query-site policy, reserved words, and rendering across all built-ins.
- Introduced fail-closed decoding with hostile-input bounds and exact
corpora; added adversarial/production-backed tests.
- Enforced bundle budgets (core ≤16 KiB gzip/52 KiB raw; worker ≤128 KiB
gzip/570 KiB raw) and a smoke check to prevent dialect policy leaks.
- **Refactors**
- Public dialect handles (`bigQueryDialect()`, `dremioDialect()`,
`duckdbDialect()`, `postgresDialect()`) now expose only `displayName`
and `id`; callbacks are private and authenticated in `session`.
- Migrated `cte-layout` and `query-site` to `..._SQL_RELATION_DIALECT`
constants; added `MAX_CTE_QUOTED_IDENTIFIER_LENGTH`.
- Simplified and hardened tests by removing ad-hoc dialects; updated
worker placement and docs to report core/worker sizes.
<sup>Written for commit 6e80f2f.
Summary will update on new commits.</sup>
<a
href="https://cubic.dev/pr/marimo-team/codemirror-sql/pull/189?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
0 commit comments