[PR #3862] [MERGED] Claims: /claim and /unclaim on issues, stale claims released after 5 days #5255

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

📋 Pull Request Information

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

Base: main ← Head: feat/claim-command


📝 Commits (1)

  • f9e5264 Claims: /claim and /unclaim on issues, stale claims released after 5 days

📊 Changes

6 files changed (+557 additions, -2 deletions)

View changed files

➕ .github/workflows/claim-command.yml (+74 -0)
📝 AGENTS.md (+2 -0)
📝 CONTRIBUTING.md (+10 -1)
📝 docs/release-flow.md (+3 -1)
➕ tests/test_claim_command.py (+198 -0)
➕ tools/ci/claim_command.py (+270 -0)

📄 Description

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

What and why

Step 1 of #3859 (coordination): one claim, on the issue. ~60 people and a dozen agents work in parallel and
nobody can see who is on what. Now:

  • /claim on the first line of a comment on an issue assigns the commenter. Anyone can: GitHub lets an issue's
    commenters be assigned without a repository role. Success = a 👍 on the comment (the assignment shows in the thread);
    a refusal answers with one 🤖 Claims: line.
  • An assigned issue is taken: /claim is refused while someone else holds it ("ask them here").
  • /unclaim gives it back. Ludovic and the trusted reviewers (.github/trusted-reviewers.txt, paused line honoured)
    can /unclaim @login someone else's claim.
  • Refused: pull requests (claim the issue it fixes), closed or locked issues, more than 5 open claims at once
    (Ludovic and the trusted reviewers have no limit, so agents on ludovic111 can claim what they work on).
  • A daily run (05:23 UTC, also workflow_dispatch) releases a claim made by this workflow more than 5 days ago
    when no open pull request links the issue (Fixes #N, a mention, or the sidebar link: GraphQL
    closedByPullRequestsReferences + open cross-references), with a comment saying why. Assignments made by hand
    are never released.

Docs: CONTRIBUTING.md "Claim before you start" (replaces "say so in its issue"), AGENTS.md rule, release-flow.md
trusted-reviewer table gets /unclaim @login.

.github/ change, explained

New .github/workflows/claim-command.yml, the same shape as triage-command.yml:

  • issue_comment / schedule / workflow_dispatch always run main's copy; it sparse-checks-out main's
    tools/ci/claim_command.py, nightly_set.py (owner + reviewer list parser) and the reviewer list, never a PR.
  • The comment's text, author and id reach the script as env vars, never in a shell line; persist-credentials: false.
  • Token: contents: read, issues: write only (assignees, comments, reactions); no pull-requests: write.
  • Ordinary comments skip at the job's if before a runner starts. Job-level concurrency: claim-<issue> so two
    /claims can't both find the issue free (on the job, so skipped runs of other comments don't cancel a waiting one).
  • tests/test_claim_command.py checks those properties of the file (run lines, ref: main, no write beyond issues).

Tried live, read-only: the GraphQL query and release --dry-run against horizon-rust/horizon (no assigned open
issues today, so nothing to release), the search call that counts claims.

Vanilla reference

None (tooling).

Self-check

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at baa379d71, 3 min 2 s)

Check Result
Scope ✅ 6 files, +557 −2
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 444 passed (3 min 2 s)
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
doc tests ➖ no crate touched
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 1 affected, to run in CI (--quick): lan_integration
Label skip-release

lan_integration is listed only because the parity selector maps every change to it; nothing here reaches the game.

Needs Ludovic

Nothing. Kira's board stays as is; whether its task_claim should follow GitHub assignment is a later Kira change.

🤖 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/3862 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/claim-command` --- ### 📝 Commits (1) - [`f9e5264`](https://github.com/horizon-rust/horizon/commit/f9e5264df71874271df29d93d2871371f12f79cf) Claims: /claim and /unclaim on issues, stale claims released after 5 days ### 📊 Changes **6 files changed** (+557 additions, -2 deletions) <details> <summary>View changed files</summary> ➕ `.github/workflows/claim-command.yml` (+74 -0) 📝 `AGENTS.md` (+2 -0) 📝 `CONTRIBUTING.md` (+10 -1) 📝 `docs/release-flow.md` (+3 -1) ➕ `tests/test_claim_command.py` (+198 -0) ➕ `tools/ci/claim_command.py` (+270 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What and why Step 1 of #3859 (coordination): **one claim, on the issue**. ~60 people and a dozen agents work in parallel and nobody can see who is on what. Now: - `/claim` on the first line of a comment on an issue assigns the commenter. Anyone can: GitHub lets an issue's commenters be assigned without a repository role. Success = a 👍 on the comment (the assignment shows in the thread); a refusal answers with one `🤖 Claims:` line. - An assigned issue is taken: `/claim` is refused while someone else holds it ("ask them here"). - `/unclaim` gives it back. Ludovic and the trusted reviewers (`.github/trusted-reviewers.txt`, paused line honoured) can `/unclaim @login` someone else's claim. - Refused: pull requests (claim the issue it fixes), closed or locked issues, more than 5 open claims at once (Ludovic and the trusted reviewers have no limit, so agents on `ludovic111` can claim what they work on). - A daily run (05:23 UTC, also `workflow_dispatch`) releases a claim **made by this workflow** more than 5 days ago when no open pull request links the issue (`Fixes #N`, a mention, or the sidebar link: GraphQL `closedByPullRequestsReferences` + open cross-references), with a comment saying why. Assignments made by hand are never released. Docs: CONTRIBUTING.md "Claim before you start" (replaces "say so in its issue"), AGENTS.md rule, release-flow.md trusted-reviewer table gets `/unclaim @login`. ### `.github/` change, explained New `.github/workflows/claim-command.yml`, the same shape as `triage-command.yml`: - `issue_comment` / `schedule` / `workflow_dispatch` always run main's copy; it sparse-checks-out main's `tools/ci/claim_command.py`, `nightly_set.py` (owner + reviewer list parser) and the reviewer list, never a PR. - The comment's text, author and id reach the script as env vars, never in a shell line; `persist-credentials: false`. - Token: `contents: read`, `issues: write` only (assignees, comments, reactions); no `pull-requests: write`. - Ordinary comments skip at the job's `if` before a runner starts. Job-level `concurrency: claim-<issue>` so two `/claim`s can't both find the issue free (on the job, so skipped runs of other comments don't cancel a waiting one). - `tests/test_claim_command.py` checks those properties of the file (run lines, `ref: main`, no write beyond issues). Tried live, read-only: the GraphQL query and `release --dry-run` against horizon-rust/horizon (no assigned open issues today, so nothing to release), the search call that counts claims. ## Vanilla reference None (tooling). ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at baa379d71, 3 min 2 s) | Check | Result | | --- | --- | | Scope | ✅ 6 files, +557 −2 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 444 passed (3 min 2 s) | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | doc tests | ➖ no crate touched | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 1 affected, to run in CI (--quick): lan_integration | | Label | `skip-release` | lan_integration is listed only because the parity selector maps every change to it; nothing here reaches the game. ## Needs Ludovic Nothing. Kira's board stays as is; whether its `task_claim` should follow GitHub assignment is a later Kira change. 🤖 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:11:18 +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#5255
No description provided.