Repository navigation
Conversation
lint exited 1 for both a statement pg-sprite would refuse and a missing or unparsable file, so a CI gate could not tell a refused script from a broken job. Error findings now exit 2 like every other refusal; a clean file says so.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
🤖 Review 1/2 (correctness) of 1c0dd9c: 0 blocking, 1 non-blocking. Inspected the whole change at The change does what it says, and the three properties a scripted caller leans on hold:
Invariants ( Non-blocking
Test case: a refused desired file in text mode does not print the clean summaryfunc TestLintDesiredRefusalDoesNotPrintTheCleanSummary(t *testing.T) {
var out strings.Builder
err := (&LintCmd{Desired: true}).runLint(strings.NewReader("CREATE DOMAIN account_email AS text;"), &out)
require.ErrorIs(t, err, verdict.ErrRefused)
assert.NotContains(t, out.String(), "no findings")
}Passes on Verified
This review was generated by Claude Code (claude-sonnet-5-5). |
|
🤖 Review 2/2 (OSS adoption and integration) of 1c0dd9c: 0 blocking, 3 non-blocking. Read the change from two seats: a CI author who gates a pipeline on Non-blocking
What reads well for adopters
This review was generated by Claude Code (claude-sonnet-5-5). |
aparajon
left a comment
There was a problem hiding this comment.
🤖 Stamping with comments: 0 blocking, 4 non-blocking (see the review comments above).
This stamp was left by Claude Code (claude-sonnet-5-5).
pg-sprite lintnow exits 2 when a script holds a statement pg-sprite would refuse, keeps exit 1 for a missing or unparsable file, and prints a summary for a clean file instead of nothing.Why
lintchecks a DDL script offline, so teams run it as a CI gate before a schema change reaches a database. It exited 1 both when a statement in the script was one pg-sprite would refuse and when the file was missing or not valid SQL, so a gate could not tell "fix your DDL" from "your job is broken", while every other command already exits 2 for a refusal. This changes the CLI exit-code contract forlint: a gate that checks for exactly 1 on a refused script must now check for 2 (gating on any non-zero status is unaffected). A clean file also printed nothing, which reads the same as a run that checked nothing.What
verdict.ErrRefused(still wrappingErrLintFindings), solintexits 2 with the report and no extra error line; read, parse, and usage failures keep exit 1, matchingmigratefor a statement that does not parse.lint --desiredfile, prints thelint:summary<file> — no findings;--jsonkeeps printing the empty report.lint --desiredkeeps exit 2 for a refused file.docs/cli-output-examples.md#exit-codes(plus refused and clean lint examples),docs/cli.md,docs/lint-report.md, and the reference doc's "Lint exit" column coverlint.demo/tour.shasserts exit 2 forlint risky.sql.Before / after
Only the refused script's exit code and the clean file's output change; a missing file stays exit 1 with the error on stderr, and the refused report itself is unchanged.