Skip to content

fix(git): [#2507] refresh the recorded pull-request base and reconcile rulesets - #2526

Merged
josecelano merged 31 commits into
torrust:developfrom
josecelano:2507-stop-requiring-pull-request-rebases
Oct 14, 2026
Merged

josecelano merged 31 commits into
torrust:developfrom
josecelano:2507-stop-requiring-pull-request-rebases

Conversation

@josecelano

Copy link
Copy Markdown
Member

Related to #2507

Summary

Implements most of #2507. The issue stays open for the two-week re-measurement (T7) and for the manual checks that need real merges under the new setup (M1, M2, M5, M6); merging this PR with the maintainer tool may itself cover M1 and M2.

Merge tool (fix(git))

A maintainer-approved fork sandbox (evidence in docs/issues/open/2507-stop-requiring-pull-request-rebases/manual-verification-evidence.md, sections T1 and T5) showed that GitHub accepts the maintainer's pushed merge when the pull request's recorded base (base.sha) equals the develop tip; the freshness of refs/pull/<n>/merge is not the condition. The stale-base guard was checking the wrong signal and sent authors to rebase.

github-merge.py now compares base.sha with the fetched develop tip and, when it is stale, refreshes it itself with a no-op base edit (gh api -X PATCH repos/torrust/torrust-tracker/pulls/<n> -f base=develop): no commit, no timeline event, no CI run, no rewritten commits. If the refresh fails or the base is still stale, it refuses before building the merge (exit 4) and prints the command. The "merge differs from github" comparison is skipped when GitHub's own test merge is based on an older tip. Seven new tests; four mutations of the change were each caught.

Rulesets (applied with maintainer approval, outside Git)

  • New always-active force-push ruleset 25068452 (the ban had been off since May together with the disabled required-checks ruleset).
  • Deleted 94237 (unsatisfiable required checks), 19245352 (Copilot review, created and disabled by GitHub), and 87098 (no rules); full definitions saved under the issue's evidence/ folder.
  • New guide docs/github-rulesets.md: every active ruleset and why, the "never disable a ruleset to merge" policy, and a drift check.

Documentation

  • merge-pull-request skill: automatic recorded-base refresh, gh prerequisite, corrected GH013 diagnosis, guardrail against disabling rulesets.
  • ADR 20261013161419: corrected to name the recorded base as GitHub's condition.
  • New issue Require one always-reporting CI gate decided by a Rust tool #2525 and its specification: one always-reporting CI gate required by GitHub, decided by a Rust tool behind thin, provider-agnostic workflows, overridable by a maintainer ci-override label.

Validation

  • python3 contrib/dev-tools/git/tests/test-github-merge-symlinks.py (Python 3.14.4): 47 tests OK
  • bash contrib/dev-tools/git/tests/test-merge-pull-request.sh: passed
  • TORRUST_GIT_HOOKS_LOG_DIR=.tmp ./contrib/dev-tools/git/hooks/pre-commit.sh --format=json: pass before every commit
  • TORRUST_GIT_HOOKS_LOG_DIR=.tmp ./contrib/dev-tools/git/hooks/pre-push.sh --format=json (nightly and stable Rust toolchains): pass

Review requests

  • @da2ce7: please review the merge-tool change and the ruleset changes already applied (see docs/github-rulesets.md).

Copilot AI balanced review requested due to automatic review settings October 14, 2026 10:13
@josecelano
josecelano requested a review from a team as a code owner October 14, 2026 10:13
@josecelano
josecelano requested a review from da2ce7 October 14, 2026 10:13
@josecelano josecelano self-assigned this Oct 14, 2026

Copilot AI 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.

🟡 Changes recommended

The automatic refresh can retarget a PR that does not already target the requested branch.

4 open findings
What changed in this PR

Updates the maintainer merge workflow to refresh GitHub’s recorded PR base without rebasing and documents the reconciled repository rulesets.

Changes:

  • Replaces stale merge-ref enforcement with automatic recorded-base refresh.
  • Adds tests and merge-workflow documentation.
  • Records ruleset changes and creates follow-up issue #2525.
File Description
.github/​skills/​dev/​git-workflow/​merge-pull-request/​SKILL.md Documents base refresh and ruleset safeguards.
contrib/​dev-tools/​git/​github-merge.py Implements recorded-base refresh.
contrib/​dev-tools/​git/​tests/​test-github-merge-symlinks.py Tests refresh behavior.
contrib/​dev-tools/​git/​README-github-merge.md Explains the new merge precondition.
docs/​adrs/​20261013161419_stop_requiring_pull_request_rebases.md Corrects the recorded-base decision.
docs/​github-rulesets.md Documents active rulesets and drift checks.
docs/​index.md Links the ruleset guide.
docs/​issues/​open/​2507-stop-requiring-pull-request-rebases/​ISSUE.md Updates implementation progress and evidence.
docs/​issues/​open/​2507-stop-requiring-pull-request-rebases/​manual-verification-evidence.md Records sandbox and ruleset verification.
docs/​issues/​open/​2507-stop-requiring-pull-request-rebases/​evidence/​created-ruleset-25068452.json Captures the new force-push ruleset.
docs/​issues/​open/​2507-stop-requiring-pull-request-rebases/​evidence/​deleted-ruleset-94237.json Archives the obsolete checks ruleset.
docs/​issues/​open/​2507-stop-requiring-pull-request-rebases/​evidence/​deleted-ruleset-87098.json Archives the empty ruleset.
docs/​issues/​open/​2507-stop-requiring-pull-request-rebases/​evidence/​deleted-ruleset-19245352.json Archives the Copilot ruleset.
docs/​issues/​open/​2525-ci-gate-required-check/​ISSUE.md Specifies the future unified CI gate.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread contrib/dev-tools/git/github-merge.py Resolved

@da2ce7 da2ce7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed at bdc3d70a2153f3e91a93e8d6696ab2a2497c2b55 (round 1). Recomputed from the bytes at this head, against the merge base d1bf013ea; develop is d1bf013ea and the merge is clean.

The PR replaces the merge tool's merge-ref guard with a check of the pull request's recorded base (base.sha), refreshed by a gh api -X PATCH … -f base=<branch> edit when stale; aligns the merge skill, the tool's README and the ADR with that condition; records the fork-sandbox and ruleset evidence of issue #2507 with four ruleset definitions; adds docs/github-rulesets.md; and adds the issue #2525 specification. The review bot had posted no review on this PR, so findings start at F1.

Tool. The check runs after the fetch of develop and the PR refs and before the temporary branches and the local merge (require_current_recorded_base(...) at line 668 follows current_base = ... at 667); its messages go to stderr; exit 4 keeps its value under the new constant name. The exception tuple covers a missing gh (OSError), a non-zero exit, a non-JSON body (ValueError), a missing key and a non-object body; the response check is [0-9a-f]{40}. With a stale GitHub merge the comparison is skipped with a message and diff = b'', which only suppresses the warning. The write is announced in the README and as a skill prerequisite. The refresh assumes the PR already targets the merge branch, which nothing checks (F1); gh's own error text is dropped (F5). With both base.sha and the refresh missing the error prints None (cosmetic, not raised).

Tests. 47 pass offline at this head (Python 3.14.6, 22.4 s). develop has 41: one case was replaced (the old stale-merge refusal, now the opposite behaviour), seven were added, the other 40 are untouched. The five fixture cases cover the four outcomes of require_current_recorded_base (current; refreshed to the tip; refresh fails; still stale) and the skipped comparison; the two gh cases assert the exact argv including -f base=develop, and the invalid-sha branch. AAA comments and it_should_ names throughout. The four mutations are recorded in the spec's T2 row, and by reading each fails at least one case. No case has a PR whose base ref differs from the merge target (F1).

Skill, README, ADR. The prerequisite item, the rewritten preflight paragraph, the GH013 diagnosis and the table row match the code; the guardrail's link (five ../) and all 94 relative links in the changed Markdown resolve. create-adr has no rule for amending a merged ADR; the in-place correction states its provenance. The ADR's third required-update case, its alternatives and its Description still name the merge ref (F2). The #2508 post-merge findings F6, F7, F8, F13 and F14 sit on lines this PR does not touch and stand; that review's note on the "keeps refusing … stale GitHub merge ref" bullet is resolved by the rewrite.

Rulesets guide and evidence. The created ruleset 25068452 matches its row (~ALL minus dependabot/**/* and staging/**/*, only non_fast_forward, no bypass) and 94237's conditions; the three deleted definitions match the deletion sentence (94237: 16 contexts, strict true, disabled; 19245352 disabled; 87098 active with no rules). The expected develop list creation,pull_request,deletion,non_fast_forward,required_signatures is exactly what 87085, 25068452 and 94133 contribute; no other tabulated ruleset reaches develop. The policy bullets agree with the ADR's GitHub-configuration paragraph. Stored JSON provenance: F9.

The #2507 spec and evidence. T1–T8 statuses agree with the diff; the AC5, AC7 and AC8 ticks have evidence, AC5's release-branch part only in the spec (F4); AC3 now contradicts T2 (F3); three stamps post-date their commits (F6); the evidence's T1 status (F7) and the target-state table (F8) lag the recorded decisions. status: in-progress and the branch change follow create-issue. The evidence keeps the template's sections, with experiment-named process sections.

Issue #2525 spec. Frontmatter complete; the eight artifact paths and four skill links exist; sections in template order; T1–T7 and AC1–AC7 consistent with the Scope. The branch without -spec is Step 3's "No spec-only PR" form, the Progress Log states the spec ships with the #2507 implementation PR, and the spec-only checkpoint stays unticked. Its "six of its 16" recomputes from 94237's contexts against the head's job names.

Hygiene. Fourteen Conventional subjects (docs(github) has prior use on develop); the [#2507] tag on all but the Step 5 subject of 6fc5fcff5; bodies true to their diffs; author = committer; ascending author times 06:47Z–10:12Z; one trailer line each; git diff --check clean; no banned token; project-words.txt untouched. "Related to #2507" keeps the issue open for T7 and M1/M2/M5/M6.

Findings

F1 Major; F2 and F3 Minor, blocking (each leaves a governing document contradicting the tool at this head); F4 Minor, not blocking; F5 Suggestion; F6–F9 Nit. All inline.

Checked, no finding

  • Base check order, stderr messages, exit-code constant, exception tuple, sha pattern, skipped-diff consumer.
  • 47/47 tests; argv assertion; AAA form; fixture state file and base_refresh_calls().
  • Skill list numbering, anchor, guardrail link; README section against the code.
  • Guide table against the four JSONs; drift list; policy against the ADR; index row; frontmatter paths and skills.
  • create-issue branch rule for both specs; #2525 artifacts and skill links.
  • Commit form, times, trailers, whitespace, token.

Checks

On the loop's compute hub at this head, merge base d1bf013ea (git merge-tree clean against d1bf013ea, the develop of dispatch; receipt server-gates-krkavec-273): pre-commit profile gate exit 0 (78 s); linter markdown, linter cspell, linter lychee, linter yaml exit 0; frontmatter-validator --all: 19 errors / 4 warnings at this head and 19 / 4 at d1bf013ea re-measured, none in the files this PR touches; python3 contrib/dev-tools/git/tests/test-github-merge-symlinks.py: 47 tests OK (16 s); python3 -m py_compile contrib/dev-tools/git/github-merge.py exit 0; validate-audit-record.py --pr-number 2526 reports that no audit record exists yet for this PR. GitHub checks at this head at posting time: "Publish (Release): completed/skipped; Publish (Development): completed/skipped; Context: completed/success; Package Coverage (${{ matrix.package }}): completed/skipped; Package Coverage Regression: completed/success; Test (Docker) (release): completed/success; Build on windows-latest (nightly): completed/success; Build on macos-latest (nightly): completed/success; Build on ubuntu-latest (nightly): completed/success; Build on macos-latest (stable): completed/success; Build on ubuntu-latest (stable): completed/success; Build on windows-latest (stable): completed/success; Docker E2E: completed/skipped; Discover Package Coverage: completed/success; Docs Lint: completed/success; Generate Coverage Report: completed/success; Layer Boundary Bans: completed/success; Unit (stable): completed/success; Unit (nightly): completed/success; Documented Clippy Allows: completed/success". At posting, develop is 55e879a3c.

Comment thread contrib/dev-tools/git/github-merge.py Resolved
Comment thread contrib/dev-tools/git/github-merge.py Resolved
josecelano added a commit to josecelano/torrust-tracker that referenced this pull request Oct 14, 2026
@josecelano
josecelano force-pushed the 2507-stop-requiring-pull-request-rebases branch from 0d15ed7 to 5ba0657 Compare October 14, 2026 10:52
josecelano added a commit to josecelano/torrust-tracker that referenced this pull request Oct 14, 2026
@josecelano
josecelano requested a review from da2ce7 October 14, 2026 10:58
da2ce7
da2ce7 previously approved these changes Oct 14, 2026

@da2ce7 da2ce7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed at 5ba0657d97598767c6b9959006b7db071b703129 (round 2 of the loop's review, posted at the rebased head; the round computed at da1b23295 was superseded by the eight fix commits, the rebase and the audit record before it posted). Recomputed from the bytes at this head, against the merge base 01bdb2c8b, which is develop; the rebase is pure.

The nine new commits (cd13de6e4 to 5ba0657d9, +367/−32 over seven files) add the timeout and error report to the tool with two tests, restate the ADR and open-pull-request around the recorded base, correct the #2507 Background, stamps, T1 evidence, target-state rows and ruleset-export commands, and add the audit record. The first eighteen commits are = in git range-diff d1bf013ea..da1b23295 01bdb2c8b..999c672bd, and their cumulative diff is byte-identical to the former one; the pre-rebase tip 2b4d22f25 is not in this clone, but develop changed five files, none of them in this PR, so the rebase cannot have altered a patch. git merge-tree is clean.

Target refusal (carried from round 2: fix(git): [#2507] refuse a pull request that targets another branch before refreshing its base). if recorded_ref != branch: precedes the base comparison and any PATCH, exits 4 and edits nothing; a missing ref (None) refuses too. it_should_refuse_without_editing_a_pull_request_that_targets_another_branch asserts exit 4, base_refresh_calls() == [] and the message; the current-base case pins the order. Both fail on the code before the fix.

Timeout and report (cd13de6e4). subprocess.run(..., timeout=GH_TIMEOUT_SECONDS) with GH_TIMEOUT_SECONDS = 60; TimeoutExpired prints "gh timed out after 60 s."; CalledProcessError prints gh's stderr through the tool's sanitize (drops every Unicode control character except newline); the error names "an unknown commit" instead of None. The 403 case fails if str(e) returns; the sleeping-gh case (timeout 1 s) fails without the timeout. 51 tests pass offline at this head (Python 3.14.6, 28.6 s).

Round-1 findings. The audit renumbers this review's round-1 findings: F1 is audit F10, F2 is F11, F3 is F12, F5 is F13, and F4 and F6–F9 keep their numbers; this review uses the audit's ids from here on.

  • F10 (= the review bot's F1): fixed by the target-refusal commit above.
  • F11: fixed by ebd3879f6 and 83c894639. Case 3 reads "The pull request's recorded base is stale and the maintainer merge tool's own refresh is unavailable"; B names GH013 "while the recorded base is stale", C "a reliable refresh of the recorded base", the transition "refuses it as stale", the Description the merge-ref guard as history; open-pull-request:60-61 matches. That is when the tool refuses: the PATCH fails or times out, or the refreshed base is still not the tip. The target refusal is a separate case that no rebase fixes, and the cases rightly leave it out.
  • F12 (= the bot's F2): fixed by docs(issues): [#2507] align the scope and AC3 with the recorded-base check and 4c13f9729 ("Correction from T1").
  • F4 (= the bot's F5): fixed by docs(issues): [#2507] record the release-branch ruleset check in the evidence.
  • F13: fixed by cd13de6e4, above.
  • F6: fixed by 14d6667fa: 06:47 and 07:24 are at or before their commits (06:47:59Z, 07:24:42Z).
  • F7: fixed by 4e15097de. F8: fixed by 9eea2eeaf.
  • F9: fixed by 884523d79: the two recorded --jq filters yield exactly the key sets stored (nine keys, eight for the created ruleset).

Audit record (5ba0657d9). It has the template's sections in order. Completion Rules are verbatim; Status Values and Ownership differ only by the template's guidance comments and the filled placeholder. The ids are unique, and the review bot's review carried no F4, so none was dropped. Every row's severity matches its source bracket; the thirteen reply URLs answer their own threads; every Current-tree verification grep returns the stated count at this head. Processing Log times match the commit author times and the reply times (10:39:11Z to 10:39:15Z, 10:47:58Z to 10:48:13Z). validate-audit-record.py --comments-file … --base 01bdb2c8b returns {"status": "ok", "rows": 13, "log_entries": 11, "failures": 0}. The capture shows all thirteen threads resolved. The inventory leaves out nine reply containers (F16).

First raised this round (computed at da1b23295, never posted): F14 (the spec's Progress Log) and F15 (the merge skill and the target refusal).

Hygiene. Nine Conventional subjects with existing scopes (fix(git), docs(adrs), docs(skills), docs(issues), docs(pr-reviews)), all tagged [#2507]. The one body (cd13de6e4) is true to its diff. Author = committer identity; author times ascend from 10:43:09Z to 10:50:55Z, committer times are 10:51:50Z to 10:52:01Z (the rebase). One trailer line each; git diff --check is clean; no banned token. The PR is open, not draft, head 5ba0657d9, recorded base 01bdb2c8b.

Findings

F14, F15, F16: Nit, not blocking. No blocking finding stands.

Checked, no finding

  • Ref check order, timeout bound, stderr sanitation, None wording.
  • 51/51 tests; each new case fails on the code before its fix.
  • ADR cases, alternatives, transition and Description; open-pull-request case 3.
  • Stamps against commits; T1 status; target-state rows; export filters.
  • Audit ids, severities, reply threads, verification greps, log order, validator.
  • Rebase purity, commit form, trailers, whitespace, token.

Checks

On the loop's compute hub at this head, merge base 01bdb2c8b (git merge-tree clean against 01bdb2c8b, the develop of dispatch; receipt server-gates-krkavec-278): pre-commit profile gate exit 0 (77 s); linter markdown, linter cspell, linter lychee, linter yaml exit 0; frontmatter-validator --all: 19 errors / 4 warnings at this head and 19 / 4 at 01bdb2c8b re-measured, none in the files this PR touches; python3 contrib/dev-tools/git/tests/test-github-merge-symlinks.py: 51 tests OK; python3 -m py_compile contrib/dev-tools/git/github-merge.py exit 0; validate-audit-record.py --pr-number 2526 exit 0 against this head's audit record (13 rows, 11 log entries, 0 failures). GitHub checks at this head at posting time: "Publish (Development): completed/skipped; Publish (Release): completed/skipped; Context: completed/success; Docker E2E: completed/skipped; Unit (nightly): completed/success; Documented Clippy Allows: completed/success; Unit (stable): completed/success; Layer Boundary Bans: completed/success; Package Coverage (${{ matrix.package }}): completed/skipped; Package Coverage Regression: completed/success; Test (Docker) (release): completed/success; Docs Lint: completed/success; Build on ubuntu-latest (nightly): completed/success; Build on windows-latest (stable): completed/success; Build on ubuntu-latest (stable): completed/success; Build on windows-latest (nightly): completed/success; Build on macos-latest (stable): completed/success; Build on macos-latest (nightly): completed/success; Generate Coverage Report: completed/success; Discover Package Coverage: completed/success". At posting, develop is 01bdb2c8b.

@da2ce7

da2ce7 commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

ACK 5ba0657 — verified the target refusal and the bounded base refresh (51 offline tests), every round-1 finding fixed in the tree, the pure rebase onto 01bdb2c and an audit record that validates with no failures

josecelano added a commit to josecelano/torrust-tracker that referenced this pull request Oct 14, 2026
josecelano added a commit to josecelano/torrust-tracker that referenced this pull request Oct 14, 2026
josecelano added a commit to josecelano/torrust-tracker that referenced this pull request Oct 14, 2026
josecelano and others added 5 commits October 14, 2026 12:44
…ecisions

Record the maintainer decisions from the sandbox evidence: the merge
tool refreshes the recorded pull-request base with a no-op base edit,
and required checks move to a follow-up CI gate issue. Correct the ADR,
which named merge-ref freshness instead of the recorded base as the
condition GitHub checks.

Co-authored-by: Copilot <[email protected]>
…base before merging

GitHub accepts the maintainer's pushed merge only while the pull
request's recorded base (base.sha) is the target tip; the freshness of
refs/pull/<n>/merge is not the condition (issue torrust#2507 sandbox). The
guard therefore compared the wrong signal and sent authors to rebase.

The tool now compares the recorded base with the fetched target tip
and, when it is stale, refreshes it with a no-op base edit through the
GitHub CLI. It refuses before building the merge, printing the manual
command, when the refresh fails or the base is still stale. The
"merge differs from github" comparison is skipped when GitHub's own
merge is based on an older tip.

Co-authored-by: Copilot <[email protected]>
josecelano and others added 14 commits October 14, 2026 12:44
…t with a timeout

Print the GitHub CLI's own error text when the base edit fails, give
up after 60 seconds instead of stalling before the first prompt, and
name an unknown recorded base instead of printing None.

Co-authored-by: Copilot <[email protected]>
…ondition for a required update

Co-authored-by: Copilot <[email protected]>
@josecelano
josecelano force-pushed the 2507-stop-requiring-pull-request-rebases branch from 59394b8 to 8ab3174 Compare October 14, 2026 11:44

@da2ce7 da2ce7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed at 8ab3174a51fbfc78dcd2d84864cc0bd86bb1a44d (round 3 of the loop's review; the approval at 5ba0657d9 was dismissed by the push). Recomputed from the bytes at this head, against the merge base 1c6707a43, which is develop; the rebase is pure.

Four commits and the rebase. e6701b465, 671180903, e1845ca8b and 8ab3174a5 change three files (+89/−5): the merge skill, the #2507 spec and the audit record. git range-diff 01bdb2c8b..59394b878 1c6707a43..8ab3174a5 shows thirty-one = and nothing else, the cumulative diffs against the two bases are byte-identical, and develop touched none of this PR's files. The former round-3 tip 5ba0657d9 is now 36b45c447.

  • F14: FIXED by 671180903. The 11:40 entry names the Scope and AC3 restatement, related-pr, the AC5 citation, the "Correction from T1", the two stamps, the target-state rows and the tool changes. last-updated-utc: "2026-10-14 11:40" matches it and precedes its commit (11:41:05Z).
  • F15: FIXED by e6701b465. The preflight paragraph now says that, before anything else, the tool refuses a PR "whose recorded target is not develop, exiting with code 4". It quotes the message, which matches the tool's line 200 byte for byte apart from the two elided values, and only then describes the base comparison. That is the tool's order.
  • F16: FIXED by e1845ca8b. The inventory names all thirteen round-1 containers with their times (10:39 UTC; 10:47 to 10:48 UTC).

Audit record. 8ab3174a5 adds rows F14–F16 (Nit, ORIGINAL, FIXED/RESOLVED), which match this review's brackets; their source URLs are comments 4270052643, 4270052662 and 4270052671, and their replies (4270279050, 4270279501, 4270287171) answer those threads. Each Current-tree verification holds at this head: the stamp line and the "Processed the PR #2526 reviews" entry occur once each, the skill grep returns 1, and the thirteen container ids match the capture. The round-2 paragraph's containers 5517303862, 5517304380 and 5517313477 (11:41:21Z to 11:42:14Z) and the new log entries (10:53, 11:16, 11:40, 11:42, 11:42) agree with the review, reply and commit times. validate-audit-record.py --comments-file … --base 1c6707a43 returns {"status": "ok", "rows": 16, "log_entries": 16, "failures": 0}. All sixteen threads are resolved in the capture.

The tool and its tests are byte-identical to round 3, so that round's tool, test (51 offline) and earlier rebase conclusions carry over by reference.

Hygiene. Four Conventional subjects (docs(skills), docs(issues), docs(pr-reviews) twice), all tagged [#2507] and without bodies. Author = committer identity; author times ascend from 11:40:28Z to 11:43:18Z; committer times are 11:44:18Z to 11:44:19Z (the rebase, 11:44:07Z to 11:44:19Z across all thirty-one). One trailer line each; git diff --check is clean; no banned token. The PR is open, not draft, head 8ab3174a5, recorded base 1c6707a43.

Findings

None.

Checked, no finding

  • Range-diff, cumulative diff, file overlap with develop.
  • F14 entry contents and stamp; F15 message bytes and order; F16 container ids and times.
  • Rows F14–F16: severity, sources, replies, verification greps, log order, validator.
  • Commit form, times, trailers, whitespace, token.

Checks

On the loop's compute hub at this head, merge base 1c6707a43 (git merge-tree clean against 1c6707a43, the develop of dispatch; receipt server-gates-krkavec-280): pre-commit profile gate exit 0 (82 s); linter markdown, linter cspell, linter lychee, linter yaml exit 0; frontmatter-validator --all: 19 errors / 4 warnings at this head and 19 / 4 at 1c6707a43 re-measured, none in the files this PR touches; python3 contrib/dev-tools/git/tests/test-github-merge-symlinks.py: 51 tests OK; python3 -m py_compile contrib/dev-tools/git/github-merge.py exit 0; validate-audit-record.py --pr-number 2526 exit 0 against this head's audit record (16 rows, 16 log entries, 0 failures). GitHub checks at this head at posting time: "Package Coverage (${{ matrix.package }}): completed/skipped; Package Coverage Regression: completed/success; Test (Docker) (release): in_progress/pending; Docker E2E: completed/skipped; Unit (stable): in_progress/pending; Unit (nightly): in_progress/pending; Layer Boundary Bans: completed/success; Documented Clippy Allows: completed/success; Build on ubuntu-latest (stable): completed/success; Build on macos-latest (nightly): completed/success; Build on ubuntu-latest (nightly): completed/success; Build on windows-latest (nightly): completed/success; Build on macos-latest (stable): completed/success; Build on windows-latest (stable): completed/success; Discover Package Coverage: completed/success; Docs Lint: completed/success; Generate Coverage Report: in_progress/pending". At posting, develop is 1c6707a43.

@da2ce7

da2ce7 commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

ACK 8ab3174 — verified the three Nit fixes, the sixteen-row audit record that validates with no failures, and a pure rebase onto 1c6707a that leaves the tool and tests unchanged

@josecelano

Copy link
Copy Markdown
Member Author

ACK 8ab3174

@josecelano
josecelano merged commit c1874fa into torrust:develop Oct 14, 2026
20 checks passed
josecelano added a commit that referenced this pull request Oct 16, 2026
…measurement to #2547

Record manual scenarios M1 to M6 and M8 from the 18 real merges from
PR #2526 to #2543. M1 is proven indirectly, because the merge-tool output
was not captured. Tick AC1 to AC4 and AC6 with evidence, and move T7 and
AC9 to follow-up issue #2547 by maintainer decision. Add a Closure Plan,
the implementation retrospective, and the Task Reviewer report.

Co-authored-by: Copilot <[email protected]>
josecelano added a commit that referenced this pull request Oct 16, 2026
…and move the measurement to #2547

b2d33e1 docs(pr-reviews): add the reply URL of the eighth review round of PR #2550 (Jose Celano)
514cef3 docs(pr-reviews): record the eighth review round of PR #2550 (Jose Celano)
d1a5498 docs(pr-reviews): add the reply URL of the seventh review round of PR #2550 (Jose Celano)
af0da1a docs(pr-reviews): record the seventh review round of PR #2550 (Jose Celano)
759278c docs(pr-reviews): add the reply URL of the sixth review round of PR #2550 (Jose Celano)
2fb9cb0 docs(pr-reviews): record the sixth review round of PR #2550 (Jose Celano)
d5537ac docs(pr-reviews): add the reply URLs of the fifth review round of PR #2550 (Jose Celano)
c22fc52 docs(issues): [#2507] log the fifth PR #2550 review round (Jose Celano)
db1d2e4 docs(pr-reviews): record the fifth review round of PR #2550 (Jose Celano)
04d82d3 docs(issues): [#2547] state the selection rules as this specification's own (Jose Celano)
36ca2d1 docs(pr-reviews): add the reply URLs of the fourth review round of PR #2550 (Jose Celano)
09792d3 docs(issues): [#2507] log the fourth PR #2550 review round (Jose Celano)
a1bfb60 docs(pr-reviews): record the third dismissal and the fourth review round of PR #2550 (Jose Celano)
91a39a1 docs(issues): [#2547] limit the shared population to the force-push measures (Jose Celano)
b7a547d docs(pr-reviews): add the reply URLs of the third review round of PR #2550 (Jose Celano)
916925c docs(issues): [#2507] log the third PR #2550 review round (Jose Celano)
4b92ec0 docs(pr-reviews): record the second dismissal and the third review round of PR #2550 (Jose Celano)
1aecd2b docs(issues): [#2507] name the contradiction in the second re-review's scope (Jose Celano)
cbf2b8b docs(issues): [#2547] count and classify the force-pushes of the PRs merged in the window (Jose Celano)
7386f69 docs(pr-reviews): record the dismissed approval and the second review round of PR #2550 (Jose Celano)
c20f6cc docs(issues): [#2507] log the second PR #2550 review round (Jose Celano)
3e6f931 docs(issues): [#2547] label the PR #2531 merge time as merged_at (Jose Celano)
014c0e7 docs(issues): [#2507] state what the second re-review did not check (Jose Celano)
1dea064 docs(issues): [#2507] classify the V4 force-pushes by whether the push moved the base (Jose Celano)
e774c1d docs(issues): [#2507] set the evidence stamp to its newest edit (Jose Celano)
0dbe53d docs(issues): [#2547] classify a force-push by whether it moved the base (Jose Celano)
2562247 docs(pr-reviews): add the PR #2550 review audit (Jose Celano)
975501e docs(issues): [#2507] record the Task Reviewer's re-review of the close-out fixes (Jose Celano)
3fa9bca docs(issues): [#2547] log the edits that moved the last-updated stamp (Jose Celano)
c72184d docs(issues): [#2547] use the merge time that GitHub reports for PR #2531 (Jose Celano)
436a91d docs(issues): [#2507] account for every force-push of the 18 merges in V4 (Jose Celano)
a2eb4c1 docs(issues): [#2507] describe M1 as inferred, not proven (Jose Celano)
4b1c567 docs(issues): [#2507] attribute the delivery-sequence log line to the #2525 spec (Jose Celano)
08d1e07 docs(issues): [#2507] label the force-push event commits and record how to fetch them (Jose Celano)
7a3d1cc docs(issues): [#2547] classify force-pushes that are not rebases separately (Jose Celano)
b2bcd00 docs(issues): [#2547] use the merge's target tip as the refresh-path cutoff (Jose Celano)
2733f2e docs(issues): [#2547] limit the rebase-fallout baseline to 1 to 13 October (Jose Celano)
f4d1817 docs(issues): [#2525] record the agreed delivery sequence (Jose Celano)
3cb3548 docs(issues): [#2507] record the close-out verification and move the measurement to #2547 (Jose Celano)
38658d8 docs(issues): add issue specification for #2547 (Jose Celano)

Pull request description:

  Related to #2507

  ## Summary

  Closes out #2507 without waiting two weeks, records the follow-up issue #2547 that takes over its measurement, and records the agreed delivery sequence for #2525. Documentation only: every change is under `docs/issues/open/`.

  ### #2547 specification (`docs(issues)`)

  New `docs/issues/open/2547-measure-effect-of-optional-rebases/`. The maintainer approved the draft and the issue was created on GitHub. It takes over #2507 task T7 and acceptance criterion AC9: compare 2026-10-15 to 2026-10-28 with the #2507 baseline, classify each force-push as required (conflict) or recommended, and count merges through the merge tool's recorded-base refresh. It starts no earlier than 2026-10-29.

  ### #2507 close-out (`docs(issues)`)

  - **Manual verification** from the 18 real merges from PR #2526 to #2543 (`manual-verification-evidence.md`, section "Merges Under the New Policy"):
    - nine pull requests merged while behind `develop` without a rebase at merge time (M2), and every merged head stays reachable from `develop` (M3);
    - six were merged through the recorded-base refresh (M1). This is indirect evidence: the tool output was not captured, so the reasoning from GitHub state is spelled out in section V1;
    - #2532 and #2537 took the conflict rebase path (M4);
    - code and documentation-only merges happened with no ruleset changed (M5, M6), and first-parent history has one merge per pull request (M8).
  - **Acceptance criteria:** AC1 to AC4 and AC6 ticked with evidence. The maintainer accepted AC6 while no check is required, with the required `CI gate` tracked by #2525. AC9 and T7 were reworded as moved to #2547.
  - **New Closure Plan (C1 to C7)** in the spec, so the remaining steps are written down. After this PR merges, #2507 is closed manually on GitHub and its spec is archived with `cleanup-completed-issues`.
  - **New files:** `implementation-retrospective.md` and `agent-review-reports.md`, the latter holding the Task Reviewer report. The Task Reviewer's first verdict was `REVIEW FAILED` (five should-fix and three nit findings, all fixed); a later re-review first failed on residual wording and then passed, and each verdict is its own entry.

  ### #2525 delivery sequence (`docs(issues)`)

  - **Rust first:** pure-Rust tasks T1 to T3, then the sandbox decision gates T4 and T5.
  - **Before-baseline:** recorded before the orchestrator merges.
  - **Gate not required at first (T6):** `CI gate` lands reporting but not required, and is observed on real code and documentation-only pull requests.
  - **Then required (T7):** only with maintainer approval, with the ruleset JSON saved and a rollback documented.
  - **Measurement split (T8):** moved to a follow-up issue created when the gate becomes required, so #2525 can close without a waiting period.

  ## Validation

  - `TORRUST_GIT_HOOKS_LOG_DIR=.tmp ./contrib/dev-tools/git/hooks/pre-commit.sh --format=json`: pass.
  - `TORRUST_GIT_HOOKS_LOG_DIR=.tmp ./contrib/dev-tools/git/hooks/pre-push.sh --format=json` (nightly and stable Rust toolchains): pass, after rebasing onto `develop`.
  - `python3 contrib/dev-tools/git/tests/test-github-merge-symlinks.py` (Python 3.14.4): 51 tests OK. `bash contrib/dev-tools/git/tests/test-merge-pull-request.sh`: passed.
  - Independent Task Reviewer re-derived the evidence from `git` and `gh api`; its reports and two re-reviews are in `agent-review-reports.md`.
  - Review round: the findings of Copilot and da2ce7 are fixed in separate signed commits and recorded in `docs/pr-reviews/pr-2550-review/PR-REVIEW.md`; `validate-audit-record.py --pr-number 2550` reports no failures.

  ## Notes for reviewers

  - The PR-branch commit-id check from the `open-pull-request` skill reports the before and after commits of the #2532 and #2537 force-pushes (for example `55a414e98`) once a clone has fetched them. They are not commits of this branch: V4 cites them as the `beforeCommit` and `afterCommit` values of GitHub's `HeadRefForcePushedEvent`, with the fetch step and the full ids recorded. The skill defines no exception for this case.
  - The evidence cites `develop` at `fd04ac51e`. This branch was then rebased onto `30b368f0f` before opening; the two newer merges (#2500 and #2544) are outside the evidence window.

ACKs for top commit:
  da2ce7:
    ACK b2d33e1 — the round-9 correction entry against the captured times, the audit's twenty-nine rows against the captured reviews, thread, reply and timeline, and the commit-id check were recomputed with no finding
  josecelano:
    ACK b2d33e1

Tree-SHA512: 17030dd5806832cc53121a800b1681b816fb6ea61c560c7c390cee34aa8a95d3f6d59d3fdff78991f463ba1278ae8d37951c8497014f0e4221269974e8dd46eb
josecelano added a commit that referenced this pull request Oct 19, 2026
…ssues/closed

2e5e8ee chore(issues): archive closed issue #2507 spec to docs/issues/closed (Jose Celano)

Pull request description:

  Related to #2507

  Archives the specification of issue #2507 (closed on GitHub as completed) from `docs/issues/open/` to `docs/issues/closed/`, following the closure plan in the spec and the `cleanup-completed-issues` skill.

  - Verified #2507 is `CLOSED` on GitHub, after its implementation (#2526) and close-out (#2550) merged.
  - Updated the frontmatter of the moved files (`status: done`, `spec-path`, `related-artifacts`, `last-updated-utc`), ticked the closing checkpoint, and marked C6 and C7 of the closure plan as done.
  - Repaired the live links: the ADR `20261013161419` and the #2547 specification now point to the closed folder. The PR review audits keep the paths they recorded.
  - Searched the repository for the old folder name; only those audits still carry it.
  - `pre-commit` and `pre-push` scripts passed (documentation only, no code changes).

ACKs for top commit:
  josecelano:
    ACK 2e5e8ee

Tree-SHA512: 3f42c699b3d05ee5e1b9e258801d447936ae09263fc33d4e273ff0929c393615c34a660f8c94360d8db39b5c1fbf835c59ac9e1833ea91711443b87d9aaf179a
josecelano added a commit that referenced this pull request Oct 21, 2026
…pull-request CI runner time

ab78903 docs(pr-reviews): add the PR #2590 review audit (Jose Celano)
265604d docs(issues): [#2525] record the first review round of the T8 pull request (Jose Celano)
fcf90a1 docs(issues): [#2525] give the Docs Lint slow-run rate per class of pull request (Jose Celano)
d331e47 docs(issues): [#2525] correct the Docs Lint duration bucket counts in the baseline (Jose Celano)
359001b docs(issues): [#2525] save the creation time and cohort of each baseline pull request (Jose Celano)
6d09b4c docs(issues): [#2525] record the before-baseline of the pull-request CI runner time (Jose Celano)

Pull request description:

  Related to #2525

  ## Summary

  Task T8(a) of #2525: record what the pull-request CI costs in runner time **before** the `CI gate` orchestrator (T6) changes the workflows, per documentation-only and per code pull request. GitHub deletes old workflow runs, so this has to be captured before T6 merges. The pull request is documentation and data only; it changes no code, workflow, or ruleset.

  ## Result

  Runner time is the sum of job durations (queue time not included), over every `pull_request` run of the 98 pull requests merged into `develop` since 7 October (1,189 attributed runs). Pull requests are classified with `ci-gate classify` on their final file list.

  - **Per pushed head:** documentation-only 1.1 runner minutes (median 0.85), code 87.8 (90.8 since #2526 made rebasing optional).
  - **Per pull request** (the 87 with a complete history in the window): documentation-only mean 5.4, median 3.8; code mean 377.3, median 266.5. Both are dominated by how many times a pull request is pushed, about 4.3 to 4.9 heads each.
  - **`Docs Lint` is bimodal:** 392 of 444 runs take under 1.5 minutes, 4 fall in between, and 48 (11%) take 3.0 to 4.9, probably cache misses (not confirmed). For documentation-only pull requests the slow share is 17 of 270 runs (6.3%, about one in sixteen). It is the only workflow a documentation-only pull request runs, so it is what the gate's added cost in T4 will be compared with.

  ## Method and limits

  - Every run is measured, not sampled as in #2507. The two agree within sampling noise for most workflows (cross-check table in the document); `Container` differs most (13.4 against 9.3).
  - The first collection silently dropped 245 of 1,245 runs, because a runs listing is capped at 1000 results. Comparing with `total_count` showed it, and the collection now queries one day at a time and asserts completeness. This is recorded in the document.
  - Limits recorded in the document: runner time is not wall-clock time or money; the two-week window straddles #2526; 57 runs from closed or open pull requests are excluded; 11 pull requests opened before the window are left out of the per-pull-request figures.
  - The collection script is not committed. The commands it ran are in the document, and the raw per-run data is committed so every figure can be recomputed without GitHub.

  ## Files

  - `docs/issues/open/2525-ci-gate-required-check/pr-ci-cost-baseline.md` (new)
  - `docs/issues/open/2525-ci-gate-required-check/evidence/pr-ci-runs-2026-10-07-to-2026-10-21.csv` and `pr-ci-prs-2026-10-07-to-2026-10-21.json` (new, 1,189 runs and 98 pull requests)
  - `docs/issues/open/2525-ci-gate-required-check/ISSUE.md` (T8 status and progress log)

ACKs for top commit:
  josecelano:
    ACK ab78903

Tree-SHA512: f272345e9eab22d39879ac81656261d48f92b64bac042aafd48591d00657e7a50729554f89b4961ace71753b8d41869cf4aa7e276bc063e450655cad54739d63

This branch was previously deployed

1 inactive deployment
coverage — 8ab3174a Deployed Oct 14, 2026 by josecelano via Generate Coverage Report #2521
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.

3 participants