[PR #4575] [MERGED] Registry form: sign an owner's update so horizon-mods can merge it without a reviewer #5703

Closed
opened 2026-11-03 05:14:25 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4575
Author: @levzzz5154
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

Base: main ← Head: registry/owner-updates


📝 Commits (1)

  • 754440d Registry form: sign an owner's update so horizon-mods can merge it without a reviewer

📊 Changes

6 files changed (+250 additions, -13 deletions)

View changed files

📝 crates/horizon-mod-registry/README.md (+24 -0)
📝 crates/horizon-mod-registry/src/github.rs (+14 -3)
📝 crates/horizon-mod-registry/src/lib.rs (+80 -7)
📝 crates/horizon-mod-registry/tests/submit.rs (+130 -1)
📝 docs/api/mod-index.md (+1 -1)
📝 docs/mods.md (+1 -1)

📄 Description

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

Goal: a mod's owners publish new versions without a maintainer reviewing a PR each time. Companion PR in horizon-mods (the workflow that verifies and merges): https://github.com/horizon-rust/horizon-mods/pull/61

What changes (crates/horizon-mod-registry only)

For an owner update (entry exists on the registry's main, submitter is in its owners, and the only change to the entry is one new version: key, owners, icon, kind, id and page text unchanged; signature present when the entry has a key; version string limited to [A-Za-z0-9.+_-]), and only when the new env var REGISTRY_UPDATE_KEY is set, the PR body gets a trailer and the PR the label owner-update:

<!-- owner-update
id: ... / version: ... / sha256: ... / file: ... / submitter: ... / hmac: <HMAC-SHA256 hex>
-->

HMAC message: owner-update-v1\n<id>\n<version>\n<sha256>\n<file>\n<submitter>. This replaces trusting a commit-message marker (forgeable). New projects, changed pages/keys/icons, or no secret: PR opens as before, for a reviewer. A failed labelling is logged, not fatal.

Tests (mock GitHub, tests/submit.rs): trailer and label exact for an owner update; none for a new project, feature off, changed summary, new icon; keyless project is signed too. README and docs/api/mod-index.md, docs/mods.md updated. cargo test, clippy --all-targets -D warnings, fmt pass for the crate.

Admin steps (only Ludovic; do NOT merge before)

  1. Add REGISTRY_UPDATE_KEY (random, 32+ chars) to Railway's horizon-mod-registry service.
  2. The same value as secret REGISTRY_UPDATE_KEY in horizon-mods; create secret REGISTRY_MERGE_TOKEN there and let its account/app bypass the review rule; set repo variable REGISTRY_BOT; code-owner review of .github/ and scripts/ in the horizon-mods PR. Details in that PR.
    Safe to merge this first: with the variable unset nothing changes.

🤖 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/4575 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `registry/owner-updates` --- ### 📝 Commits (1) - [`754440d`](https://github.com/horizon-rust/horizon/commit/754440dd55dcb85b5d3604db1ee31fccc414109e) Registry form: sign an owner's update so horizon-mods can merge it without a reviewer ### 📊 Changes **6 files changed** (+250 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-mod-registry/README.md` (+24 -0) 📝 `crates/horizon-mod-registry/src/github.rs` (+14 -3) 📝 `crates/horizon-mod-registry/src/lib.rs` (+80 -7) 📝 `crates/horizon-mod-registry/tests/submit.rs` (+130 -1) 📝 `docs/api/mod-index.md` (+1 -1) 📝 `docs/mods.md` (+1 -1) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally. Goal: a mod's owners publish new versions without a maintainer reviewing a PR each time. Companion PR in horizon-mods (the workflow that verifies and merges): https://github.com/horizon-rust/horizon-mods/pull/61 ## What changes (crates/horizon-mod-registry only) For an **owner update** (entry exists on the registry's `main`, submitter is in its `owners`, and the only change to the entry is one new version: key, owners, icon, kind, id and page text unchanged; signature present when the entry has a key; version string limited to `[A-Za-z0-9.+_-]`), and only when the new env var `REGISTRY_UPDATE_KEY` is set, the PR body gets a trailer and the PR the label `owner-update`: ``` <!-- owner-update id: ... / version: ... / sha256: ... / file: ... / submitter: ... / hmac: <HMAC-SHA256 hex> --> ``` HMAC message: `owner-update-v1\n<id>\n<version>\n<sha256>\n<file>\n<submitter>`. This replaces trusting a commit-message marker (forgeable). New projects, changed pages/keys/icons, or no secret: PR opens as before, for a reviewer. A failed labelling is logged, not fatal. Tests (mock GitHub, tests/submit.rs): trailer and label exact for an owner update; none for a new project, feature off, changed summary, new icon; keyless project is signed too. README and docs/api/mod-index.md, docs/mods.md updated. `cargo test`, `clippy --all-targets -D warnings`, `fmt` pass for the crate. ## Admin steps (only Ludovic; do NOT merge before) 1. Add `REGISTRY_UPDATE_KEY` (random, 32+ chars) to Railway's `horizon-mod-registry` service. 2. The same value as secret `REGISTRY_UPDATE_KEY` in horizon-mods; create secret `REGISTRY_MERGE_TOKEN` there and let its account/app bypass the review rule; set repo variable `REGISTRY_BOT`; code-owner review of `.github/` and `scripts/` in the horizon-mods PR. Details in that PR. Safe to merge this first: with the variable unset nothing changes. 🤖 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 05:14:25 +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#5703
No description provided.