Skip to content

mark an issue in-progress when the watcher assigns a volunteer to it - #6111

Merged
atomantic merged 2 commits into
mainfrom
cos/task-mtlx4yoi/agent-1c99a8e3
Sep 3, 2026
Merged

mark an issue in-progress when the watcher assigns a volunteer to it#6111
atomantic merged 2 commits into
mainfrom
cos/task-mtlx4yoi/agent-1c99a8e3

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

The issue-watcher already assigned a contributor who commented asking for an issue — its claim regex matches phrasings like "I'd like to work on this — could you assign it to me?" — but it only set the assignee. The issue kept reading as unclaimed in the Issues tab, so the claim was finished by hand every time.

  • Stamp in-progress alongside the assignee. One combined gh issue edit is the fast path. Because --add-label fails the whole call on a repo that has never defined the label, the fallback splits it: assign alone (the half that must not be lost on a fork), create the label without --force (so an install that recolored it keeps its color), then apply it.
  • A label failure never changes the assignment's result — the comment is still retired rather than re-spending a cognition run. A missing assignment is the failure that matters, and it still routes the comment to the reasoning agent.
  • IN_PROGRESS_LABEL moves to lib/dispatchLabels.js beside the other workflow markers, which is what lazily creates them. perpetualWork.js's skip-list now reads that constant instead of repeating the literal, and issueReconcile.js's dead re-export is gone (nothing imported it from there).

This path is fully deterministic — no model is involved in claim detection or assignment.

Known divergence

taskPromptDefaults/prompts.js tells the claim-issue agent, on this same event, to "leave contributor-invitation labels intact, do NOT add in-progress." The watcher now does the opposite, so the two paths disagree. Reconciling the prompt needs a PROMPT_VERSIONS bump plus a migration, which doesn't belong here — filed separately, along with two consequences:

  • A volunteer-held issue with no PR yet classifies STALLED on each issue-reconcile pass. That is log-only — no agent dispatch, no spend.
  • The watcher does not release good first issue / help wanted the way a claim does.

Test plan

  • server/services/issueWatcher.test.js — 5 volunteer tests on a shared fixture, each pinning a distinct regression: the combined edit is issued; the real-world question phrasing still claims; the label is created and re-applied on a repo that lacks it; a label failure keeps the assignment; an assignment failure still routes to cognition.
  • server/lib/dispatchLabels.test.js — the new workflow label resolves a spec and a label create command.
  • Full server suite: 38,596 passed, 24 skipped.

The issue-watcher's gather pass already assigned a contributor who commented
asking for an issue, but it only set the assignee — the issue kept reading as
unclaimed in the Issues tab, so the claim was finished by hand every time.

Stamp `in-progress` alongside the assignee. One combined `gh issue edit` is the
fast path; because `--add-label` fails the whole call on a repo that has never
defined the label, the fallback splits it (assign alone, create the label
without `--force`, then apply it) so a fork can't lose the assignment to a
missing label. A label failure never changes the assignment's result: the
comment is still retired rather than re-spending a cognition run.

`IN_PROGRESS_LABEL` moves to lib/dispatchLabels.js beside the other workflow
markers, which is what lazily creates it, and perpetualWork.js's skip-list now
reads that constant instead of repeating the literal.

Note: the claim-issue prompt tells its agent NOT to add `in-progress` on a
volunteer handoff, so the two paths now disagree. Reconciling it needs a
PROMPT_VERSIONS bump and a migration; filed separately.
@atomantic
atomantic merged commit a6dd9b0 into main Sep 3, 2026
7 checks passed
@atomantic
atomantic deleted the cos/task-mtlx4yoi/agent-1c99a8e3 branch September 3, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant