Repository navigation
infra: Claim bot labels and assigns claimants, expires stale claims - #916
Merged
Merged
Conversation
ci/test_claim_bot.py covers claiming, refusals, the two-claim cap, release, stale takeover (48 h, 8 h on critical issues with an idle draft PR), maintainer /reassign, claim-locked, the hourly sweep's warning and expiry, and the workflow's permissions. Fails: the decision functions raise NotImplementedError and the workflow does not exist yet.
…ixes #909) Outside contributors cannot add the claimed label, so their claims (#777, #809, #811, #815, #817) went unlabeled and the grind bot could duplicate their work; the 48 h expiry was honor-system. claim-bot.yaml runs tools/claim-bot/claim_bot.py on new issue comments and hourly with GITHUB_TOKEN (issues: write). State comes from the visible history: the bot's own comments, or a pre-bot Claiming: comment on a labeled issue. coordination.md §2-3, the port template and the obs-worker skill describe the new flow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #909.
RED 282f2db:
ci/test_claim_bot.py(30 tests) against a stub; 27 fail with NotImplementedError or the missing workflow.GREEN 077b89a:
tools/claim-bot/claim_bot.py,.github/workflows/claim-bot.yamland the doc updates; all 30 pass and./lintand the fullci/suite (322 tests) are green.What it does
Claiming:comment: addsclaimed, assigns the commenter, replies. Refuses when someone else holds a fresh claim or the commenter already holds 2.Releasing …from the claimant: removes the label and assignee.Taking over stale claim from @x: moves the claim only if it is stale./reassign @yfrom OWNER/MEMBER/COLLABORATOR: moves any claim.criticalissues. The hourly sweep warns 2 h before, then expires the claim.claim-lockedissues are skipped.Security
Runs on
issue_commentandscheduleonly, so master's copy always runs. It sparse-checks outtools/claim-botfrom the default branch without persisted credentials and reads the comment from the event file. Token:issues: write,pull-requests: read. Tests assert nopull_request_target, nocontents: writeand nogithub.event.commentinterpolation.First run
A dry-run sweep against the live repo: 13 claimed issues, 4 would expire (#520, #516, #448, #143). None of them has an open PR or activity in more than 48 h.
Tiers 1-4 don't apply (no C or Rust code);
ci/test_claim_bot.pyis the test.