[PR #1981] [MERGED] CI: parity on main, a batch of merges at a time; releases wait for it #3910

Closed
opened 2026-11-03 04:13:12 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1981
Author: @ludovic111
Created: 10/25/2026
Status: ✅ Merged
Merged: 10/25/2026
Merged by: @ludovic111

Base: main ← Head: ci/parity-main


📝 Commits (1)

  • 73da2f0 CI: parity on main, a batch of merges at a time; releases wait for it

📊 Changes

9 files changed (+356 additions, -17 deletions)

View changed files

📝 .github/workflows/ci.yml (+32 -2)
➕ .github/workflows/parity-main.yml (+70 -0)
📝 .github/workflows/release.yml (+6 -4)
📝 docs/parity-workflow.md (+2 -0)
📝 docs/release-flow.md (+27 -3)
➕ tests/test_parity_main.py (+43 -0)
📝 tests/test_release_train.py (+21 -0)
➕ tools/parity_main.py (+129 -0)
📝 tools/release_train.py (+26 -8)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

What

Proposal B from ci-speed-1 (approved by the orchestrator): the vanilla harnesses run on main, a batch of merges at a time, and releases wait for them.

  • .github/workflows/parity-main.yml: on every push to main, on the Mac mini's runner, concurrency: parity-main with no cancelling. GitHub keeps one run going and one pending (the newest), so merges that land during a run are batched into the next by construction.
    • tools/parity_main.py base: the newest commit HEAD contains whose parity-main passed, else HEAD's first parent. The run is parity.py --changed <base>: the union of the batch's harnesses, once, with earlier passes reused.
    • On failure, tools/parity_main.py bisect <base> --comment: it checks out the batch's first-parent merges by halves and runs only the failing harnesses (from last-run.json; harnesses a commit doesn't have yet count as passing there). It names the first breaking merge in the summary and comments on its PR (🤖 Agent: parity-main found ...), then checks out HEAD again.
  • Releases (tools/release_train.py, game only): they ship only a commit both checks and parity-main passed on. Without --head, it takes the newest commit parity-main passed on (superseded/cancelled runs are ignored, a failed newest run holds releases), if its checks passed too. With --head (workflow_run), the release is held with "waiting for checks and parity-main to pass on …". release.yml now also starts on parity-main completion. --force doesn't wait for parity-main, but open release-blockers still hold everything.
  • Per-PR parity (ci.yml): a new parity-scope job (ubuntu, seconds) runs the parity job only when the PR changes a harness script, an oracle (mods/horizon/src/test/), a probe (crates/*/examples/, game/*_fixture.rs, game/*_harness.rs), the runner (tools/parity*.py, tools/lab.py, parity_hosts.json, parity*.yml), or carries run-parity. run-parity.yml already runs it when the label is added. The merger accepts a skipped parity (ready_merger.sh: SKIPPED|null).
  • Docs: docs/release-flow.md (new "Parity on main" section, PR checks table, releases) and docs/parity-workflow.md.

Independent of #1952: same runs-on as parity.yml, no runner files touched.

Before / after

Before After
Parity per PR every same-repo PR: 30-40 min on the Mac mini for ~110 harnesses (before #1964) only harness/oracle/probe/runner PRs
Harness runs for N merged PRs the sum of each PR's selection (20 PRs on 2026-10-25: 1061 harnesses, 1592 harness-min with #1964's selection) one union run per batch: the harnesses the batch's changes reach, each once
A harness break caught before merge, at 30+ min per PR caught on main within one batch, bisected in log2(N) rounds of the failing harnesses only; releases held until fixed
Release gate checks green checks and parity-main green on the same commit

The trade: a broken merge can sit on main until the bisect names it, but it never ships.

Self-check

  • python3 -m unittest tests.test_parity_main tests.test_release_train: 23 tests OK. New tests cover the bisect (finds every culprit in 8 merges within 3 tries), base (newest green run HEAD contains, in a temp repo; falls back to the last merge), the release gate (superseded runs ignored, a failed batch holds, checks must pass too).
  • Workflows parse (YAML). The parity-scope regex was checked on sample paths. tools/check_public_tree.py passed.
  • First run after merge: no parity-main history yet, so it checks only the last merge, and releases wait for that first green run.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/1981 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/25/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `ci/parity-main` --- ### 📝 Commits (1) - [`73da2f0`](https://github.com/horizon-rust/horizon/commit/73da2f04ddd56cb2ca1f480f54ab0aad31478223) CI: parity on main, a batch of merges at a time; releases wait for it ### 📊 Changes **9 files changed** (+356 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+32 -2) ➕ `.github/workflows/parity-main.yml` (+70 -0) 📝 `.github/workflows/release.yml` (+6 -4) 📝 `docs/parity-workflow.md` (+2 -0) 📝 `docs/release-flow.md` (+27 -3) ➕ `tests/test_parity_main.py` (+43 -0) 📝 `tests/test_release_train.py` (+21 -0) ➕ `tools/parity_main.py` (+129 -0) 📝 `tools/release_train.py` (+26 -8) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What Proposal B from ci-speed-1 (approved by the orchestrator): the vanilla harnesses run on main, a batch of merges at a time, and releases wait for them. - **`.github/workflows/parity-main.yml`**: on every push to main, on the Mac mini's runner, `concurrency: parity-main` with no cancelling. GitHub keeps one run going and one pending (the newest), so merges that land during a run are batched into the next by construction. - `tools/parity_main.py base`: the newest commit HEAD contains whose parity-main passed, else HEAD's first parent. The run is `parity.py --changed <base>`: the union of the batch's harnesses, once, with earlier passes reused. - On failure, `tools/parity_main.py bisect <base> --comment`: it checks out the batch's first-parent merges by halves and runs only the failing harnesses (from `last-run.json`; harnesses a commit doesn't have yet count as passing there). It names the first breaking merge in the summary and comments on its PR (`🤖 Agent: parity-main found ...`), then checks out HEAD again. - **Releases** (`tools/release_train.py`, game only): they ship only a commit both `checks` and `parity-main` passed on. Without `--head`, it takes the newest commit parity-main passed on (superseded/cancelled runs are ignored, a failed newest run holds releases), if its checks passed too. With `--head` (workflow_run), the release is held with "waiting for checks and parity-main to pass on …". `release.yml` now also starts on `parity-main` completion. `--force` doesn't wait for parity-main, but open release-blockers still hold everything. - **Per-PR parity** (`ci.yml`): a new `parity-scope` job (ubuntu, seconds) runs the parity job only when the PR changes a harness script, an oracle (`mods/horizon/src/test/`), a probe (`crates/*/examples/`, `game/*_fixture.rs`, `game/*_harness.rs`), the runner (`tools/parity*.py`, `tools/lab.py`, `parity_hosts.json`, `parity*.yml`), or carries `run-parity`. `run-parity.yml` already runs it when the label is added. The merger accepts a skipped parity (`ready_merger.sh`: `SKIPPED|null`). - Docs: `docs/release-flow.md` (new "Parity on main" section, PR checks table, releases) and `docs/parity-workflow.md`. Independent of #1952: same `runs-on` as `parity.yml`, no runner files touched. ## Before / after | | Before | After | | --- | --- | --- | | Parity per PR | every same-repo PR: 30-40 min on the Mac mini for ~110 harnesses (before #1964) | only harness/oracle/probe/runner PRs | | Harness runs for N merged PRs | the sum of each PR's selection (20 PRs on 2026-10-25: 1061 harnesses, 1592 harness-min with #1964's selection) | one union run per batch: the harnesses the batch's changes reach, each once | | A harness break | caught before merge, at 30+ min per PR | caught on main within one batch, bisected in log2(N) rounds of the failing harnesses only; releases held until fixed | | Release gate | `checks` green | `checks` and `parity-main` green on the same commit | The trade: a broken merge can sit on main until the bisect names it, but it never ships. ## Self-check - `python3 -m unittest tests.test_parity_main tests.test_release_train`: 23 tests OK. New tests cover the bisect (finds every culprit in 8 merges within 3 tries), `base` (newest green run HEAD contains, in a temp repo; falls back to the last merge), the release gate (superseded runs ignored, a failed batch holds, checks must pass too). - Workflows parse (YAML). The `parity-scope` regex was checked on sample paths. `tools/check_public_tree.py` passed. - First run after merge: no parity-main history yet, so it checks only the last merge, and releases wait for that first green run. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:13:12 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3910
No description provided.