Fix race condition in triage workflow label ordering#505
Merged
Conversation
The triage agent was assigning the `actor/kelos` label in step 6 before applying `kelos/needs-input` in the Output section. This created a window where the kelos-workers spawner could pick up the issue before the maintainer review gate was in place. Fix by deferring the actor label assignment to the final `gh issue edit` command, combining it with the lifecycle labels (`triage-accepted`, `kelos/needs-input`) into a single atomic operation. This ensures `kelos/needs-input` is always present when `actor/kelos` is set. Fixes #504 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gjkim42
approved these changes
Mar 1, 2026
This was referenced Mar 1, 2026
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
actor/kelosbeforekelos/needs-input, allowing workers to pick up issues before maintainer reviewgh issue editcommand, combining it with lifecycle labels (triage-accepted,kelos/needs-input) into a single atomic operationactor/kelosandneeds-actorcases in the final label updateDetails
The
kelos-workersspawner watches for issues withactor/kelosand excludeskelos/needs-input. Previously, the triage prompt instructed the agent to:actor/kelos(step 6, line 117)kelos/needs-input+triage-accepted(Output section, line 143)Between these two commands, there was a race window where the issue had
actor/kelosbut notkelos/needs-input, so a worker could pick it up before the maintainer review gate was in place.The fix combines both operations into a single
gh issue editcall, ensuringkelos/needs-inputis always set atomically withactor/kelos.Fixes #504
Test plan
gh issue editcommandkelos/needs-inputis set🤖 Generated with Claude Code
Summary by cubic
Fixes a race in the triage workflow where actor/kelos could be set before kelos/needs-input, allowing workers to start early. Defers actor labeling and applies actor + lifecycle labels in a single gh issue edit to make the update atomic (fixes #504).
Written for commit bc5ac10. Summary will update on new commits.