Cut five layers that cost more than they proved - #48
Merged
Conversation
The verification apparatus had grown structures that a single-maintainer, pre-1.0 plugin cannot pay for. Five of them go: Workflow-shape unit tests. test/verification-contracts.test.ts regex-parsed this repo's own YAML to assert action pins, a single `contents: write`, and that pins.mjs parsed as JavaScript. Reviewing two workflows is cheaper than maintaining a test that greps them. The compatibility config subsystem. verification/compatibility.json, a loader with shape *and* semantic validation, a test suite for that validator, and a workflow shim feeding pins into Actions — five layers around six version strings. The supported range is now two literals in src/compatibility.ts; every other pin lives with the thing it pins. The sqlc floor. Raised from v1.18.0 to v1.25.0, which deletes the bespoke test/sqlc-v1-18 corpus that existed only because v1.18 could not parse the fixtures, plus the per-version fixture branch. The matrix is now floor and ceiling: 1.25.0 and 1.31.1. The TypeScript floor. A second compiler installed under an npm alias so every type assertion ran twice, proving output compiles on TypeScript 5.2.2 (2023). Generated code is verified against a current TypeScript, once. Two of three SemVer implementations. src/semver.ts is now the only one. It parses build metadata and carries it without letting it affect precedence, so validation can accept `1.31.1+build.7` while a release tag still rejects `+build` — the two behaviours that made these separate in the first place. Net: 30 files, -445 lines, 9 deleted outright. `make verify-local` passes. sqlc 1.25.0 is confirmed working on linux/amd64, the platform its CI cell runs on; it is SIGKILLed by macOS arm64, which AGENTS.md now records. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
mkuznets
added a commit
that referenced
this pull request
Aug 15, 2026
Five pieces of the verification apparatus that cost more to maintain than they proved, removed. Net **30 files, -445 lines**, 9 deleted outright. | Removed | Replaced by | | --- | --- | | `test/verification-contracts.test.ts` — regex-parsed this repo's own workflow YAML | Reading the two workflows | | `verification/compatibility.json` + loader + validator tests + `pins.mjs` | Two literals in `src/compatibility.ts` | | sqlc floor v1.18.0 and the bespoke `test/sqlc-v1-18` corpus | Floor v1.25.0; matrix is floor + ceiling | | The `typescript-5-2` alias dependency and dual-compiler fan-out | One current TypeScript | | Two of three SemVer implementations | `src/semver.ts` | ### Notes **The SemVer merge preserves a deliberate disagreement.** `validation` accepts build metadata (`v1.31.1+build.7` is a valid sqlc version); a release tag rejects it, because `+build` would let two tags name one published artifact. The shared parser therefore parses build metadata and carries it without letting it affect precedence, leaving rejection to the release path as policy. Merging naively would also have started accepting `vv1.2.3` as a release tag — guarded, and no existing test covered it. **sqlc 1.25.0 is verified on the platform its CI cell runs on.** It generates cleanly on `linux/amd64` (checked in a container against these exact plugin bytes). It is `SIGKILL`ed on macOS arm64 — that sqlc's wasm runtime cannot execute the plugin there, the same caveat the old config recorded for 1.20/1.24. `AGENTS.md` now records it so it is not mistaken for a broken plugin. `make verify-local` passes locally: 80 unit + 27 candidate tests, drift check, miniflare, and example suites.
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.
Five pieces of the verification apparatus that cost more to maintain than they proved, removed. Net 30 files, -445 lines, 9 deleted outright.
test/verification-contracts.test.ts— regex-parsed this repo's own workflow YAMLverification/compatibility.json+ loader + validator tests +pins.mjssrc/compatibility.tstest/sqlc-v1-18corpustypescript-5-2alias dependency and dual-compiler fan-outsrc/semver.tsNotes
The SemVer merge preserves a deliberate disagreement.
validationaccepts build metadata (v1.31.1+build.7is a valid sqlc version); a release tag rejects it, because+buildwould let two tags name one published artifact. The shared parser therefore parses build metadata and carries it without letting it affect precedence, leaving rejection to the release path as policy. Merging naively would also have started acceptingvv1.2.3as a release tag — guarded, and no existing test covered it.sqlc 1.25.0 is verified on the platform its CI cell runs on. It generates cleanly on
linux/amd64(checked in a container against these exact plugin bytes). It isSIGKILLed on macOS arm64 — that sqlc's wasm runtime cannot execute the plugin there, the same caveat the old config recorded for 1.20/1.24.AGENTS.mdnow records it so it is not mistaken for a broken plugin.make verify-localpasses locally: 80 unit + 27 candidate tests, drift check, miniflare, and example suites.🤖 Generated with Claude Code