[PR #61] [CLOSED] Merge an owner's update of their own project without a reviewer #69

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon-mods/pull/61
Author: @levzzz5154
Created: 10/30/2026
Status: ❌ Closed

Base: main ← Head: owner-updates


📝 Commits (3)

  • c58ba98 Merge an owner's update of their own project without a reviewer
  • 57b2a3a Merge main into
  • 253c37d Remove the committed .pyc and ignore pycache

📊 Changes

6 files changed (+388 additions, -1 deletions)

View changed files

📝 .github/CODEOWNERS (+1 -0)
➕ .github/workflows/owner-update.yml (+44 -0)
📝 .gitignore (+1 -0)
📝 README.md (+33 -1)
➕ scripts/owner_update.py (+191 -0)
➕ scripts/test_owner_update.py (+118 -0)

📄 Description

🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally.

Lets a project's owners publish a new version without a reviewer, as the README already promises. Pairs with the registry service change in horizon-rust/horizon : https://github.com/horizon-rust/horizon/pull/4575.

What it does

.github/workflows/owner-update.yml (on pull_request_target, main's copy, never runs or checks out the PR's code) runs scripts/owner_update.py, which:

  1. verifies the HMAC-SHA256 trailer in the PR body (secret REGISTRY_UPDATE_KEY; the form signs id, version, sha256, file, submitter);
  2. checks the author is the form's account (REGISTRY_BOT), and the diff is exactly a modified mods/<id>.toml that gains one [[versions]] table matching the signed fields, every other field (key, owners, icon, kind, page text) unchanged and unchanged on main since;
  3. checks the submitter is in owners on main and the id is not in revoked.toml;
  4. waits for every other workflow run on the head commit (check required; native when it ran) to succeed;
  5. merges (merge commit, pinned with --match-head-commit to the verified head) with REGISTRY_MERGE_TOKEN.
    Anything else, or any failure: exit 1 and the PR waits for a reviewer as today. scripts/ is added to CODEOWNERS (Ludovic) since it now decides merges. Tests: python3 scripts/test_owner_update.py. README "Owner updates" documents the flow and setup.

Admin steps (only Ludovic can do these; do NOT merge before)

  1. Review this PR as code owner of .github/ and scripts/.
  2. Generate a random secret (32+ chars) and set it as REGISTRY_UPDATE_KEY: secret of this repo, and variable of the Railway service horizon-mod-registry (same value).
  3. Create REGISTRY_MERGE_TOKEN (fine-grained PAT or App token of an account/app, Contents + Pull requests read/write on this repo) as a repo secret, and let that actor bypass the review rule (ruleset bypass list / "allow specified actors to bypass required pull requests"). Required status checks stay required.
  4. Set the repo variable REGISTRY_BOT to the login of GITHUB_BOT_TOKEN's account (default horizon-mods-bot).
    Unset on either side, nothing merges by itself.

Not tested end to end (needs the secrets); the verification logic has unit tests.

🤖 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-mods/pull/61 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/30/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `owner-updates` --- ### 📝 Commits (3) - [`c58ba98`](https://github.com/horizon-rust/horizon-mods/commit/c58ba98d51ad539b2eadcc58df4c7461479b8c55) Merge an owner's update of their own project without a reviewer - [`57b2a3a`](https://github.com/horizon-rust/horizon-mods/commit/57b2a3a785779c4db9a7539c1e258bbad255beee) Merge main into - [`253c37d`](https://github.com/horizon-rust/horizon-mods/commit/253c37dc45aee7aa325be8dd1901968200fd8652) Remove the committed .pyc and ignore __pycache__ ### 📊 Changes **6 files changed** (+388 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `.github/CODEOWNERS` (+1 -0) ➕ `.github/workflows/owner-update.yml` (+44 -0) 📝 `.gitignore` (+1 -0) 📝 `README.md` (+33 -1) ➕ `scripts/owner_update.py` (+191 -0) ➕ `scripts/test_owner_update.py` (+118 -0) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally. Lets a project's owners publish a new version without a reviewer, as the README already promises. Pairs with the registry service change in horizon-rust/horizon : https://github.com/horizon-rust/horizon/pull/4575. ## What it does `.github/workflows/owner-update.yml` (on `pull_request_target`, main's copy, never runs or checks out the PR's code) runs `scripts/owner_update.py`, which: 1. verifies the HMAC-SHA256 trailer in the PR body (secret `REGISTRY_UPDATE_KEY`; the form signs id, version, sha256, file, submitter); 2. checks the author is the form's account (`REGISTRY_BOT`), and the diff is exactly a modified `mods/<id>.toml` that gains one `[[versions]]` table matching the signed fields, every other field (key, owners, icon, kind, page text) unchanged and unchanged on main since; 3. checks the submitter is in `owners` on main and the id is not in `revoked.toml`; 4. waits for every other workflow run on the head commit (`check` required; `native` when it ran) to succeed; 5. merges (merge commit, pinned with `--match-head-commit` to the verified head) with `REGISTRY_MERGE_TOKEN`. Anything else, or any failure: exit 1 and the PR waits for a reviewer as today. `scripts/` is added to CODEOWNERS (Ludovic) since it now decides merges. Tests: `python3 scripts/test_owner_update.py`. README "Owner updates" documents the flow and setup. ## Admin steps (only Ludovic can do these; do NOT merge before) 1. Review this PR as code owner of `.github/` and `scripts/`. 2. Generate a random secret (32+ chars) and set it as `REGISTRY_UPDATE_KEY`: secret of this repo, and variable of the Railway service `horizon-mod-registry` (same value). 3. Create `REGISTRY_MERGE_TOKEN` (fine-grained PAT or App token of an account/app, Contents + Pull requests read/write on this repo) as a repo secret, and let that actor bypass the review rule (ruleset bypass list / "allow specified actors to bypass required pull requests"). Required status checks stay required. 4. Set the repo variable `REGISTRY_BOT` to the login of `GITHUB_BOT_TOKEN`'s account (default `horizon-mods-bot`). Unset on either side, nothing merges by itself. Not tested end to end (needs the secrets); the verification logic has unit tests. 🤖 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:02:59 +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-mods#69
No description provided.