Skip to content

fix: routing bug — getNextTask + sweeper bounce paths (M cut 13x bounce)#1339

Merged
itskai-dev merged 1 commit into
mainfrom
rhythm/routing-fix-v2
May 10, 2026
Merged

fix: routing bug — getNextTask + sweeper bounce paths (M cut 13x bounce)#1339
itskai-dev merged 1 commit into
mainfrom
rhythm/routing-fix-v2

Conversation

@itskai-dev
Copy link
Copy Markdown
Collaborator

Summary

Two-part routing fix for the structural bug causing closed tasks to bounce back via /tasks/next:

Part 1 — sweeper bounce path

executionSweeper.ts was requeuing PR-merged tasks to todo when missing artifacts. Two pr_merged guards added:

  • Artifact-rejection path: PR merged + no qa_bundle → close to done
  • Drift-repair dupeErr path: PR merged + approved → close to done

Part 2 — getNextTask selector

getNextTask() had no awareness of board truth signals. Added four filters:

if (reviewState === 'parked_pass' || reviewState === 'parked_fail') return false
if (meta?.reopen === true) return false
if (meta?.board_truth && typeof meta.board_truth === 'string') return false
if (meta?.blocked_external === true) return false

Why Both Parts

Part 1 stops the sweeper from putting PR-merged tasks back in todo.
Part 2 stops getNextTask from surfacing tasks that carry board-truth signals.

Together: closed tasks stay closed, parked tasks stay parked, board-truth-routed tasks go to the right lane.

Testing

  • TypeScript clean
  • task-1777172195778-9zofmfuya (parked_pass) — correctly filtered
  • task-1777356670701-lo4e5fiim (board_truth → link, blocked_external) — correctly filtered

Reported by link: M cut bounced 13+ times. Root cause was both paths combined.
Ref: task-1778408493344-cgd00jx71

@itskai-dev itskai-dev merged commit f8d9ad1 into main May 10, 2026
11 checks passed
@itskai-dev itskai-dev deleted the rhythm/routing-fix-v2 branch May 10, 2026 10:29
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.

1 participant