fix(shiftengine): a roled plan that closes successfully settles at done #43

Closed
agent-builder wants to merge 1 commit from agent/vik-776 into development
Member
No description provided.
fix(shiftengine): a roled plan that closes successfully settles at done
All checks were successful
On Pull Request / checks (pull_request) Successful in 1m13s
e6f2268ebe
close() parked every CONFIGURED plan's item at needs_human no matter how
well the run went, so a roled run that ended with the builder's pr_opened,
a reviewer's approval and close_reason review_approved still reached
needs_human. The roleless path reaches done from the identical pr_opened
outcome — the presence of a role was silently the discriminator (nine items
parked behind it on ploegd 0.2.0-rc.28).

Success is now earned, not inferred: closeSucceeded maps the loop's explicit
approval, and a plan that ran out with the last reviewer approving, to the
same terminal success state the roleless path uses. Every other close —
stuck, writer-failed, dry pool, fix-cap, a plan nobody approved — still
parks at needs_human. No new state, no migration: the configured path now
simply settles done where it previously settled needs_human.

Regression test: TestRoledPlan_ApproveSettlesDone covers builder -> reviewer
-> approve reaching terminal success, both under the loop's explicit approval
(review_approved) and a plan that runs out with the last verdict approving
(plan_exhausted). It fails against the pre-fix code, where close() settles
every configured plan at needs_human.

VIK-776
Agent-Trace-Id: ploeg-49ce3e1d33b0

Co-authored-by: openhands <openhands@all-hands.dev>
Owner

Closing as superseded: Glide 8af4b75 settles a successful Shift at awaiting_review instead of done, and Glide 121b345 ports this PR's rule that a plan which runs out while the last review asks for changes settles at needs_human. Ploeg now lives in https://forgejo.webgrip.dev/webgrip/glide under apps/ploeg; this repository is being frozen.

Closing as superseded: Glide 8af4b75 settles a successful Shift at awaiting_review instead of done, and Glide 121b345 ports this PR's rule that a plan which runs out while the last review asks for changes settles at needs_human. Ploeg now lives in https://forgejo.webgrip.dev/webgrip/glide under apps/ploeg; this repository is being frozen.
ryangr0 closed this pull request 2026-09-23 12:06:39 +00:00
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
webgrip/ploeg!43
No description provided.