Skip to content

🔧 chore(dev): pin the local dev toolchain with mise - #348

Merged
konih merged 3 commits into
mainfrom
lane/dev-mise-01
Aug 31, 2026
Merged

konih merged 3 commits into
mainfrom
lane/dev-mise-01

Conversation

@konih

@konih konih commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

What

Adds a committed mise.toml at the repository root so a contributor's local toolchain matches
the versions CI actually installs, plus a short section in docs/development/setup.md.

Traceability — every pin maps to a real pin in this repo

Tool mise.toml Source of truth in this repo
Go not in [tools] — read from go.mod via idiomatic_version_file_enable_tools = ["go"] go.mod:3 (go 1.26.6), consumed by .github/actions/go-cache/action.yml:16-18 (go-version-file: go.mod), which every Go job in ci.yaml uses — including the required test and kind-smoke checks. release.yaml:146 / docs.yaml:114 use go-version-file: go.mod directly.
Task 3.51.1 go-task/setup-task version: 3.51.1 — all 17 occurrences across ci.yaml, docs.yaml, preflight.yaml, changelog-sync.yaml, sonarcloud.yaml, e2e-nightly.yaml agree.
Node 22 node-version: "22" — docs.yaml:106 and preflight.yaml:37.
Python 3.12 python-version: "3.12" — docs.yaml:118.

Go is deliberately not restated as a literal. mise reads go.mod directly, so the two
structurally cannot drift — the same mechanism CI uses. If a future mise ignored that setting,
Go simply becomes unmanaged by mise; it can never become mis-pinned.

Deliberately excluded

No second source of truth is created for anything that already has one:

  • Makefile-pinned and installed into bin/: kustomize (v5.8.1), controller-gen (v0.20.1),
    operator-sdk (v1.42.3), golangci-lint (v2.11.4), and the computed ENVTEST_VERSION.
  • hack/install-*.sh / Taskfile-fetched: shellcheck, helm (v3.21.4), helm-docs (v1.14.2),
    git-cliff (v2.13.1), gitleaks, polaris, kubeaudit.
  • kind — pinned in hack/kind/common.sh (KIND_VERSION).

Notes

  • mise.toml sets no environment variables, so it cannot conflict with the existing direnv
    .envrc setup. .envrc was not read, modified or committed.
  • mise trust is required for the config (including its [settings] block) to apply at all —
    documented.
  • mise.toml is not matched by .gitignore and is not in the CI paths-ignore list, so this PR
    triggers CI and the required test / kind-smoke checks report.

Add a committed mise.toml at the repository root so a contributor's local
toolchain matches the versions CI actually installs.

Go is deliberately NOT listed under [tools]: idiomatic_version_file_enable_tools
makes mise read the version straight out of go.mod, which is exactly what
.github/actions/go-cache/action.yml does via actions/setup-go's
go-version-file. Restating the number here would drift on the next Go bump.

task (3.51.1), node (22) and python (3.12) mirror the setup-task, setup-node
and setup-python pins in .github/workflows/. The Makefile-managed Go tools
(kustomize, controller-gen, setup-envtest, operator-sdk, golangci-lint) and the
hack/install-*.sh tools are deliberately absent: they already have exactly one
source of truth each, and duplicating them here would create a second one.

Documented in docs/development/setup.md, which states that CI remains the
source of truth for every version.
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

konih added 2 commits August 31, 2026 13:15
The mise.toml literals had no mechanism binding them to CI. renovate.json's own
comment records that failure mode -- "they land in different groups and drift
apart -- which is exactly how release.yaml reached v3.21.4 while CI stayed on
v3.17.3" -- and two live vectors applied here: Renovate's go-task customManager
scans only .github/(actions|workflows)/, so a setup-task bump would leave
mise.toml behind; and no manager at all touches the node-version/python-version
inputs while Renovate's mise manager does understand core node/python, so
mise.toml could equally run AHEAD of CI.

Add hack/test/dev_mise_pin_drift_test.sh: it compares mise.toml's task/node/
python against every setup-task/setup-node/setup-python pin under .github/
(workflows and composite actions, so CI disagreeing with itself also reds), and
locks the Go arrangement -- go absent from [tools], the idiomatic setting
present, go.mod still carrying a go line. A go entry under [tools] would win
over go.mod and reintroduce the drift the design removed.

Every extraction is guarded against finding nothing; an empty scan set is a hard
failure, not a quiet pass. The self-test proves both directions on throwaway
trees each run, including that each vacuity guard fires.

Wired into the ci.yaml lint job next to the sibling meta-tests, and the gate
asserts its own wiring so dropping the step reds rather than silently disarming.

renovate.json now moves the mise.toml task pin in the same PR as the workflow
bump (same file-pattern manager, same depName, so the existing 'pinned build
tools' group covers both) and disables Renovate's mise manager so this file can
never be bumped ahead of CI independently. The gate is the fail-closed backstop
if any of that stops matching.

Also ignore mise.local.toml / .mise.local.toml -- mise's personal-override files
and the natural place a contributor would put an [env] block next to .envrc --
and correct the mise.toml comment attributing the git-cliff and helm-docs pins:
those live in Taskfile.yml vars, not in the hack/install-*.sh scripts, which
take the version as an argument.
Renovate compiles matchStrings against whole-file content without the multiline
flag, so `^`/`$` anchor to the start and end of the file, not of a line --
the pattern matched nothing. Every sibling manager in this config establishes
context with literal \n instead of anchors; follow that.

Verified against the real mise.toml content: the anchored form returns NO MATCH,
the newline-anchored form captures 3.51.1, and `task = "` appears nowhere else
in the files this manager scans, so there is nothing for it to collide with.
@sonarqubecloud

Copy link
Copy Markdown

@konih
konih merged commit 785f999 into main Aug 31, 2026
34 checks passed
@konih
konih deleted the lane/dev-mise-01 branch August 31, 2026 11:43
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