Skip to content

Fix race condition in triage workflow label ordering#505

Merged
gjkim42 merged 1 commit intomainfrom
kelos-task-504
Mar 1, 2026
Merged

Fix race condition in triage workflow label ordering#505
gjkim42 merged 1 commit intomainfrom
kelos-task-504

Conversation

@kelos-bot
Copy link

@kelos-bot kelos-bot bot commented Mar 1, 2026

Summary

  • Fix race condition where the triage agent assigns actor/kelos before kelos/needs-input, allowing workers to pick up issues before maintainer review
  • Defer the actor label assignment from step 6 to the final gh issue edit command, combining it with lifecycle labels (triage-accepted, kelos/needs-input) into a single atomic operation
  • Add conditional instructions for both actor/kelos and needs-actor cases in the final label update

Details

The kelos-workers spawner watches for issues with actor/kelos and excludes kelos/needs-input. Previously, the triage prompt instructed the agent to:

  1. Apply actor/kelos (step 6, line 117)
  2. Later apply kelos/needs-input + triage-accepted (Output section, line 143)

Between these two commands, there was a race window where the issue had actor/kelos but not kelos/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 edit call, ensuring kelos/needs-input is always set atomically with actor/kelos.

Fixes #504

Test plan

  • Verify the triage agent applies all labels in a single gh issue edit command
  • Confirm workers do not pick up issues before kelos/needs-input is 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).

  • Bug Fixes
    • Move actor/kelos out of step 6; apply with triage-accepted and kelos/needs-input in one command.
    • Add explicit commands for both actor/kelos and needs-actor paths.
    • Prevent workers from picking issues before the maintainer review gate is set.

Written for commit bc5ac10. Summary will update on new commits.

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>
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

triage process should assign actor after adding needs-input label

1 participant