Skip to content

chore: expire delegations if later pushes touch sensitive files#40207

Open
bryangingechen wants to merge 1 commit into
leanprover-community:masterfrom
bryangingechen:bors-expiration-paths
Open

chore: expire delegations if later pushes touch sensitive files#40207
bryangingechen wants to merge 1 commit into
leanprover-community:masterfrom
bryangingechen:bors-expiration-paths

Conversation

@bryangingechen
Copy link
Copy Markdown
Contributor

@bryangingechen bryangingechen commented Jun 4, 2026

This PR adds a restrict_to_paths setting per leanprover-community/bors-ng#50 so that delegated PRs will have their delegations expire immediately if the author pushes changes to any files outside the following locations:

  • "Archive/**",
  • "Counterexamples/**",
  • "docs/**",
  • "DownstreamTest/**",
  • "Mathlib/**",
  • "MathlibTest/**",
  • "widget/**",
  • "Archive.lean",
  • "Counterexamples.lean",
  • "docs.lean",
  • "Mathlib.lean",

As a consequence, changes outside these directories after delegation must be re-approved by a maintainer.

(bors will do its best to distinguish from changes to the code coming from the master branch so except in cases of PRs that touch a large number of files, merging master should be safe, even if there are changes outside the above directories.)


Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

PR summary 3f1f3d0f24

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

No declarations were harmed in the making of this PR! 🐙

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.


No changes to strong technical debt.
No changes to weak technical debt.

Current commit 3f1f3d0f24
Reference commit cca4f7de20

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@grunweg grunweg added the CI Modifies the continuous integration setup or other automation label Jun 4, 2026
@grunweg
Copy link
Copy Markdown
Contributor

grunweg commented Jun 4, 2026

Thanks! I'd like to have another pair of eyes on the glob patterns, but the policy seems good to me.
maintainer merge

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

🚀 Pull request has been placed on the maintainer queue by grunweg.

@mathlib-triage mathlib-triage Bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Jun 4, 2026
@SnirBroshi
Copy link
Copy Markdown
Collaborator

This is interesting, can you please elaborate on the goal with it? Is it to protect the CI servers or other contributors who have cloned the project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Modifies the continuous integration setup or other automation maintainer-merge A reviewer has approved the changed; awaiting maintainer approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants