Repository navigation
docs(issues): [#2507] specify stopping required pull-request rebases and reconciling rulesets - #2508
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The immediately effective ADR conflicts with unchanged mandatory workflow skills and contains an unstable issue-spec reference.
2 open findings
What changed in this PR
Adds the specification, evidence, and ADR for making routine PR rebases optional while reconciling repository rulesets.
Changes:
- Documents current rebase costs and ruleset state.
- Defines the proposed policy and implementation plan.
- Registers the new ADR.
| File | Description |
|---|---|
ISSUE.md |
Defines scope, tasks, acceptance criteria, and verification. |
baseline-evidence.md |
Records supporting metrics and configuration evidence. |
20261013161419_stop_requiring_pull_request_rebases.md |
Establishes the new rebase policy. |
docs/adrs/index.md |
Adds the ADR to the index. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <[email protected]>
…rust#2508 review audit Co-authored-by: Copilot <[email protected]>
ed5501a to
9c353b1
Compare
Co-authored-by: Copilot <[email protected]>
…rust#2508 review audit Co-authored-by: Copilot <[email protected]>
…ad by subject after the rebase Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
3 open findings
This documents that the pre-commit gate could fail (cspell) without blocking the commit due to a… · New The phrase “nothing that will be merged … (PR body, review replies)” is internally inconsistent… · New This row introduces large alignment whitespace padding inside the markdown table cells, which tends… · New
2 resolved since last review
🧠 Review effort: Lite
…ript's exit status Record the lesson from the PR torrust#2508 review: when the hook is not installed, piping the script's JSON output into a parser replaced its exit status, so a failed cspell check did not block the commit. Co-authored-by: Copilot <[email protected]>
…eview Co-authored-by: Copilot <[email protected]>
Specify how to stop requiring pull-request rebases before merge and reconcile the disabled repository rulesets 94237 and 19245352. Include issue-local baseline evidence: PR volume, force-pushes per PR, PR CI runner time, rebase-fallout commits, merge-ref staleness, and the ruleset version-history analysis. Add root ADR "Stop requiring pull-request rebases": rebasing stays recommended when opening a PR and whenever it is cheap, but is no longer required merely because develop advanced. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…he ADR frontmatter Co-authored-by: Copilot <[email protected]>
…f requiring them Align the open-pull-request and merge-pull-request skills and AGENTS.md with the ADR that stops requiring pull-request rebases, so the immediately effective ADR leaves no workflow instruction enforcing the old mandatory rule. Rebasing stays recommended when opening a PR and whenever it is cheap; a refresh is required on conflicts, needed develop changes, or when the merge tool reports a stale merge base. Mark T3 and T4 in progress in the torrust#2507 specification. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…rust#2508 review audit Co-authored-by: Copilot <[email protected]>
…ad by subject after the rebase Co-authored-by: Copilot <[email protected]>
…dex row Co-authored-by: Copilot <[email protected]>
…able references Co-authored-by: Copilot <[email protected]>
…ript's exit status Record the lesson from the PR torrust#2508 review: when the hook is not installed, piping the script's JSON output into a parser replaced its exit status, so a failed cspell check did not block the commit. Co-authored-by: Copilot <[email protected]>
…eview Co-authored-by: Copilot <[email protected]>
691a507 to
0bb0d37
Compare
|
ACK 0bb0d37 |
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 0bb0d3715612ae06573024b75f846e70a8f1091c (post-merge). Recomputed from the bytes at the merged head, against the merge base 8af007187; the PR merged at 06:42Z as d383d4b45.
Label: POST_MERGE_FINDINGS — the review request to this account under "Review requests" in the PR body was read after the merge. The technical findings below stand at the merged head; no ACK follows a merged PR; the choice between the two ruleset designs is answered separately by the account's owner.
ADR. Sections, root placement, id form, index row and the quoted "issue #2507" follow create-adr. At the base, open-pull-request lines 22, 40, 44, 58 and merge-pull-request line 107 required the rebase, and AGENTS.md:364 said "only rebase onto develop to resolve conflicts". github-merge.py:649 merges --no-ff; the stale-ref refusal is lines 626–631 (if github_merge_base != current_base: → sys.exit(EXIT_STALE_MERGE_BASE), 4 at line 41). A–E are complete and C is the Agreement. The Transition holds: no skill, agent profile or AGENTS.md line still makes a rebase mandatory because develop advanced. F6, F13.
Skills and AGENTS.md. The recommended cases match the ADR; the required cases do not (F7, F10). pre-commit.sh takes --format=json (line 315), honours TORRUST_GIT_HOOKS_LOG_DIR (line 66) and exits with the failing code in JSON mode (386–387), so the commit-changes command gates as written. No version bump, and the history has no bump rule.
Spec. All template sections; -spec branch per create-issue; the 17:30 stamp matches the last Progress Log entry and the last commit touching the file. Every Background number recomputes from the evidence tables (197.8 h; 26/67; 106/67; 23/67; 54/67; 106/371; 10:19→10:35). T3/T4 IN_PROGRESS agrees with the Transition; both merge-tool tests exist. F8.
Evidence. A baseline record with no template claimed (not a manual-verification-evidence.md); every section has its commands. In-tree facts recompute: the rule-introducing commits, the two GH013 merge dates, the seven §2.1 merge times, the README-only #2000 merge, the 131/678 behind counts, all 23 §7 commits. F8, F14.
Audit record. Five threads replied and resolved; resolution references are subjects; the reviewed head is named by subject (41c80eeba). F9, F11.
Hygiene. Eleven Conventional subjects, ascending author times, author = committer, one trailer line each, git diff --check clean, no banned token, 86/86 relative links resolve. The first subject has no bracket tag, as create-issue Step 5 writes it (note only). Related to #2507 carries no closing keyword. F12.
Findings
F6–F9 Minor; F10–F14 Nit; inline.
Checked, no finding
Index row; frontmatter paths and skill-links; --no-ff; exit-4 guard and its fixture test; agent profiles; pre-commit flags; stamp; spec numbers; in-tree evidence facts; links; commit form.
The two ruleset designs at the bytes
Spec row "94237 required status checks", in full: "Do not re-enable as is. Choose one design: (a) a single always-reporting gate check (for example a job in docs-lint.yaml, which runs for every PR, that succeeds when the heavy workflows succeeded or were legitimately skipped by the documentation-only path filter), required with strict_required_status_checks_policy: false; or (b) no GitHub-required checks, with github-merge.py verifying the PR head's check results before signing and offering an explicit, logged override. First verify whether GitHub accepts a locally pushed merge commit under a required-checks rule at all; if it does not, only (b) is viable."
| (a) gate check required by a ruleset | (b) merge tool verifies checks | |
|---|---|---|
| Tree provides | docs-lint.yaml:23-25 has push:/pull_request: and no path filter, so it runs for every PR; line 4: "Serves as the required CI signal for documentation-only pull requests". One job, no needs:, no API step. The docs-only fast path (issue #1743) exists only as paths-ignore copies in four workflows (lines 8–14). No workflow_call; the one workflow_run (upload_coverage_pr.yaml:10) names Generate Coverage Report (PR), the workflow is Generate Coverage Reports (PR). |
The tool reads only /pulls/N, /issues/N/comments, /pulls/N/reviews (149–159); no check-runs, statuses or mergeable query in contrib/dev-tools/git. It has the stale-ref guard, the introduced range (664), a local testcmd hook (679–682) and the message it composes (645–647, 715–717). The fixture swaps the retrieve_* calls for lambdas (test-github-merge-symlinks.py:54-60). |
| Must be built | A job that decides docs-only from changed paths and, for code PRs, reads the other workflows' results for the same head (checks API, or heavy workflows made reusable behind needs:); the ruleset entry and the maintainer bypass entry; the T5 precondition test. |
A check-results query for the head; the list of checks a head must carry, docs-only included; the override and its log; fixture lambdas and tests; README and skill text. |
| ACs and ADR | AC5, AC7 independent (own force-push ruleset; "Delete after the replacement is active"). AC6 binds the gate. All three ADR conditions bind it: "false", "satisfiable by both code and documentation-only pull requests", "must not need to be disabled". |
AC5, AC7 the same. AC6 ("Every active required-check mechanism") binds the tool's check. The ADR's ruleset conditions have no ruleset to bind. |
| Failure mode named | The row's own precondition; evidence §2.1: "The maintainer merge pushes a new merge commit that never ran checks itself"; Risks: "would recreate the disable-and-forget cycle". | None specific. Evidence §2: the repository allows merge commits and rebase merges, and 87085 lists merge, squash, rebase, so a merge through GitHub's own methods is outside the tool's check; the spec plans an ADR "if T5 moves required-check enforcement … into the merge tool". |
Both: the ADR keeps "The merge tool keeps refusing to sign or push a merge built on a stale GitHub merge ref", and evidence §3 says "a push to the PR head (in practice a rebase) is what makes a behind PR mergeable with the tool"; until T1 finds a refresh that pushes nothing, each refresh makes a new head whose checks must report again before (a)'s gate or (b)'s tool passes it. Evidence §2.1 ties the up-to-date demand to true ("the PR head must also contain the develop tip"). The "Temporary overrides" row does not state the bypass mode of (a)'s maintainer-role entry; the tool pushes as the maintainer (line 756), so T5 decides whether that entry applies to every merge push.
Checks
On the loop's compute hub at the merged head, merge base 8af007187 (receipt server-gates-krkavec-261): pre-commit profile gate exit 0 (76 s); linter markdown, linter cspell, linter lychee exit 0; frontmatter-validator --all: 19 errors / 4 warnings at this head and 19 / 4 at 8af007187 re-measured, none in the files this PR touches; validate-audit-record.py --pr-number 2508 exit 0 (5 rows, 12 log entries, 0 failures). GitHub checks at the merged head at posting time: "Docs Lint: completed/success". At posting, develop is cbdbce9c1.
| commit, then GitHub's "Update branch" (a merge commit from `develop`, signed by GitHub, which | ||
| keeps existing commit ids), and a rebase as an alternative. The concrete mechanism is chosen by | ||
| the experiment in the implementing issue and recorded in the `merge-pull-request` skill. | ||
| - Review records may cite pull-request commit ids. Without mandatory rebases those ids usually stay |
There was a problem hiding this comment.
[Minor][F6] The ADR permits commit ids in review records; the skill rewritten in this PR forbids them
This line says "Review records may cite pull-request commit ids. Without mandatory rebases those ids usually stay valid". open-pull-request/SKILL.md:73-76, rewritten in this PR, says "no durable reference may cite a PR-branch commit by id. Durable references are repository artifacts (issue specs, evidence files, review audits), the PR body, [...] and review replies". An agent following the ADR writes ids into an audit or a reply that the skill forbids. Both texts accept subject citations, so either the ADR sentence adopts the skill's scope or the skill states the ADR's exception; T4's remaining wording pass is the natural place.
| preserved as training material for humans and AI agents; only rebase onto `develop` to resolve | ||
| conflicts. Never propose squashing as a cleanup. | ||
| preserved as training material for humans and AI agents; the only allowed rewrite is a rebase | ||
| onto `develop`, which is recommended when cheap and required on conflicts (see |
There was a problem hiding this comment.
[Minor][F7] AGENTS.md names one of the ADR's three required-update cases
"recommended when cheap and required on conflicts". The ADR's Agreement (lines 86-93) requires an update on conflicts, on a dependency, and when the merge tool needs a refreshed merge ref; open-pull-request/SKILL.md:55-60 lists all three. An agent reading only the root rules learns that a rebase is required on conflicts alone, which AC1 ("the recommendation and the required cases match the ADR") does not allow. Naming the three cases, or pointing to the ADR's list instead of restating part of it, closes the gap.
| - **94237 "Deny Force Push; Require Status Checks"** requires 16 status checks with | ||
| `strict_required_status_checks_policy: true` and denies force-pushes. The maintainer disabled it | ||
| around every merge on 2026-05-01, 05-04, 05-05, and 07-20; no merge was ever pushed while it was | ||
| active. It cannot be satisfied: six required check names disappeared when the test jobs were |
There was a problem hiding this comment.
[Minor][F8] The six-check count and its 2026-05-01 attribution disagree with the evidence and the workflow history
This line says "six required check names disappeared when the test jobs were collapsed on 2026-05-01". baseline-evidence.md section 2.1 cause 1 attributes five names to that collapse (Formatting, Units and E2E for both toolchains) and the sixth, Test (Docker) (debug), separately. The tree agrees: container.yaml kept target: [debug, release] until feat(ci): eliminate duplicate E2E tests and add test binary landscape analysis (2026-06-03), and the collapse commit also removed the two Linting matrix contexts. Within the evidence, the 2026-05-04 row "kept the 7 obsolete ones" and "Six of the 16 required contexts never report today" do not reconcile. T5 designs the replacement from these names; a recount from the gh api output it already plans fixes both files.
| 2026-10-13 17:56 UTC on the head whose tip commit was | ||
| `docs(pr-reviews): [#2507] fix a spelling failure in the PR #2508 review audit`, before the | ||
| rebase, <https://github.com/torrust/torrust-tracker/pull/2508#pullrequestreview-5507795043>) ran a | ||
| "Lite" review after a runner timeout warning and left three inline comments without severity |
There was a problem hiding this comment.
[Minor][F9] Round 2 carried severities; the record says it did not and maps them differently from round 1
This sentence says review 5507795043 "left three inline comments without severity labels". Its captured body lists each finding with a severity badge: "Medium severity" for the pre-commit-gate comment and "Low severity" for the other two, the same form lines 47-48 read in round 1 and record as Major (inferred) and Minor (inferred). Under that round-1 mapping the rows would be F3 Major, F4 and F5 Minor; rows 66-68 read Minor, Nit, Nit. One mapping for both rounds, stated in the introduction, settles the rows.
| current commit ids. A rebase or other update is **required** only when: | ||
|
|
||
| 1. the branch conflicts with `develop`; | ||
| 2. it needs a change that landed on `develop` later, or a reviewer asks for the combination to be |
There was a problem hiding this comment.
[Nit][F10] "a reviewer asks" lowers the ADR's bar for a required update
The ADR's dependency case (lines 89-91) requires that "a reviewer shows that the combination with newer develop changes must be tested before merge (for example both touch the same Rust module or CI workflow)"; this line makes any request sufficient. The difference decides when a rebase is mandatory, the ADR's subject; the ADR's wording keeps AC1's "match the ADR" literal.
| ## Processing Log | ||
|
|
||
| - 2026-10-13 17:23 UTC - Review 5507407394 (`copilot-pull-request-reviewer`, `COMMENTED`, on head | ||
| `fda1851a4`) left inline comments 4261831838 and 4261831917; the thread capture shows both |
There was a problem hiding this comment.
[Nit][F11] The Processing Log still cites the pre-rebase head by id
Lines 189 and 205 name the round-1 head by its short id, a PR-branch commit that the rebase logged at line 204 rewrote. open-pull-request/SKILL.md:73-76, rewritten in this PR, forbids PR-branch ids in review audits, and line 205 already maps the id to its subject, so the subject alone carries the fact. The id grep at open-pull-request/SKILL.md:80 scans only docs/issues/open/<issue-folder>, so it cannot catch an id in docs/pr-reviews/.
| ./contrib/dev-tools/git/hooks/pre-commit.sh --format=text --verbosity=verbose | ||
| ``` | ||
|
|
||
| When the hook is not installed, this script is the only gate, so make the commit depend on the |
There was a problem hiding this comment.
[Nit][F12] The PR body's file list omits this file
The body's "Files" section lists eight paths and its Summary names the open-pull-request and merge-pull-request skills and AGENTS.md; the diff has nine files, and this commit-changes edit (7883393b4) is the one missing. The merge tool copies the body into the merge commit, so d383d4b45 carries the eight-path list. The subject is outside the diff (the PR body); this comment sits on the file the list omits.
|
|
||
| For years the project has rebased every pull request onto the latest `develop` before merging it. | ||
| The rule was never recorded as a decision. It appears only as workflow instructions: the | ||
| `open-pull-request` skill requires a rebase before every push, the `merge-pull-request` skill |
There was a problem hiding this comment.
[Nit][F13] The Description states as current the rules this PR removed
Lines 29-31 say "the open-pull-request skill requires a rebase before every push, the merge-pull-request skill requires one immediately before merging"; at the merged head neither does, because this PR rewrote both (lines 115-117). The spec's Background (ISSUE.md:49-52) uses the same present tense, including "AGENTS.md meanwhile says to "only rebase onto develop to resolve conflicts"". Past tense keeps both records true for a reader at develop.
|
|
||
| | Version | Enforcement | | ||
| | ---------------- | ----------- | | ||
| | 2026-07-20 19:00 | active | |
There was a problem hiding this comment.
[Nit][F14] Section 2.2 version times carry no zone
The header says the evidence was collected in UTC and section 2.1 states "times are UTC+01:00"; this table's 2026-07-20 19:00 and 2026-08-05 12:06 state neither, so the two changes cannot be placed against section 2.1's timeline. Naming the zone settles it.


Related to #2507
Summary
Specification PR. It adds the issue specification for #2507, issue-local baseline evidence, and a root ADR that drops the long-standing, never-documented requirement to rebase every pull request onto the latest
developbefore merging. Rebasing stays recommended (when opening a PR, whendevelopis known to have changed, and whenever it is cheap) because it detects integration problems early; it stops being mandatory only to reduce CPU consumption and runner costs. The ADR is proposed as accepted with this PR so the recommendation applies immediately. To avoid conflicting instructions (Copilot review finding F1), this PR also updates theopen-pull-requestandmerge-pull-requestskills andAGENTS.mdto the new rule. The remaining implementation (merge-tool refresh, rulesets, measurements) follows in a separate PR, so #2507 stays open.Key findings (details and reproduction commands in
baseline-evidence.md)open-pull-requestandmerge-pull-requestskills and in the stale-merge-base guard added by PR fix(git): reject stale pull request merge bases #2229.AGENTS.mdcontradicts it.github-merge.pyneeds GitHub'srefs/pull/<n>/mergeto be based on the currentdeveloptip, and GitHub did not recompute it for at least 48 minutes afterdevelopadvanced. That is why a head push is needed today; the spec plans a non-rewriting refresh (GitHub "Update branch" is an accepted fallback).Docs Lint, so it cannot be satisfied. Disabling it also removed the force-push ban.ghostactor; maintainer PRs still get Copilot reviews through personal settings.Files
docs/issues/open/2507-stop-requiring-pull-request-rebases/ISSUE.mddocs/issues/open/2507-stop-requiring-pull-request-rebases/baseline-evidence.mddocs/adrs/20261013161419_stop_requiring_pull_request_rebases.mddocs/adrs/index.md.github/skills/dev/git-workflow/open-pull-request/SKILL.md.github/skills/dev/git-workflow/merge-pull-request/SKILL.mdAGENTS.mddocs/pr-reviews/pr-2508-review/PR-REVIEW.md(review audit)Validation
TORRUST_GIT_HOOKS_LOG_DIR=.tmp ./contrib/dev-tools/git/hooks/pre-commit.sh --format=json: pass (includeslinter all, frontmatter validation, documentation tests)Review requests