Skip to content

fix: validate renovate dependency rule coverage#263

Merged
zeitlinger merged 16 commits intomainfrom
codex/renovate-deps-rule-coverage
May 5, 2026
Merged

fix: validate renovate dependency rule coverage#263
zeitlinger merged 16 commits intomainfrom
codex/renovate-deps-rule-coverage

Conversation

@zeitlinger
Copy link
Copy Markdown
Member

Summary

  • extend renovate-deps snapshots to record extracted dependency metadata alongside file-to-dependency mappings
  • validate Renovate package-rule coverage for dependencies that resolve to the same upstream package but use different extracted dep names
  • align the repo Renovate config and tests with matchDepNames, and make the README quickstart regex managers use canonical dep names
  • add fixture coverage for the #260-style mismatch where mise.toml and README.md extract different dep names for the same package

Why

#260 showed that the README quickstart regex manager could update actionlint independently from mise.toml. The root cause was that Renovate extracted rhysd/actionlint from README.md while the linter group matched actionlint by dep name, so grouped updates could silently diverge until the separate README drift test failed.

This change makes renovate-deps catch that configuration mistake directly by comparing rule matching against the extracted dependency identities that Renovate actually emits in extract mode.

Validation

  • cargo test
  • mise run lint:fix
  • mise run lint

@zeitlinger zeitlinger marked this pull request as ready for review May 4, 2026 08:48
Copilot AI review requested due to automatic review settings May 4, 2026 08:48
@zeitlinger zeitlinger requested a review from a team as a code owner May 4, 2026 08:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the renovate-deps check so Flint records dependency metadata in tracked snapshots and validates that Renovate package rules cover aliases of the same upstream package consistently. It also updates the repo’s Renovate config, docs, and fixtures to use canonical dep names so grouped updates stay aligned across mise.toml, README regex managers, and snapshot validation.

Changes:

  • Add metadata-aware snapshot parsing/writing and rule-coverage validation for renovate-deps.
  • Refactor/expand renovate_deps implementation and test coverage, including a new inconsistent-rule-coverage fixture.
  • Update Renovate preset/config/docs/snapshots to use matchDepNames and canonical README dep names.

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
tests/cases/renovate-deps/up-to-date/files/.github/renovate-tracked-deps.json Updates fixture snapshot to new {meta, files} shape.
tests/cases/renovate-deps/up-to-date-renovaterc-json/files/renovate-tracked-deps.json Updates root-config fixture snapshot format.
tests/cases/renovate-deps/out-of-date/test.toml Adjusts out-of-date expectations for new snapshot/diff output.
tests/cases/renovate-deps/out-of-date/files/.github/renovate-tracked-deps.json Updates stale snapshot fixture to wrapped format.
tests/cases/renovate-deps/inconsistent-rule-coverage/test.toml Adds end-to-end fixture for split dep-name rule mismatch.
tests/cases/renovate-deps/inconsistent-rule-coverage/files/mise.toml Provides fixture tool file for mismatch case.
tests/cases/renovate-deps/inconsistent-rule-coverage/files/README.md Provides fixture README for mismatch case.
tests/cases/renovate-deps/inconsistent-rule-coverage/files/.github/renovate.json5 Adds fixture Renovate rule using matchDepNames.
tests/cases/renovate-deps/inconsistent-rule-coverage/files/.github/renovate-tracked-deps.json Adds fixture snapshot metadata for alias comparison.
tests/cases/renovate-deps/fix-update/test.toml Updates fix-mode snapshot expectation to new format.
tests/cases/renovate-deps/fix-update/files/.github/renovate-tracked-deps.json Updates stale fix fixture snapshot wrapper.
tests/cases/renovate-deps/fix-create/test.toml Updates create-mode expected snapshot output.
tests/cases/renovate-deps/fast-only-relevant/files/.github/renovate-tracked-deps.json Updates adaptive fast-only relevant fixture snapshot.
tests/cases/renovate-deps/fast-only-irrelevant/files/.github/renovate-tracked-deps.json Updates adaptive fast-only irrelevant fixture snapshot/meta.
tests/cases/general/fast-only-explicit-override/files/.github/renovate-tracked-deps.json Updates general fast-only override fixture snapshot.
src/registry/tests.rs Updates Renovate preset/docs generation assertions for dep-name matching.
src/registry/checks.rs Expands renovate-deps registry docs to cover rule-coverage validation and canonical dep names.
src/linters/renovate_deps/tests.rs Adds focused tests for snapshot parsing, relevance, and rule-coverage behavior.
src/linters/renovate_deps/snapshot.rs Adds snapshot/meta parsing, legacy compatibility, writing, and diff helpers.
src/linters/renovate_deps/rules.rs Adds comparable rule parsing, alias grouping, and rule-coverage validation logic.
src/linters/renovate_deps/mod.rs Adds modularized renovate-deps implementation with metadata refresh support.
src/linters/renovate_deps.rs Updates existing monolithic implementation with the same snapshot/rule-coverage changes.
src/config.rs Adds refresh_meta config for renovate-deps.
docs/linters/renovate-deps.md Adds dedicated guide for snapshot metadata and rule-coverage failures.
docs/linters.md Regenerates renovate-deps docs with new guidance.
default.json Switches weekly linter grouping rule to matchDepNames.
.github/renovate.json5 Aligns repo Renovate config and README regex managers with canonical dep names.
.github/renovate-tracked-deps.json Refreshes committed repo snapshot to include metadata and canonical README deps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/linters/renovate-deps.md Outdated
Comment thread docs/linters/renovate-deps.md Outdated
Comment thread src/linters/renovate_deps/rules.rs Outdated
Comment thread src/linters/renovate_deps/rules.rs Outdated
Comment thread src/registry/tests.rs
Comment thread src/linters/renovate_deps/mod.rs Outdated
Comment thread src/linters/renovate_deps/mod.rs
Comment thread src/linters/renovate_deps/rules.rs Outdated
Comment thread docs/linters/renovate-deps.md Outdated
Comment thread docs/linters/renovate-deps.md Outdated
zeitlinger added 16 commits May 5, 2026 13:40
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger force-pushed the codex/renovate-deps-rule-coverage branch from 66677de to 3e0e68b Compare May 5, 2026 13:43
@zeitlinger zeitlinger enabled auto-merge (squash) May 5, 2026 13:48
@zeitlinger zeitlinger merged commit 0384a4c into main May 5, 2026
13 checks passed
@zeitlinger zeitlinger deleted the codex/renovate-deps-rule-coverage branch May 5, 2026 13:56
This was referenced May 8, 2026
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.

3 participants