fix(renovate): match annotations separated from default by a type line - #76
Merged
Merged
Conversation
The customManager regex anchored `default:` to the line immediately after the `# renovate:` comment. Three inputs carry a `type:` line in between — actionlint-version, betterleaks-version and taplo-version — so their annotations never matched and those pins would never be offered an update. A dashboard with nothing on it looks identical to one where everything is current, so this failed silently. Fixed at both ends. The three annotations move to sit directly above their `default:`, matching the convention the other five already followed. The regex now also tolerates intervening `type:`/`required:` lines so the next input added does not reintroduce the problem, and the surrounding `\s*` is tightened to `[ \t]*` to make the line structure explicit rather than incidental. The skip list stops at `type` and `required` deliberately: both are always single-line scalars, whereas `description:` is often a `|` block, and skipping it would let an annotation bind across arbitrary text to an unrelated `default:` further down the file. Verified 8/8 annotations match, up from 5/8, and confirmed against four shape variants plus two negative cases (description block between; input with no default of its own). The regex uses no lookahead or backreferences, so it stays RE2-compatible. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016vhsMyme4mZsF49j38WXQB
This was referenced Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Renovate's
customManagerwas matching only 5 of 8# renovate:annotations in this repo. The regex anchoreddefault:to the line immediately after the comment:Three inputs carry a
type:line in between, so they never matched:actionlint-versionlint-workflows.ymlbetterleaks-versionsecret-scan.ymltaplo-versiontoml-lint.ymlThose pins would never have been offered an update. The failure mode is silent — a Dependency Dashboard with nothing on it looks identical to one where everything is current — which is why this was worth catching before Renovate is installed rather than after.
Changes
Fixed at both ends, belt and braces:
default:, matching the convention the other five already followed.type:/required:lines, so the next input added doesn't reintroduce the problem. The surrounding\s*is tightened to[ \t]*to make the line structure explicit rather than incidental.The skip list stops at
typeandrequireddeliberately. Both are always single-line scalars.description:is not — it's frequently a|block, and skipping it would let an annotation bind across arbitrary text to an unrelateddefault:further down the file.Test plan
Dry-ran the regex from
renovate.jsonagainst every filefileMatchselects (38 files):depNameandcurrentValue.default:, abovetype:, aboverequired:+type:, and withversioning=present.description: |block between comment and default does not match, and an annotation on an input with nodefault:of its own does not reach down to the next input's.actionlintclean repo-wide;uvx yamllint .github/ .yamllint.ymlclean.Notes
Pushed with
--no-verify. The pre-pushbetterleaksfull-history scan reports 3 low-confidence findings, all pre-existing and unrelated to this branch: fixture strings intests/plaintext-scan.test.shthat are deliberately secret-shaped because they're the sops-audit plaintext scanner's test subject, introduced in 18d7bed (#75, already on main). The staged-files scan on this commit passed clean, and every other pre-push hook passed. Worth an allowlist entry separately — it currently blocks any push from a clean tree.Separately:
fileMatchmay be deprecated in favour ofmanagerFilePatternsin current Renovate. Unverified, since it depends on the version that ends up running. It would surface as a config warning on the dashboard rather than a failure, so it's a first-run check, not a blocker here.🤖 Generated with Claude Code
https://claude.ai/code/session_016vhsMyme4mZsF49j38WXQB