Skip to content

Commit dd391ce

Browse files
os-warrenclaude
andauthored
fix(devx): give the driver-conformance census a dialect axis (#12134)
* fix(devx): give the driver-conformance census a dialect axis The census scored `driver x case-set` and reported 45 covered cells before and after a change whose entire content was "this conformance suite went from executing on one dialect to executing on three". ADR-0053 D-A3 declares the matrix with a third axis -- `driver {SQLite, Postgres at minimum}` -- enforced only from inside a suite, by opt-in routing through live-dialect-matrix.testkit and by OS_EXPECT_LIVE_DIALECT_MATRIX=1. Both fire only for a file that already opted in, so a suite hard-coding `client: 'better-sqlite3'` was invisible to every gate in the repo while counting as a covered cell. Measured cost, not hypothetical: sql-driver-aggregation-conformance.test.ts was green on main and on every PR; on live PG 16.13 sum/avg/min/max over a boolean column threw SQLSTATE 42883. DIALECTED is the new invariant. It asserts that a conformance suite SAYS which dialects it runs on -- not that the answer is good enough, which is a different decision. The population is defined by the presence of a DECLARATION, never by the absence of a client literal, so moving the config into a helper cannot respell a suite out of the gate's reach. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6HFzyH98W1YaQXhJUJt6o * fix(devx): hold the dialect table's columns on a red run The UNDECLARED glyph is four characters wider than the others, so the run where the table is most worth reading was the one where its columns broke. Found by the ablation, which is the only run that produces that glyph. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6HFzyH98W1YaQXhJUJt6o * refactor(devx): read the dialect stance through the shared comment mask The first cut of this axis carried its own stripComments. That is the exact anti-pattern scripts/js-comment-mask.mjs was written to delete: every source-scanning gate used to answer "comment or code" privately, and the copies drifted into two silent families -- a naive regex that opens a phantom comment on a `/*` inside a string, and a string-aware scanner that opens a phantom string on a quote inside a regex character class. The shared module is validated against @typescript-eslint/parser over the whole tree by check-comment-mask-corpus.mjs in CI; a private copy is validated by whatever its author thought of. stripComments is the documented projection for this caller: it feeds a scanner and reports neither a line number nor a byte offset. The census output is byte-identical across the swap, so this is a change of provenance and not of measurement. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6HFzyH98W1YaQXhJUJt6o --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 84de7e3 commit dd391ce

1 file changed

Lines changed: 637 additions & 17 deletions

File tree

0 commit comments

Comments
 (0)