Repository navigation
Conversation
galdre
force-pushed
the
galdre/lint-9-columns
branch
from
October 30, 2026 23:23
0f91870 to
c0f7cf1
Compare
galdre
force-pushed
the
galdre/lint-parity-api-probes
branch
from
October 30, 2026 23:23
ff1f245 to
6c34413
Compare
This was referenced Nov 2, 2026
galdre
force-pushed
the
galdre/lint-9-columns
branch
from
November 2, 2026 23:49
c0f7cf1 to
6835335
Compare
galdre
force-pushed
the
galdre/lint-parity-api-probes
branch
from
November 2, 2026 23:49
6c34413 to
e85d5a8
Compare
galdre
force-pushed
the
galdre/lint-9-columns
branch
from
November 3, 2026 17:27
6835335 to
4eb366c
Compare
galdre
force-pushed
the
galdre/lint-parity-api-probes
branch
from
November 3, 2026 17:27
e85d5a8 to
f723b2a
Compare
escherize
added a commit
that referenced
this pull request
Nov 3, 2026
galdre re-cut the lint stack, so this merges galdre/lint-parity-api-probes at f723b2a rather than rebasing (no force push). - Every file outside this PR's own takes the re-cut's version. A merge would otherwise bring back 59 example files the re-cut reverted. - lint-parity.ts keeps the re-cut's changes (default-schema parsing, the missing-folder check, "compared nothing" for an empty folder) on top of the extraction into metabase-api.ts, which now uses the shared isStringArray from src/values.ts. - import.yml keeps the pinned setup-bun SHA from #41 with the corpus step's API_KEY condition. - refresh-known.ts recomputed each case's `known` against the re-cut lint. No difference grew: 8 cases now agree with Metabase (finding-44-nested-optional-clause, finding-46-mbql-null-schema, gen-11-131, gen-7-137, both self-review-2.2 cases, self-review-2.3, self-review-3.1), gen-11-107 and gen-7-18 each lose one difference, and the rest change only wording ("no error rule predicts"). 15 of 41 cases now hold a known difference, down from 23.
galdre
force-pushed
the
galdre/lint-9-columns
branch
from
November 3, 2026 19:15
4eb366c to
c887c22
Compare
galdre
force-pushed
the
galdre/lint-parity-api-probes
branch
from
November 3, 2026 19:15
f723b2a to
e74100d
Compare
escherize
approved these changes
Nov 3, 2026
galdre
force-pushed
the
galdre/lint-9-columns
branch
from
November 4, 2026 05:06
c887c22 to
44e71f8
Compare
galdre
force-pushed
the
galdre/lint-parity-api-probes
branch
from
November 4, 2026 05:06
e74100d to
4632623
Compare
galdre
force-pushed
the
galdre/lint-9-columns
branch
from
November 4, 2026 20:22
44e71f8 to
54f95fb
Compare
galdre
force-pushed
the
galdre/lint-parity-api-probes
branch
from
November 4, 2026 20:22
4632623 to
7dbe8ca
Compare
galdre
force-pushed
the
galdre/lint-9-columns
branch
from
November 4, 2026 21:32
54f95fb to
420e3cd
Compare
galdre
force-pushed
the
galdre/lint-parity-api-probes
branch
from
November 4, 2026 21:32
7dbe8ca to
625f394
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR extends the CI comparison between the lint and Metabase to three rules that Metabase's transform API enforces and an import does not:
missing-target-schema,missing-incremental-table-tagandmissing-target-database. With the new flag--probe-transforms,scripts/lint-parity.tsasks Metabase to save transforms shaped by the mutations of these rules, and compares each answer with the lint's errors on that transform. The import workflow passes the flag.What users of the package see
Nothing. The PR changes
scripts/,.github/workflows/import.ymlandsrc/test-support/lint-mutations.ts; the package ships none of them.What to review
src/test-support/lint-mutations.tsto a copy of the folder, and finds each transform the mutation changes (changedTransforms, by entity id). It sendsPOST /api/transformtwice for each such transform: once as imported, and once as mutated. Each answer must match the lint's errors on that transform, in the folder or in the mutated copy. A mutation that changes no transform fails, and so does a rule for which no answer was compared.GET /api/transform/:idreturns, whose query the import has already resolved. From the file it takes the target's type, schema and database, and the source's incremental strategy. A mutation that changes any other part of the transform fails the probe. The script resolves a database byGET /api/database, and a checkpoint field byGET /api/database/:id/metadata, once per database.lint_parity_probe, which no transform of the folder writes. Metabase refuses, with 409, a target table the warehouse already holds.target-incremental-strategy: {type: append}, because the API requires one and a transform file need not give it.RULE_OF_TRANSFORM_REFUSALinscripts/parity.ts), and a message no rule predicts fails. Metabase stops at its first refusal, in the order ofTRANSFORM_RULE_ORDER, so the lint's errors on later rules are not compared. A 200 is an acceptance, and the script deletes the transform it created; a deletion that does not answer 204 fails. A 402 (feature not licensed) is skipped. Any other answer fails.enset at setup.mutateExamplestakes an optional source folder; the mutations still edit files by their path inexamples/v1, so--foldermust beexamples/v1or a copy of it. The usage line says so.How it was checked
scripts/lint-parity.test.tsruns the script against a local stand-in for Metabase. The stand-in answersPOST /api/transformwith the checks the probes reach, in Metabase's order: the target database exists, the checkpoint field exists, the warehouse holds no table of the target's name (409), the target names a schema on a database with schemas, and an incremental native query has a table template tag for the checkpoint field's table, or any table template tag when no checkpoint field is set. The warehouse holds the target of each example transform, so a probe that wrote to its transform's own target would get 409. The tests cover agreement (and that every transform the script creates is deleted), a refusal the lint does not predict, an acceptance the lint calls an error, a probe Metabase does not answer, a failed field lookup, a blank target schema, findings on another transform, a table tag for another table than the checkpoint field's and for the same table, a mutation that changes no transform, a mutation that changes a transform beyond what a probe carries, a folder the mutation cannot take, a skipped 402, andmutateExampleswith a source folder.scripts/parity.test.tscheckstransformVerdictDiffers, the order of checks included, andchangedTransforms, which tells a change the probe carries from one it does not.bun install --frozen-lockfile,bun run type-check,lint-eslint,lint-format,buildandvalidate-schemapass, and so doesCI=true bun test --timeout 2800.src/index.ts, the main entry, is unchanged frommain. The built main entry has nolint;experimental.jshas it.lint --experimentalonexamples/v1prints113 files, 0 errors, 0 warningsand exits 0, andlintwithout the flag exits 2.Base:
galdre/lint-9-columns. Last branch of the stack.