Skip to content

docs(issues): [#2525] record the before-baseline of the pull-request CI runner time - #2590

Merged
josecelano merged 6 commits into
torrust:developfrom
josecelano:2525-before-baseline
Oct 21, 2026
Merged

josecelano merged 6 commits into
torrust:developfrom
josecelano:2525-before-baseline

Conversation

@josecelano

@josecelano josecelano commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

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 fix(git): [#2507] refresh the recorded pull-request base and reconcile rulesets #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 Stop requiring pull-request rebases and reconcile repository rulesets #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 fix(git): [#2507] refresh the recorded pull-request base and reconcile rulesets #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)

…equest CI runner time

Task T8(a): record, per documentation-only and per code pull request, the runner time that the pull-request CI costs before the CI gate changes the workflows. It uses every pull_request run of the 98 pull requests merged into develop since 7 October, with the per-run data committed because GitHub deletes old runs, a cross-check against the torrust#2507 sample, and the limits of the measure.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 21, 2026 07:23
@josecelano
josecelano requested a review from da2ce7 October 21, 2026 07:23
@josecelano josecelano self-assigned this Oct 21, 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

Missing cohort-selection metadata prevents the promised offline reproduction of per-PR statistics.

3 open issues
What changed in this PR

Records the pre-gate CI runner-time baseline for #2525, supporting later cost comparisons without changing code, workflows, or rulesets.

Changes:

  • Documents runner-time measurements and collection limits.
  • Saves evidence for 1,189 runs across 98 merged PRs.
  • Marks T8(a) complete in the issue specification.
File Description
docs/​issues/​open/​2525-ci-gate-required-check/​pr-ci-cost-baseline.md Baseline statistics, methodology, and reproduction guidance.
docs/​issues/​open/​2525-ci-gate-required-check/​ISSUE.md Measurement status and progress entry.
docs/​issues/​open/​2525-ci-gate-required-check/​evidence/​pr-ci-runs-2026-10-07-to-2026-10-21.csv Per-run timing evidence.
docs/​issues/​open/​2525-ci-gate-required-check/​evidence/​pr-ci-prs-2026-10-07-to-2026-10-21.json PR classifications and merge metadata.

Review effort: Balanced

josecelano and others added 4 commits October 21, 2026 08:42
…h baseline pull request

The per-pull-request table excludes the pull requests opened before the window, but the saved data did not say which they are, so the table could not be recomputed offline. Save each pull request's creation time and an explicit complete_history flag, and document how the cohort and the percentile are applied.

Co-authored-by: Copilot <[email protected]>
…unts in the baseline

Four of the 444 runs lie between 1.5 and 3.0 minutes, so 392 take under 1.5 minutes, not 394, and four fall in between, not two. Name the four.

Co-authored-by: Copilot <[email protected]>
…ss of pull request

The one-in-nine rate pools documentation-only and code pull requests, so it overstated the rate for documentation-only pull requests, which is what the gate's added cost is compared with. Give the rate per class, 17 of 270 runs for documentation-only (about one in sixteen, a slow-run median of 4.32 minutes) and 31 of 174 for code, and fix the specification's log entry that repeated the pooled rate.

Co-authored-by: Copilot <[email protected]>

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.

🟢 Approval recommended

The documented statistics are supported by the saved evidence, prior feedback is resolved, and no blocking issues remain.

No open issues 🎉

3 resolved since last review

Review effort: Balanced

@josecelano

Copy link
Copy Markdown
Member Author

ACK ab78903

@josecelano
josecelano merged commit 6fd4bc5 into torrust:develop Oct 21, 2026
20 checks passed
josecelano added a commit that referenced this pull request Oct 21, 2026
…or T4 and T5

0ebb431 docs(issues): [#2525] record the approved sandbox plan for T4 and T5 (Jose Celano)

Pull request description:

  Related to #2525

  ## Summary

  Records, in the specification of #2525, the sandbox plan for the two decision gates T4 (gate cost and check-run superseding) and T5 (cross-run state for the maintainer override), as approved by the maintainer on 2026-10-21. The plan is documentation only; it changes no code, workflow, or ruleset, and no experiment has run yet.

  - **Sandbox:** a throwaway sandbox in the fork, like the #2507 sandbox: `exp-2525-*` branches, a ruleset scoped to the base branch requiring `CI gate`, workflows that never reach upstream, and a recorded cleanup. The fork was checked first and is clean.
  - **T4:** E1 measures the runner time the gate adds to a documentation-only pull request for three variants (cold build, Rust cache, prebuilt binary), at least 10 runs each, against the baseline from #2590 (`Docs Lint` median 0.85 minutes). E2 checks, with a real merge push, whether a later check run named `CI gate` supersedes an earlier one in both orders, and what two workflows with the same job name do.
  - **T5:** candidates for where the gate reads earlier results, who applied the label, token permissions, and whether an override survives a push (recommended: it does not), each to be proved with hosted runs.
  - **Decisions of the maintainer:** T4 runs first and its numbers are approved, including the bound for AC6, before T5 starts. The read-only token of a fork pull request cannot be reproduced inside the fork, so T5(c) relies on GitHub's documented behavior and is verified on real upstream pull requests when T6 lands.

  ## Files

  - `docs/issues/open/2525-ci-gate-required-check/ISSUE.md` (new section "Sandbox Plan for T4 and T5", and the progress log)

ACKs for top commit:
  josecelano:
    ACK 0ebb431

Tree-SHA512: 2ab298a123b2d83e8f296f4de2508517af3592d710aee2789b5675a1ae54580288d1f212f44deef5ade7b8a3e46bd4dcfbee855667dac87772c3bd75abf669b3
@da2ce7

da2ce7 commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Post-merge note: this pull request requested a review from this account and was closed without one at its final head. A post-merge review will not be done: It added only documentation and data: the pull-request CI runner-time baseline for #2525 with its raw CSV and JSON evidence and a review record, with no source, manifest or workflow change.

This branch was previously deployed

1 inactive deployment
coverage — ab78903d Deployed Oct 21, 2026 by josecelano via Generate Coverage Report #2656
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