Skip to content

fix(lint): the gate's verdict — file-isolated JSON, no silent pass - #321

Merged
David-Noble-at-work merged 2 commits into
developfrom
fix/lint-gate-verdict
Aug 4, 2026
Merged

David-Noble-at-work merged 2 commits into
developfrom
fix/lint-gate-verdict

Conversation

@David-Noble-at-work

Copy link
Copy Markdown
Contributor

The next-steps item 1 investigation: CI's lint gate could not fail. Three layers — the gate runs star lint go; the provider asked for JSON on a stdout it shares with the config's text format and the v2 stats footer; and the unparseable stream was silently ignored into a pass. Fixed by writing the report to a dedicated file and making a missing/unparseable report a hard error. Live-verified both ways (planted findings → exit 1 with the correct verdict; clean → exit 0). Second commit carries the two follow-on rulings: make lint joins quality-gate as belt-and-suspenders, and star's root sets SilenceUsage so failing verdicts print without the usage block. Plan: docs/plans/lint-gate-verdict.md.

David Noble added 2 commits August 4, 2026 13:07
CI's quality-gate passed PR #319 with eleven findings because its
"Lint Go" step (./build/star lint go) could not fail: the provider
asked golangci-lint for JSON on stdout, the repo config's text format
and the v2 stats footer pollute that stream, and runGolangciLint
silently ignored the resulting parse failure — zero issues, verdict
passes, every run green regardless of reality.

runGolangciLint now writes the JSON report to a dedicated temp file so
no stdout format can pollute it, captures stderr separately, and
treats a missing or unparseable report as a hard error naming the
stderr — never a pass. Verified live: a probe package with two planted
findings fails the gate with the script's own verdict (exit 1); a
clean package passes. The .star command and the exit-code path were
correct throughout.

Two follow-on rulings noted in the plan doc: adding make lint to
quality-gate as belt-and-suspenders, and cobra's usage-block noise
under a ui.fail verdict.

Full-config lint zero; make vet and full make test green; gofmt clean.
Plan: docs/plans/lint-gate-verdict.md.
…oise

Both follow-on rulings from the gate incident, ruled 2026-08-04.
quality-gate gains "Lint Go (direct)" running make lint alongside the
dogfooded star path, so a future regression in star's own reporting
pipeline cannot silently re-open the gate. star's root command sets
SilenceUsage: a failing verdict (a ui.fail in a .star script, a lint
gate saying no) prints only the error — verified live, exit 1 with no
usage block — while unknown subcommands still show help, which is a
genuine usage situation.
@David-Noble-at-work David-Noble-at-work self-assigned this Aug 4, 2026
@David-Noble-at-work
David-Noble-at-work merged commit 3e0974f into develop Aug 4, 2026
1 of 2 checks passed
@David-Noble-at-work
David-Noble-at-work deleted the fix/lint-gate-verdict branch August 4, 2026 20:20
David-Noble-at-work added a commit that referenced this pull request Aug 4, 2026
…322)

The honest gate's first catch, on PR #321 itself: unconvert flags
uint64(stat.Dev) under Linux build tags, where Dev is already uint64.
On Darwin Dev is int32 and the conversion is required, so removal would
break the build; the suppression gains unconvert with the platform
reason. Verified zero findings under both GOOS values. The fallout
record — including the two process failures that let a red PR merge —
is in docs/plans/lint-gate-verdict.md.

Co-authored-by: David Noble <[email protected]>
David-Noble-at-work added a commit that referenced this pull request Aug 7, 2026
The session ledger made durable: eleven closed items (PRs #321-#330,
ops #125/#126) recorded with their plan docs, and the two open items
front and center — item 10, the 2.8 diagnose-sweep (blocked on the
diagnostics API; 30 diagnose-ignored-error markers form the
work-list) and item 11, the single codec (owner-authored design; the
requirements ledger and unlegislated corners linked). The plan closes
when 10 and 11 do.

Co-authored-by: David Noble <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant