beads/.github/workflows
Julian Knutsen cff62bd631
Make the pre-commit lint gate trustworthy, and stop one main-side lint word from reddening every PR (#5538)
* fix(githooks): build golangci-lint with the repo's Go, not golangci-lint's

The pre-commit hook ran `go run golangci-lint@v2.10.1`. For a pkg@version
build the go command honours the TARGET module's toolchain directive, so
GOTOOLCHAIN=auto downgraded to go1.25.12 — and golangci-lint built by
go1.25 refuses this repo's `go 1.26.5` at config load:

    go: github.com/golangci/golangci-lint/v2@v2.10.1 requires go >= 1.25.0; switching to go1.25.12
    Error: can't load config: the Go language version (go1.25) used to build golangci-lint is lower than the targeted Go version (1.26.5)

Every Go commit failed there, so the hook taught six-plus contributors to
reach for --no-verify — the one habit a lint gate must never train.

CI never hit it because actions/setup-go installs the go.mod version and
exports GOTOOLCHAIN=local, so its `go install ...@v2.10.1` compiles the
linter with go1.26.5. Pinning GOTOOLCHAIN to the go directive reproduces
that resolution on any host, including one whose base toolchain is older
than the repo's target (where a bare GOTOOLCHAIN=local would pin the
linter to that older toolchain instead).

Verified on a real staged Go change: red before with the message above,
`0 issues.` after, and still exit 1 on a planted errcheck violation.

Bead: ga-2ltro.13

* ci: lint PRs for what they introduce, sweep the whole tree on main

Both PR lint gates linted the whole tree: the `lint` job left
only-new-issues at its false default, and pr-lint-wrapper ran
`make ci-pr-lint` over ./... . So a single lint word landing on main —
twice this wave, once a prose misspell — turned EVERY open PR red for a
change it did not make, and each author had to either fix someone else's
line or wait.

The tradeoff, recorded beside the job: a pre-existing issue in untouched
code no longer blocks a PR, and because "new" is measured off the diff, a
violation carried in by a MOVE or a rename does. What it buys is that a
main-side word now reds main's own run, where it belongs. main.yml
already runs both jobs unscoped on every push, so whole-tree coverage —
including the GOOS=windows cross-lint — is unchanged; only its blast
radius moves.

The wrapper takes its scope from BD_LINT_NEW_FROM_MERGE_BASE, set only
by pr.yml, so `make ci-pr-lint` run by hand still sweeps the tree. That
makes the local wrapper STRICTER than the PR gate rather than equal to
it, which is what LINTING.md and CI_CLEANUP_PLAN.md said before and no
longer would: both now state the two-lane contract and say the local
run's extra strictness is deliberate. Their freshness markers move with
the workflow and wrapper files they are pinned to.

Bead: ga-uwix0.2

---------

Co-authored-by: Julian Knutsen <ci@beads.test>
2026-08-10 04:55:55 -07:00
..
ci-measurements.yml chore(deps): bump the actions group with 5 updates 2026-08-07 20:49:50 +00:00
conformance.yml ci: give conformance explicit timeout budgets (#5073) 2026-07-28 09:01:39 -07:00
cross-version-smoke.yml build(deps): bump the actions group across 1 directory with 3 updates (#5059) 2026-07-25 19:05:02 -07:00
deploy-pages-redirect.yml build(deps): bump actions/checkout from 7.0.0 to 7.0.1 (#5016) 2026-07-25 08:52:22 -07:00
docs-autofix.yml build(deps): bump actions/checkout from 7.0.0 to 7.0.1 (#5016) 2026-07-25 08:52:22 -07:00
docs-mintlify.yml build(deps): bump the actions group across 1 directory with 3 updates (#5059) 2026-07-25 19:05:02 -07:00
main.yml Make the pre-commit lint gate trustworthy, and stop one main-side lint word from reddening every PR (#5538) 2026-08-10 04:55:55 -07:00
migration-test.yml Guard and qualify historical upgrades to v1.2 (#4907) 2026-08-06 18:45:04 -07:00
nightly.yml build(deps): bump the actions group across 1 directory with 3 updates (#5059) 2026-07-25 19:05:02 -07:00
nix-build.yml chore(deps): bump the actions group with 5 updates 2026-08-07 20:49:50 +00:00
pr-risk.yml chore(deps): bump the actions group with 5 updates 2026-08-07 20:49:50 +00:00
pr.yml Make the pre-commit lint gate trustworthy, and stop one main-side lint word from reddening every PR (#5538) 2026-08-10 04:55:55 -07:00
proxied-local-smoke.yml fix(dbproxy): verified identity for the managed proxied-server lifecycle (adoption, cleanup, kills) (#5013) 2026-07-26 12:52:51 -07:00
regression.yml ci: retry Dolt image pulls (bd-m0o1z) (#5228) 2026-08-01 08:18:41 -07:00
release.yml chore(deps): bump the actions group with 5 updates 2026-08-07 20:49:50 +00:00
test-pypi.yml build(deps): bump the actions group across 1 directory with 3 updates (#5059) 2026-07-25 19:05:02 -07:00
update-flake-lock.yml chore(deps): bump the actions group with 5 updates 2026-08-07 20:49:50 +00:00
update-vendor-hash.yml chore(deps): bump the actions group with 5 updates 2026-08-07 20:49:50 +00:00