[PR #1015] [MERGED] CODEOWNERS for the release pipeline, and the protection that makes it count #2988

Closed
opened 2026-11-02 16:00:39 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: ci/codeowners


📝 Commits (2)

  • 1c341d5 CODEOWNERS for the release pipeline, and the protection that makes it count
  • 1922000 CODEOWNERS: the launcher's downloader, links.json and the Cargo.toml files; Ludovic alone may bypass the review

📊 Changes

2 files changed (+71 additions, -0 deletions)

View changed files

➕ .github/CODEOWNERS (+17 -0)
➕ tools/ci/protect_pipeline.sh (+54 -0)

📄 Description

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

Security brief (Ludovic, 2026-10-19), item 3.

What

  • .github/CODEOWNERS: @ludovic111 owns .github/ (workflows and this file), tools/ci/ (runner and signing scripts), tools/release_train.py, tools/release_channels.py, crates/horizon-release-sign/ (keys + verification), crates/horizon-server/src/update.rs and crates/horizon-server/Cargo.toml, the launcher's src/signed.rs, src/backend.rs (download, install, self_update), links.json and Cargo.toml, and packaging/ (installers people curl | sh). The lock files aren't listed: nearly every dependency change touches them, and the Cargo.toml files are what choose the crates. Everything else stays automatic.
  • tools/ci/protect_pipeline.sh: prints the protection it would set for main (dry run by default), and sets it with --apply. It keeps today's rules: required verify pinned to GitHub Actions (app 15368), admins included, no force pushes or deletions. It adds require_code_owner_reviews: true, required_approving_review_count: 0 (no approvals for non-owned files) and dismiss_stale_reviews: true (a push after approval needs a new one).
  • Ludovic's own pull requests: he is the only code owner and can't approve his own pull request, so the protection lists ludovic111 alone in bypass_pull_request_allowances. I chose this over turning off "enforce admins": that would also let an admin merge without verify, undoing #1010's guarantee. With the bypass, verify stays required for everyone, Ludovic included, and only the review rule has an exception, for him alone. --apply reads the protection back and fails if GitHub dropped any of the four settings: code owners, enforce admins, the bypass, or verify.

Important: when to apply it

Agents still push, open and merge pull requests as ludovic111, and his review bypass would be theirs too, so their changes to owned files would skip his review. Apply tools/ci/protect_pipeline.sh --apply only once agents work as the horizon-agent GitHub App (prepared separately, in the private tools). From then on, agents' pull requests are authored by the App and Ludovic approves owned changes with one tap. The App has no workflows permission, so it can't push .github/workflows changes at all. Until the switch, CODEOWNERS only requests his review.

How tested

  • gh api repos/ludovic111/horizon/codeowners/errors?ref=ci/codeowners: [] (GitHub parses the file without errors).
  • tools/ci/protect_pipeline.sh (dry run) against the live protection prints the body above. Nothing was applied. shellcheck is clean.

🤖 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/1015 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/19/2026 **Status:** ✅ Merged **Merged:** 10/19/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `ci/codeowners` --- ### 📝 Commits (2) - [`1c341d5`](https://github.com/horizon-rust/horizon/commit/1c341d58a6ea3f2379e3872d823631fa92ca2a2d) CODEOWNERS for the release pipeline, and the protection that makes it count - [`1922000`](https://github.com/horizon-rust/horizon/commit/19220000be5d48827af40643f71f1e943fcc913d) CODEOWNERS: the launcher's downloader, links.json and the Cargo.toml files; Ludovic alone may bypass the review ### 📊 Changes **2 files changed** (+71 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `.github/CODEOWNERS` (+17 -0) ➕ `tools/ci/protect_pipeline.sh` (+54 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Security brief (Ludovic, 2026-10-19), item 3. ## What - **`.github/CODEOWNERS`**: `@ludovic111` owns `.github/` (workflows and this file), `tools/ci/` (runner and signing scripts), `tools/release_train.py`, `tools/release_channels.py`, `crates/horizon-release-sign/` (keys + verification), `crates/horizon-server/src/update.rs` and `crates/horizon-server/Cargo.toml`, the launcher's `src/signed.rs`, `src/backend.rs` (download, install, self_update), `links.json` and `Cargo.toml`, and `packaging/` (installers people `curl | sh`). The lock files aren't listed: nearly every dependency change touches them, and the Cargo.toml files are what choose the crates. Everything else stays automatic. - **`tools/ci/protect_pipeline.sh`**: prints the protection it would set for main (dry run by default), and sets it with `--apply`. It keeps today's rules: required `verify` pinned to GitHub Actions (app 15368), admins included, no force pushes or deletions. It adds `require_code_owner_reviews: true`, `required_approving_review_count: 0` (no approvals for non-owned files) and `dismiss_stale_reviews: true` (a push after approval needs a new one). - **Ludovic's own pull requests**: he is the only code owner and can't approve his own pull request, so the protection lists `ludovic111` alone in `bypass_pull_request_allowances`. I chose this over turning off "enforce admins": that would also let an admin merge **without `verify`**, undoing #1010's guarantee. With the bypass, `verify` stays required for everyone, Ludovic included, and only the review rule has an exception, for him alone. `--apply` reads the protection back and fails if GitHub dropped any of the four settings: code owners, enforce admins, the bypass, or `verify`. ## Important: when to apply it Agents still push, open and merge pull requests **as ludovic111**, and his review bypass would be theirs too, so their changes to owned files would skip his review. Apply `tools/ci/protect_pipeline.sh --apply` **only once agents work as the `horizon-agent` GitHub App** (prepared separately, in the private tools). From then on, agents' pull requests are authored by the App and Ludovic approves owned changes with one tap. The App has no `workflows` permission, so it can't push `.github/workflows` changes at all. Until the switch, CODEOWNERS only requests his review. ## How tested - `gh api repos/ludovic111/horizon/codeowners/errors?ref=ci/codeowners`: `[]` (GitHub parses the file without errors). - `tools/ci/protect_pipeline.sh` (dry run) against the live protection prints the body above. Nothing was applied. `shellcheck` is clean. 🤖 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-02 16:00:39 +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#2988
No description provided.