Skip to content

ci: validate the shared dependency update policy - #30

Merged
ecv merged 1 commit into
mainfrom
claude/validate-renovate-config
Sep 9, 2026
Merged

ecv merged 1 commit into
mainfrom
claude/validate-renovate-config

Conversation

@ecv

@ecv ecv commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

A mistake in the shared dependency update policy degrades to the bot staying quiet, which is exactly what the policy looks like when it is working correctly. Nobody can tell a quiet bot from a broken one without opening a dashboard and checking by hand, and that policy now governs every repository in the org. This adds a check that fails on a broken policy before it merges, so the mistake is loud instead of invisible. It catches unrecognised options, values of the wrong type, and malformed JSON that the bot's own validator waves through.

Test plan

  • A valid policy passes the check
  • A misspelled option fails the check
  • A value of the wrong type fails the check
  • Malformed JSON that the bot's own validator accepts and exits zero on fails the check

Related to datum-cloud/infra#4933

https://claude.ai/code/session_01QP4dYFku9krW7bng4mzriX

A mistake in the shared policy degrades to the bot staying quiet, which
looks exactly like the policy working. The file now decides update
behaviour for every repository in the org, so a bad edit disarms
dependency updates everywhere and reports nothing.

Key changes:
- Add a check that runs on every change to the policy files, failing the
  build rather than merging a policy that does nothing
- Reject options the bot does not recognise and values of the wrong
  type, which is how a typo degrades to silence
- Reject malformed JSON ahead of the bot's own validator, which accepts
  trailing commas through a JSON5 fallback and exits zero
- Fail when no policy file is found, so the check cannot pass vacuously

Claude-Session: https://claude.ai/code/session_01QP4dYFku9krW7bng4mzriX
@ecv
ecv requested a review from a team as a code owner September 9, 2026 21:30

@kevwilliams kevwilliams left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approving. The check is not a no-op: jq enforces strict JSON (catching the trailing-comma/JSON5 cases the bot's own validator waves through) and renovate-config-validator --strict runs against the real Renovate schema, so unrecognized options and wrong-typed values fail the build. It validates both renovate-config.json and renovate.json, which both exist at repo root. Triggers correctly on pull_request scoped to the relevant paths (plus a push-to-main backstop), no pull_request_target, and no permissions block so the default token stays read-only. Commit message is clear and matches the diff.

@ecv
ecv merged commit 9e32424 into main Sep 9, 2026
2 checks passed
@ecv
ecv deleted the claude/validate-renovate-config branch September 9, 2026 21:32
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.

2 participants