Skip to content

[Fix] Task runs complete twice after duplicate terminal events - #1183

Merged
daniel-lxs merged 1 commit into
developfrom
fix/lifecycle-pr-review-reliability-1vxwr851dogfl
Aug 9, 2026
Merged

[Fix] Task runs complete twice after duplicate terminal events#1183
daniel-lxs merged 1 commit into
developfrom
fix/lifecycle-pr-review-reliability-1vxwr851dogfl

Conversation

@roomote-roomote

Copy link
Copy Markdown
Contributor

Opened on behalf of Daniel Riccio. View the task or mention @roomote-roomote for follow-up asks.

What changed

  • Made settled harness completion idempotent so replayed terminal events cannot emit duplicate run-exit and completed updates.
  • Added regression coverage for hidden queued re-review turns across paired OpenCode idle events, including exactly-once run completion.
  • Added sequential notification coverage for live-heartbeat deferral, stale/dead-worker release, replacement-worker settlement, and retry delivery without duplicate posts.

Why this change was made

The fixes in #1157 and #1170 covered paired idle handling and stale-heartbeat notification release independently. Exercising those paths as lifecycle sequences exposed that a duplicate terminal event could still finalize an already settled harness turn twice.

Impact

Live turns retain the existing debounce and deferral behavior, including during replacement-worker recovery. Pending review feedback is released after a dead worker and delivered once, while each real harness turn now produces one run completion even if its terminal event is replayed. Focused worker and BullMQ lifecycle suites, package typechecks, formatting, and the repository pre-push checks pass.

@roomote-community

roomote-community Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

No code issues found. See task

Reviewed 6d3e572

@daniel-lxs
daniel-lxs marked this pull request as ready for review August 9, 2026 21:25
@daniel-lxs
daniel-lxs merged commit 9da9f7b into develop Aug 9, 2026
19 checks passed
@daniel-lxs
daniel-lxs deleted the fix/lifecycle-pr-review-reliability-1vxwr851dogfl branch August 9, 2026 21:25
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