Skip to content

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
ryanrborn merged 1 commit into
mainfrom
bugfix/2021-board-drops-card-when-task-s
Sep 24, 2026
Merged

ryanrborn merged 1 commit into
mainfrom
bugfix/2021-board-drops-card-when-task-s

Conversation

@ryanrborn

Copy link
Copy Markdown
Owner

Summary

An in_progress task 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 stopped orphaned_cards/3 from picking the task up. Since :completed sits in neither @running_statuses nor @waiting_statuses, the task matched none of the board's card-producing filters — even though classify_columns/2 still called it :waiting.

Fix: orphan_worked/2 narrows worked to task ids that have at least one non-:completed author row before it's used by orphaned_cards. A task whose author rows are ALL :completed now falls through to the orphaned-card path and renders a Waiting card. The orphaned card's reason now also names review_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

  • New test: an in_progress issue whose only worker row is :completed renders a Waiting card whose reason names review_park_reason.
  • New test: same, without a park reason, falls back to the generic "worker stopped" message.
  • New test: a task with both a :completed row and a live row is not double-counted.
  • New invariant test: every issue classify_columns/2 places in :waiting or :running yields exactly one card from derive/1.
  • mix test test/arbiter/board/ and test/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, CLI Create/ReleaseDeploy ×2) caused by this worker's own ARB_* environment variables, not by this change; confirmed by re-running ProvisioningTest with those vars unset (0 failures).

References

bd-6lvc1r

Closes #2021

🤖 Generated with Claude Code

… :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
@ryanrborn
ryanrborn merged commit a110bb5 into main Sep 24, 2026
5 checks passed
@ryanrborn
ryanrborn deleted the bugfix/2021-board-drops-card-when-task-s branch September 24, 2026 14:07
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.

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

1 participant