Skip to content

ci: a new report's RE id must not be one main or an earlier open pull request has - #1639

Merged
DrunkOnJava merged 2 commits into
mainfrom
ci/re-id-reuse
Nov 10, 2026
Merged

DrunkOnJava merged 2 commits into
mainfrom
ci/re-id-reuse

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

A new CI step in the PII guard job, tools/ci/check_re_id_reuse.py, fails a pull request that adds a report (reports/**/RE-NN-*.md) whose id another report of the merged tree already has, or that an earlier open pull request (a lower number) also adds. The later pull request fails, as docs/maintaining.md already says it is renumbered. Griffin asked for it through the project questions on 2026-11-10.

Motivation

On 2026-11-10 two pull requests carried an RE-392 before either was opened, and a contributor's pull request took an id another was about to use: renumbering after both land means rewriting the code, probes and changelog entries that cite it. The rule existed on paper (reports/README.md, docs/maintaining.md); nothing enforced it.

Changes

  • tools/ci/check_re_id_reuse.py: reads the reports a pull request adds from the API's file list (a report it only edits or renames is not new), looks for another path with the id in the checked-out tree (the merge of the pull request into main, so that is main's, or the pull request's own second file), and for an earlier open pull request adding the same id. API failures are NOT MEASURED warnings, as cited-commits.py does, never red. A push checks nothing.
  • .github/workflows/ci.yml: the step, after the API docs step, with GH_TOKEN, and a step for the pure tests.
  • tools/ci/test_check_re_id_reuse.py: ten failure-first cases of the pure rule (an id on main at another path, two new reports under one id, an earlier open pull request, a fresh id, the pull request's own file, RE-12.md, RE-3 against RE-30, non-report paths, a subdirectory, no new report).
  • docs/maintaining.md, reports/README.md: say that CI enforces it.

Testing

End to end against the real API and a real checkout, from a scratch worktree of main (the pure rule also has the failure-first tests this repository keeps for its CI scripts, tools/ci/test_check_re_id_reuse.py, run in the PII guard job: a pure helper, ten cases):

Audit-honesty checklist

  • No user-visible change: no changelog fragment.
  • Limits: a pull request that adds a report with an id main does not have and that no other open pull request has passes even if a draft claim exists elsewhere (a claims file is not read); a closed-unmerged pull request's id is free; only the first 100 open pull requests and 300 files per pull request are read.

Breaking changes

None.

Related issues

Griffin's 2026-11-10 project questions; follows the RE-392 collision (#1632, #1637).

…rlier open pull request has fails the PII guard job, so the later one is renumbered before two reports carry one number
…e judgement has failure-first tests, run in the PII guard job like its neighbours
@DrunkOnJava
DrunkOnJava merged commit 3c6c64e into main Nov 10, 2026
39 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/re-id-reuse branch November 10, 2026 18:23
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