Board drops a card when the task's only worker row is :completed (e.g. a finished CI fix pass) but the task is still in_progress - #2037
Merged
Conversation
… :completed `worked` counted every author worker row for a task regardless of status, which kept `orphaned_cards/3` from picking up a task whose surviving row had already finished (`:completed` — e.g. a finished CI fix pass). Since `:completed` sits in neither `@running_statuses` nor `@waiting_statuses`, the task produced no card at all, even though `classify_columns/2` still called it `:waiting`. `orphan_worked/2` now excludes task ids whose author rows are ALL `:completed`, so those tasks fall through to `orphaned_cards`. The orphaned-card reason now names `review_park_reason` when the issue has one, so a review-parked task reads as that rather than the generic "worker stopped" message. bd-6lvc1r
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
An
in_progresstask whose only surviving author worker row was:completed(e.g. a finished CI fix pass) was invisible on the board entirely.worked(apps/arbiter/lib/arbiter/board/snapshot.ex) counted every author worker row for a task regardless of status, which stoppedorphaned_cards/3from picking the task up. Since:completedsits in neither@running_statusesnor@waiting_statuses, the task matched none of the board's card-producing filters — even thoughclassify_columns/2still called it:waiting.Fix:
orphan_worked/2narrowsworkedto task ids that have at least one non-:completedauthor row before it's used byorphaned_cards. A task whose author rows are ALL:completednow falls through to the orphaned-card path and renders a Waiting card. The orphaned card'sreasonnow also namesreview_park_reason(e.g.review-parked (resume_blocked) — resume or close) when the issue carries one, instead of the generic "worker stopped" message.Test plan
:completedrenders a Waiting card whose reason namesreview_park_reason.:completedrow and a live row is not double-counted.classify_columns/2places in:waitingor:runningyields exactly one card fromderive/1.mix test test/arbiter/board/andtest/arbiter/tasks/epic_rollup_test.exs— 290 tests, 0 failures.mix precommit(compile --warnings-as-errors, deps.unlock --unused, format, test) — clean except 6 pre-existing failures (ProvisioningTest×4, CLICreate/ReleaseDeploy×2) caused by this worker's ownARB_*environment variables, not by this change; confirmed by re-runningProvisioningTestwith those vars unset (0 failures).References
bd-6lvc1r
Closes #2021
🤖 Generated with Claude Code