LearnNewsExamplesConnect
Frontmatter
assigneesneo-gemini-maryam
createdAtNov 11, 2026, 4:11 AM
updatedAtNov 11, 2026, 5:04 AM
githubUrlhttps://github.com/neomjs/neo/issues/20750
authorneo-gemini-maryam
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 11, 2026, 5:04 AM

Claim responder auto-assigns first-in-line claims with a 1-issue cap

Closed v14.0.0/archive-v14-0-0-chunk-1 enhancementcontributor-experienceaibuildgithub_actions
neo-gemini-maryam
neo-gemini-maryam commented on Nov 11, 2026, 4:11 AM

Context

On 2026-11-10 and 2026-11-11, three curated good first issue threads exposed the gap left when .github/workflows/claim-responder.yml replies "first in line" without assigning the claimant:

  • #20676: @DevEtaiGabbai claimed it at 2026-11-10T19:18:19Z (IC_kwDODSospM8AAAABk-82PA) and got the automatic "first in line" reply, while assignees stayed [] for over 7 hours. At 2026-11-11T02:35:54Z (IC_kwDODSospM8AAAABlG_KLQ), @Vijay431 (an account spraying identical <!-- gfi --> comments across 7 issues in 5 orgs within 23 minutes) also claimed #20676.
  • #20717: @Vijay431 posted the same <!-- gfi --> template 1 minute 53 seconds earlier (02:34:01Z, IC_kwDODSospM8AAAABlG9chA), receiving "first in line" and holding #20717 in earlierClaim() for 7 days while assignees remained [].
  • #20736: @fahim1252375-maker claimed it at 02:01:39Z and opened PR #20746 at 02:32:51Z, while #20736 still showed assignees: [] in GitHub's issue list.

As noted on #19201 (IC_kwDODSospM8AAAABW4t8bg), contributors discover good first issue tickets through GitHub's own overview and issue lists, which display assignees — not comment threads. Operator direction (@tobiu, 2026-11-11): automatic replies work well; only automatic assignment is missing to highlight that a ticket is claimed, while keeping the upfront expectation that the first approve-worthy PR wins if someone grabs a ticket and never sends a PR.

The Problem

#19202 deliberately omitted issues.addAssignees so manual maintainer confirmation would screen spray accounts. In practice, leaving first in line unassigned produces three concrete defects without preventing single-ticket spray holds, and adding auto-assignment naively introduces a fourth (@neo-opus-grace, IC_kwDODSospM8AAAABlHhWkw):

  1. Invisible holds in GitHub's issue lists (no:assignee): Claimed tickets show no avatar in GitHub's issue lists or good first issue overviews until a maintainer session runs hours later, drawing duplicate human and agent work (#20708 on #20673, #20676).
  2. Self-contradicting alternative suggestions: .github/workflows/claim-responder.yml:75-78 populates candidates from repo:${owner}/${repo} is:issue is:open label:"${label}" no:assignee -linked:pr. Because first in line leaves assignees: [], pickAlternatives() (buildScripts/util/claimResponse.mjs:138-148) treats already-claimed unassigned issues as free and can advertise them under "open and nobody holds them".
  3. Unreleasable spray holds: Even without auto-assignment, earlierClaim() (buildScripts/util/claimResponse.mjs:160-182) holds #20717 for 7 days on @Vijay431's comment, and has no path for a maintainer's 1-click GitHub unassign to release the claim (CONTRIBUTING.md:130).
  4. Auto-assignment without 7-day expiry (IC_kwDODSospM8AAAABlHhWkw): holders() previously counted every issue.assignees entry unconditionally. Once claim-responder auto-assigns a claimant, a silent outside assignee without an open PR would hold the issue past CLAIM_WINDOW_DAYS (7 days) instead of expiring like the comment claim it confirmed (CONTRIBUTING.md:134-135).

The Architectural Reality

  • buildScripts/util/claimResponse.mjs:14-15, 160-317: pure reply-decision module (earlierClaim, holders, renderReply, decideReply).
  • .github/workflows/claim-responder.yml:47-95: runs actions/github-script@v9 on issue_comment: [created] with permissions: issues: write (.github/workflows/claim-responder.yml:17). On public GitHub repositories, POST /repos/{owner}/{repo}/issues/{issue_number}/assignees (github.rest.issues.addAssignees) succeeds with issues: write once a non-collaborator has commented on the issue.
  • Cross-repo sparse-checkout callers: neomjs/neo-agent-brain/.github/workflows/claim-responder.yml:49,82 and neomjs/neo-agent-institution/.github/workflows/claim-responder.yml:49,82 sparse-checkout buildScripts/util/claimResponse.mjs from neomjs/neo@dev and pass decideReply(...) directly to createComment({..., body}). decideReply() MUST therefore keep returning String|null.
  • CONTRIBUTING.md:128-135: documents the claim rule, 7-day activity window, handoff after 7 silent days, and first-approve-worthy-PR merge policy (#19195, #20616).

Design authority: CONTRIBUTING.md:128-135 (#19195, #20616), operator direction (@tobiu, 2026-11-11) superseding #19202's non-assignment constraint, and #19202 owner read (@neo-opus-grace, IC_kwDODSospM8AAAABlHhWkw) preserving the 7-day expiry on outside-contributor assignments.

The Fix

  1. buildScripts/util/claimResponse.mjs:
    • Export decideClaim({comment, issue, comments, events, openPullRequests, candidates, heldByClaimant, repoUrl}) returning {assign: Boolean, body: String, assignedBody?: String, unassign?: String[]} | null, while keeping decideReply(options) returning String|null (decideClaim(options)?.body || null) so cross-repo callers stay unbroken.
    • Single-curated-issue cap (heldByClaimant): When held.length === 0 on the target issue, check heldByClaimant (other open curated issues in the same repo currently assigned to claimant). If non-empty, return assign: false and a polite reply naming the existing assigned issue(s) and asking the contributor to finish or step back from that issue before claiming another, plus CONTRIBUTING.md footer and replyMarker(claimant).
    • 7-day outside-assignee expiry (staleAssignees / holders, IC_kwDODSospM8AAAABlHhWkw): Export staleAssignees(...) and skip lapsed outside-contributor assignees in holders(). An outside-contributor assignee (identified from outside-human issue/comment authorship, never team COLLABORATOR/MEMBER/OWNER or self-assigned team members without outside comments) with no open PR into repository holds only within CLAIM_WINDOW_DAYS (7 days) of their latest comment or assigned event on the issue. Team assignees keep unconditional holds.
    • Auto-assign + stale handoff + upfront expectation wording: When held.length === 0 and heldByClaimant is empty, return assign: true, unassign: staleAssignees(...) (original-case logins of any lapsed outside assignees on the issue), assignedBody (confirming "Assigned to you — you can start now" and noting the 7-day active window + that the first approve-worthy PR wins if another lands first or a claim goes quiet), and body (the "first in line" fallback if addAssignees does not stick or a caller uses decideReply).
    • Maintainer unassign release (events): In earlierClaim(), treat a prior claim comment by login as released when events contains a later {event: 'unassigned', assignee: {login}} at or before the current comment timestamp (just like a withdrawal comment), so a maintainer's 1-click GitHub Unassign immediately frees the issue.
  2. .github/workflows/claim-responder.yml:
    • Fetch events (github.paginate(github.rest.issues.listEvents, {owner, repo, issue_number: issue.number, per_page: 100})) and assignedSearch (repo:${owner}/${repo} is:issue is:open assignee:"${comment.user.login}", filtered by curatedLabel(item) && item.number !== issue.number).
    • Call decideClaim(...). When decision.assign is true, call github.rest.issues.addAssignees({owner, repo, issue_number: issue.number, assignees: [comment.user.login]}) inside try/catch; when addAssignees confirms comment.user.login in data.assignees, select decision.assignedBody and, if decision.unassign.length > 0, call github.rest.issues.removeAssignees to clear any lapsed outside assignee(s) (falling back to decision.body without removing anyone if addAssignees fails or drops the user).
  3. CONTRIBUTING.md (§3 item 3):
    • Update item 3 to state that a first-in-line claim on a curated issue (one open curated issue at a time) is automatically assigned by the reply, that a maintainer can unassign accounts that spray claims, and keep the 7-day window + first-approve-worthy-PR rule explicit.

Contract Ledger Matrix

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
decideClaim(), staleAssignees(), holders(), & decideReply() (buildScripts/util/claimResponse.mjs) CONTRIBUTING.md:128-135, #20616, IC_kwDODSospM8AAAABlHhWkw decideClaim() returns {assign, body, assignedBody, unassign} with 1-curated-issue cap (heldByClaimant), unassigned-event release (events), and 7-day expiry on outside assignees without an open repo PR (team assignees never expire); decideReply() preserves String | null decideReply() / decision.body when unassigned JSDoc + CONTRIBUTING.md:128-135 test/playwright/unit/buildScripts/util/claimResponse.spec.mjs
.github/workflows/claim-responder.yml buildScripts/util/claimResponse.mjs Queries issue events + claimant's open curated assignments, auto-assigns first in line via issues.addAssignees, removes decision.unassign after verified assignment, posts assignedBody Logs warning and posts decision.body without unassigning if addAssignees fails or drops user Workflow header + CONTRIBUTING.md:128-135 Unit spec + workflow callback check

Decision Record impact

none

Acceptance Criteria

  • AC-1: decideClaim() returns assign: true, unassign: [], and assignedBody (naming the 7-day active window and first-approve-worthy-PR rule) when a claimant is first in line on an unassigned issue and holds no other open curated issue in the repo, while decideReply() continues returning String|null for cross-repo callers.
  • AC-2: When heldByClaimant contains another open curated issue number, decideClaim() returns assign: false and tells the claimant which issue they already hold instead of assigning a second one.
  • AC-3: earlierClaim() releases an earlier claim when followed by an unassigned issue event for that claimant (events), matching withdrawal behavior.
  • AC-4: .github/workflows/claim-responder.yml fetches issue events and the claimant's open assigned issues, calls github.rest.issues.addAssignees when decision.assign is true, calls github.rest.issues.removeAssignees when decision.unassign is non-empty after verified assignment, and posts assignedBody only when data.assignees includes the claimant (falling back to decision.body otherwise).
  • AC-5: CONTRIBUTING.md §3 item 3 documents automatic assignment on first-in-line curated claims (one open curated issue at a time), maintainer unassignment for claim sprayers, and npm run check-relative-links + npm run test-unit -- test/playwright/unit/buildScripts/util/claimResponse.spec.mjs pass.
  • AC-6: Outside-contributor assignees without an open PR into repository expire after CLAIM_WINDOW_DAYS (7 days) from their latest comment or assigned event on the issue: at 6 days quiet the assignee still holds in holders(), at 8 days quiet (with no open PR) they do not hold and decideClaim() returns assign: true, unassign: [staleLogin], while an open repo PR or team-member assignment continues holding past 8 days (IC_kwDODSospM8AAAABlHhWkw).

Out of Scope

  • Updating the thin workflow callers in neomjs/neo-agent-brain and neomjs/neo-agent-institution (separate follow-up leaves once neomjs/neo@dev lands; decideReply() keeps both workflows working unchanged in the interim).
  • Scheduled cron sweeping of silent assignments on issues that receive no new comments (claim-responder.yml stays strictly event-driven on issue_comment).

Avoided Traps

  • Changing decideReply()'s return type from String|null to an object: neo-agent-brain and neo-agent-institution sparse-checkout neomjs/neo@dev and pass decideReply() straight to issues.createComment({..., body}).
  • Expiring team-member self-assignments or contributors with an open PR: Team assignees (MEMBER/COLLABORATOR/OWNER, including self-assigned seats with zero issue comments) and outside contributors with an open PR targeting repository must never be treated as lapsed.
  • Using label:"good first issue" label:"help wanted" in GitHub issue search: GitHub search ANDs multiple label: qualifiers; filter assignee:${login} results with curatedLabel(item) in JS instead.
  • Claiming "Assigned to you" or removing a prior assignee without checking addAssignees response: GitHub REST POST .../assignees returns HTTP 201 with assignees: [] if an unassignable user is silently ignored; verify data.assignees before choosing assignedBody or calling removeAssignees.

Related

Related: #19202 · #19194 · #19975 · #20616 · #19201 · #20676 · #20717

Structure-map gate: N/A — touches buildScripts/util/, .github/workflows/, test/playwright/unit/buildScripts/util/, and CONTRIBUTING.md only (no ai/ or .agents/skills/ paths). Live latest-open + closed sweep: checked all 26 open issues in neomjs/neo (#20748, #20747, #20745, #20737, #20736, ..., #19058) + closed search (claim responder assign; read Out of Scope and Avoided Traps on #19202, #19201, #19975, #20616) at 2026-11-11T03:07Z; no open equivalent, and #19202's non-assignment rule is explicitly superseded per operator direction (2026-11-11). Backlog band: 26 open, orange (standalone contributor-workflow leaf). A2A in-flight claim sweep: checked latest 35 messages across all read-states at 2026-11-11T03:09Z; no competing claim on claim-responder or claimResponse.mjs. MC sweep: queried second contributor claimed good first issue still unassigned in GitHub overview list pickAlternatives (5 results) and claim-responder good first issue contributor assignment community management (5 results); surfaced #19202 / #19975 history, no conflicting decision. Own-assignment sweep: 0 open issues assigned to @neo-gemini-maryam in neomjs/neo.

self-assigned at creation (@neo-gemini-maryam) for immediate implementation; Tier-2.5 notification sent to @neo-opus-grace (#19202 author), and owner read IC_kwDODSospM8AAAABlHhWkw folded into AC-6.

Origin Session ID: c0558bc6-81bc-4d50-970d-4ad2b58571c3 Retrieval Hint: "claim-responder auto-assign first in line heldByClaimant unassigned event staleAssignees decideClaim"

Authored by Maryam (Gemini 4 Argon, Antigravity). Session c0558bc6-81bc-4d50-970d-4ad2b58571c3. 🧭

tobiu referenced in commit 5af75cc - "feat(ci): auto-assign first-in-line curated claims with 1-issue cap (#20750) (#20753) on Nov 11, 2026, 5:04 AM
tobiu closed this issue on Nov 11, 2026, 5:04 AM