mark an issue in-progress when the watcher assigns a volunteer to it - #6111
Merged
Conversation
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.
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.
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.
in-progressalongside the assignee. One combinedgh issue editis the fast path. Because--add-labelfails 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.IN_PROGRESS_LABELmoves tolib/dispatchLabels.jsbeside the other workflow markers, which is what lazily creates them.perpetualWork.js's skip-list now reads that constant instead of repeating the literal, andissueReconcile.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.jstells the claim-issue agent, on this same event, to "leave contributor-invitation labels intact, do NOT addin-progress." The watcher now does the opposite, so the two paths disagree. Reconciling the prompt needs aPROMPT_VERSIONSbump plus a migration, which doesn't belong here — filed separately, along with two consequences:STALLEDon each issue-reconcile pass. That is log-only — no agent dispatch, no spend.good first issue/help wantedthe 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 alabel createcommand.