Skip to content

fix(ci): group npm updates and enable lockfile maintenance in the Renovate preset - #1049

Merged
c-vigo merged 2 commits into
devfrom
bugfix/1041-renovate-preset-npm-security-grouping
Jul 14, 2026
Merged

c-vigo merged 2 commits into
devfrom
bugfix/1041-renovate-preset-npm-security-grouping

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Two Renovate-preset fixes from the commit-action pilot's first Renovate run, bundled per #1047's own suggestion (same file).

#1047 — npm update grouping (fixed as specified)

The preset grouped github-actions and pep621 minor/patch but fanned npm out one PR per package — and because every npm PR touches package-lock.json + CHANGELOG.md, the set was pairwise-conflicting (commit-action got 11 mutually unlandable PRs). Now, matching the existing style:

  • devDependencies grouped across ALL update types ("npm dev dependencies") — they never ship in the bundle;
  • runtime dependencies minor/patch grouped ("npm (minor and patch)"); runtime majors stay individual (the @actions/* ESM-only majors showed why).
    Renovate packageRules merge in order, so the existing build(npm) semantic-commit rule still applies to every npm PR.

#1041 — transitive npm vulnerabilities (interim; issue stays open)

The issue's proposed transitiveRemediation: true is impossible on current Renovate: the option is in removedProperties and absent from the options schema of the validator-pinned version (43.262.3) — adding it fails renovate-validate.yml (--strict migration warning → exit 1) and would be silently discarded anyway. There is no drop-in replacement; alert-driven transitive remediation is upstream-unimplemented (renovatebot/renovate#41825).
Interim shipped instead: weekly lockFileMaintenance in the shared preset — the mechanism devkit's own root renovate.json already used — which regenerates lockfiles and picks up in-range transitive fixes. The root copy's now-duplicate block is removed (SSoT: root extends the preset). The preset block's description documents the interim status and the upstream pointer. #1041 will be re-scoped to track the upstream feature, not closed.

Known small window (accepted): the preset resolves from main, so between this dev-merge and the next promotion devkit itself skips at most a weekly maintenance run; consumers are unaffected.

No preset test idiom exists; renovate-config-validator --strict over all 3 tracked configs is the evidence (exit 0), per the repo's renovate-validate.yml convention.

Evidence

  • renovate-config-validator --strict: "Config validated successfully against 3 file(s)", exit 0
  • prek run --all-files → green (re-verified independently before push)

Closes #1047
Refs: #1041

c-vigo added 2 commits July 14, 2026 11:23
The scaffolded renovate-default.json grouped github-actions and pep621
minor/patch updates but left npm ungrouped, so consumers got one PR per
npm package. Each PR touches package-lock.json and CHANGELOG.md, so they
conflict pairwise and cannot land serially. Add two npm grouping rules
matching the other managers' style: devDependencies across all update
types, and runtime dependencies minor/patch, leaving runtime majors as
individual PRs. The existing build(npm) semantic-commit rule still
applies to every npm PR via packageRules merge order.

Refs: #1047
Interim mechanism for transitive npm vulnerability coverage: Renovate
only raises PRs for dependencies visible in package.json, so a
vulnerable package reachable only through a parent is never reported
or remediated (12 of 21 Dependabot alerts in the commit-action pilot,
including the only critical). A weekly lockfile regeneration picks up
in-range fixes for those indirect dependencies when parents allow.

This is interim, not the full fix: alert-driven transitive remediation
is unimplemented upstream (renovatebot/renovate#41825) and the former
transitiveRemediation option was removed from Renovate — setting it
would be a no-op and fails renovate-config-validator --strict. The
remaining gap stays tracked on the issue.

devkit's own renovate.json drops its now-duplicated lockFileMaintenance
block and inherits it from the preset (single source of truth). The
schedule matches the preset's existing Monday cadence.

Refs: #1041
@c-vigo
c-vigo merged commit 48bf93a into dev Jul 14, 2026
14 checks passed
@c-vigo
c-vigo deleted the bugfix/1041-renovate-preset-npm-security-grouping branch July 14, 2026 09:39
c-vigo added a commit that referenced this pull request Jul 14, 2026
The shared preset's lockFileMaintenance.description is rendered by Renovate
into every consumer's Dependency Dashboard issue, so its references are read
in the consumer's repo context:

- renovatebot/renovate#41825 is a GitHub Discussion, not an issue, so the
  shorthand resolved to nothing. Use the full discussions URL and describe it
  as the open idea thread it is (the CHANGELOG entry for #1049 already linked
  it correctly).
- The trailing bare "Refs #1041" autolinked to the *consumer's* issue 1041.
  Use the absolute devkit issue URL, as #1056/#1062 did for doc paths.

Text-only: no Renovate behaviour changes, so no test accompanies it.

Refs: #1041
c-vigo added a commit that referenced this pull request Jul 14, 2026
…set (#1069)

## Summary

The shared preset's `lockFileMaintenance.description` (added in #1049)
is rendered by Renovate **into every consumer's Dependency Dashboard
issue**, so its references are resolved in the *consumer's* repo
context. Two of them were broken there:

- `renovatebot/renovate#41825` — the upstream blocker is a GitHub
**Discussion**, not an issue, so the `owner/repo#N` shorthand resolves
to nothing (`gh` returns 404 on it). Now the full [discussions
URL](renovatebot/renovate#41825),
described as the open idea thread it is: unanswered, *Suggest an Idea*
category, 23 upvotes, last activity 2026-06-30 — not a planned item with
a timeline, as the earlier wording implied.
- Trailing `Refs #1041` — a bare reference that GitHub autolinks to the
**consumer's** issue 1041. Now the absolute devkit issue URL, the same
treatment #1056/#1062 gave doc paths (this one differs in that it is
actually *rendered*, not sitting in a YAML comment).

The `#1049` CHANGELOG entry already linked the discussion correctly, so
the preset and the re-scope comment on #1041 were the only two places
carrying the broken shorthand. [The comment is
updated](#1041 (comment)).

Targets `release/1.2.0`: the preset it fixes ships in 1.2.0, so the
CHANGELOG entry lands in that section (mirror re-synced via
`sync-manifest`).

**Does not close #1041.** That issue still tracks the open upstream
scope — alert-driven remediation of out-of-range transitive vulns, and
transitive packages appearing in the Dependency Dashboard at all.

Text-only, no behaviour change, so no test accompanies it; the preset's
contract is covered by `renovate-config-validator --strict` in
`renovate-validate.yml`.

## Test evidence
- `prek run --all-files` → green, 0 failures (incl. `sync-manifest`,
`check json`)
- `renovate-config-validator --strict
assets/workspace/.github/renovate-default.json renovate.json` → `Config
validated successfully against 2 file(s)`
- `uv run pytest tests/test_scaffold_lint.py` → 34 passed

Refs: #1041
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