Skip to content

feat(renovate)!: move renovate.json5 to templates and add a central default preset #508

Closed

Description

@DevSecNinja

Problem

config-sync overwrites renovate.json5 byte-for-byte, so every repo-local packageRules, customManagers or limit is deleted on the next sync. A read-only study of the 40 config-sync callers (2026-11-16) found real local Renovate config in at least 11 of them. About 20 more differ only because they are stale.

Sync PRs that drop local Renovate config and are on hold:

Four repos (ai-toolkit, scratchpad, az-vm-start-stop, deckio-digital-security) already ignore the whole file and therefore miss central changes. DevSecNinja/hadiscover#450 merged with its limits dropped (accepted by the owner).

Renovate reads only the first config file it finds, and a preset cannot reference "this repository" without hard-coding the repo name (templated preset paths need a self-hosted env). A second local file or a self-referencing preset is not an option.

Proposed solution

Use Renovate's own composition and stop overwriting the file:

  1. Add .renovate/default.json5 that extends today's list (config:recommended, helpers:pinGitHubActionDigests, :dependencyDashboard, :semanticCommits, :semanticCommitTypeAll(build) and the seven github>DevSecNinja/.github//.renovate/*.json5 presets).

  2. Move config-sync/files/renovate.json5 to config-sync/templates/renovate.json5 as a stub:

    {
      $schema: "https://docs.renovatebot.com/renovate-schema.json",
      extends: ["github>DevSecNinja/.github//.renovate/default.json5"],
      // Repo-local packageRules / customManagers go below.
    }
  3. Drift check: config-sync (or a repo-steward baseline rule) warns when renovate.json5 does not extend github>DevSecNinja/.github//.renovate/default.json5. No content diffing.

  4. Document the local-rules convention in config-sync/templates/README.md and docs/architecture.md.

  5. One-time stub PRs in the repos with local rules, then remove their renovate.json5 ignores.

Caveat: templates only bootstrap when the caller sets sync-templates: true. Either bootstrap renovate.json5 regardless of that input, or rely on repo-starter for new repos.

Breaking (feat!): repos stop receiving preset-list changes through config-sync until they adopt the stub. Needs owner approval before implementation.

Effort: S (about 0.5 to 1 day) plus stub PRs in about 11 repos.

Alternatives considered

  • Marker-delimited local block (// config-sync: local-begin / local-end) spliced by config-sync. Feasible, but Renovate's config-migration PRs rewrite the file and the splice must land inside the JSON5 object. Estimated M (about 2 days) with bats tests. Revisit only if 3 or more repos need partial local content in another synced file.
  • Whole-file ignore: what four repos do today. They miss every central change.
  • Mend-hosted inherited org config (renovate-config repo): not verified for this setup and changes the architecture.

Source: config-sync local overrides study (2026-11-16), shared in the coordinating session. Related: #511 (lint excludes), #512 (engines), #510 (TypeScript cap).

Activity

  1. DevSecNinja commented on Nov 16, 2026

    @DevSecNinja
    OwnerAuthor

    Owner decision (2026-11-16): approved. Implementation is starting.

    Related decision for #512: engines declares the supported range only, and mise pins the exact development and CI version. Renovate should use rangeStrategy: "replace" for engines and never pin it.

  2. added a commit that references this issue on Nov 16, 2026
    79be507
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions