fix: match golang depType in Renovate preset for go directive updates#416
fix: match golang depType in Renovate preset for go directive updates#416marcusburghardt wants to merge 1 commit into
Conversation
The go-toolchain-patches.json preset only matched depType 'toolchain', which targets the 'toolchain' directive in go.mod. None of the org repositories include that directive — they only use the 'go' directive, which Renovate classifies as depType 'golang'. Add 'golang' alongside 'toolchain' in matchDepTypes for both the re-enable and suppress rules so Renovate creates patch-bump PRs for the go directive while remaining forward-compatible with repos that add a toolchain directive in the future. Assisted-by: OpenCode (claude-opus-4-6) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
trevor-vaughan
left a comment
There was a problem hiding this comment.
LLM Assisted Review
I would recommend fixing the following so that we don't run into the same issue later before closing out this PR.
Code Review — PR #416
The code change is correct. Adding "golang" alongside "toolchain" in both matchDepTypes arrays fixes the silent no-op and maintains the patch-only invariant through rule ordering. The ci_renovate.yml jq filter (line 98) already references depType == "golang", confirming this was the intended depType all along.
No correctness bugs found. Seven documentation consistency findings below.
Finding 1 — docs/RENOVATE_GO_TOOLCHAIN.md:110 (medium)
The manual testing command still uses matchDepTypes:["toolchain"]. A developer copy-pasting it will reproduce the exact silent failure this PR fixes — zero matches, zero PRs, "everything up to date."
Finding 2 — go-toolchain-patches.json:3 (medium)
The top-level description field still says "Go toolchain patch updates only" but the preset now covers both golang and toolchain depTypes. The internal rule descriptions were updated; this one was missed.
Findings 3–5 — docs/RENOVATE_GO_TOOLCHAIN.md lines 37, 46, 192 (low)
Several prose sections describe the preset as "toolchain patches only" or "restricting to toolchain patches." These become inaccurate after this change.
Finding 6 — AGENTS.md:69 (low)
The "Recent Changes" entry states the preset "restricts to gomod toolchain patches only." This text is loaded into AI agent system prompts as project context, so it will actively misinform automated tooling about the preset's scope. The same text appears in CLAUDE.md:38.
Finding 7 — altitude observation
Both go and toolchain directives share depName: "go" in Renovate. Using matchDepNames: ["go"] instead of matchDepTypes: ["golang", "toolchain"] would cover both without enumeration — simpler, and it would have prevented the original bug. The Renovate gomod docs show matchDepNames: ["go"] in their own examples. Worth considering as a follow-up to avoid repeating this class of error if Renovate introduces new depTypes (e.g., tool for Go 1.24+).
Summary
The
go-toolchain-patches.jsonRenovate preset only matcheddepType: "toolchain", which targets thetoolchaindirective ingo.mod. None of the org repositories include that directive — they only use thegodirective (e.g.,go 1.26.0), which Renovate classifies asdepType: "golang".This caused Renovate to report all repos as "up to date" with zero PRs created, since the re-enable rule never fired and all gomod deps remained disabled by the first catch-all rule.
This PR adds
"golang"alongside"toolchain"inmatchDepTypesfor both the re-enable and suppress rules, so Renovate will:godirective (current repos)toolchaindirective in the futureRelated Issues
Review Hints
Single file change in
go-toolchain-patches.json— twomatchDepTypesarrays updated from["toolchain"]to["golang", "toolchain"], plus description text clarifications.The renovate-report artifact from run ci(deps): Bump actions/setup-python from 5.3.0 to 6.0.0 #14 confirms all Go version deps are
depType: "golang"withskipReason: "disabled", and nodepType: "toolchain"exists in any repo.To validate, trigger a dry-run of the Renovate workflow after merge and confirm PRs are proposed for repos with outdated Go patch versions.