Skip to content

ci: check the rulesets for drift every week - #39

Merged
fstagni merged 1 commit into
DIRACGrid:mainfrom
aldbr:ci/ruleset-drift-check
Dec 3, 2026
Merged

fstagni merged 1 commit into
DIRACGrid:mainfrom
aldbr:ci/ruleset-drift-check

Conversation

@aldbr

@aldbr aldbr commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Why

Nothing applies the rulesets of rulesets/ automatically. GitHub can drift from them: an apply forgotten after a merge, or a change made by hand in the settings of a repository. Today nobody would notice.

What

  • A Configuration drift workflow runs scripts/rulesets.py diff every Monday (and on demand). While something differs it keeps one issue named Configuration drift open, with the differences; it closes the issue when GitHub and the files agree again.
  • The workflow has no secret. It uses its own token, which cannot read the bypass lists of the rulesets, so rulesets.py diff now skips a bypass list it cannot read instead of failing. An admin still compares them by running the script.
  • The unit tests of the scripts now run in pre-commit. Nothing ran them before.

Tested

  • rulesets.py diff against all repositories: no difference today.
  • The compare step of the workflow, run locally with and without a fake difference.
  • Not tested: the step that opens, updates or closes the issue. It first runs once this is merged (workflow_dispatch).

🤖 Generated with Claude Code

Nothing applies the rulesets automatically, so GitHub can drift from the
templates: a forgotten `apply`, or a change made by hand.

A weekly workflow runs `scripts/rulesets.py diff` and keeps a
"Configuration drift" issue open while something differs. It uses the
workflow token only, so the diff now skips the bypass lists that the token
cannot read. The unit tests of the scripts now run in pre-commit.

Assisted-by: Claude:claude-fable-5-2
@aldbr
aldbr requested a review from a team as a code owner December 3, 2026 10:57
@fstagni
fstagni merged commit dd9dece into DIRACGrid:main Dec 3, 2026
1 check passed
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