fix(ploeg): retry a failed reviewer and close review_failed when no review came #195
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ryangr0/ploeg-failed-reader-review-failed"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements the accepted ADR-0043 (VIK-1304, handoff EXEC-05).
Problem
When a reading Run failed,
retryFailedWriterlogged "a reading Run failed; its findings are missing" and the plan moved on. When that reader was the reviewer of a writer's pull request, the Shift closedplan_exhaustedandreadyForReviewsettled the itemawaiting_review. The tracker comment then said "plan complete" about a review that never happened. This happened to Shift 90 (OOMKilled reviewer) and Shift 118 (ACP idle watchdog).TestFailedReader_StillAdvancesTheRoundpinned the old behaviour.Invariant
review_failed, neverplan_exhausted.Change (Ploeg)
retryFailedRunshandles the writer first, as before (ADR-0019). OtherwiseretryFailedReadersreopens every failed reading Role that still has attempts left. It does this in onestore.ReopenRoundcall in the current Round, so the counter does not advance and readers that reported are not re-run.MaxRunAttempts(agent failures:agent_error,idle,timeout, so an ACP watchdog kill stays an agent failure) and byMaxInfraFailures(infrastructure failures).plan_exhaustedand the last reading Round after the last writer has a Role with no non-failed Outcome, the close reason isreview_failed. With a writer's pull request, the item still settlesawaiting_review.plan_exhausted, astuckreader still freezes the plan, and an approval still closesreview_approved.store.RunReport.FailureReasonis new (read from the existing column; no migration).shift-orchestrationspec rewords the swept-reader scenario as the ADR asks and adds a requirement for the reader retry.docs/how-to/review-an-agent-pr.mdlistsreview_failed.Change (Vloer)
In the Ready for review lane, the row chip reads "Agent review unavailable" (attention). The Work Item page says no agent reviewed the pull request.
closeReasonLabel('review_failed')reads "No agent reviewed it: the reviewer kept failing". The demo replay is re-recorded becausepublic/changed.Tests
New in
pkg/shiftengine/failedreader_test.go, against real embedded Postgres. All of them except the stuck and wording tests failed ondevelopmentbefore the change:TestFailedReader_ReopensItsOwnRound(the ADR's named replacement)agent_error,idleandtimeoutpr_openedand three failed reviewer attempts givereview_failed,awaiting_review, and a tracker comment without "plan complete" or "approved"review_approved) or reports without a verdict (plan_exhausted)ErrBudgetExhausted) and is parkedTestFailedReader_StillAdvancesTheRoundis removed, as the ADR says.TestExpiredReaderDoesNotBlockTheRoundbecomesTestSweptReaderIsRetriedByTheSweepAndNeverBlocksTheRound. Vloer adds assertions intest/ploeg-view.test.mjsandtest/reasons.test.mjs.Commands (at
c2ced737, Go 1.27.1, Node 24.21.0)mise exec -- go test ./pkg/shiftengine/ ./pkg/store/ -count=1 -v: 273 top-level tests passed, 0 failedmise exec -- openspec validate --all --strict: 17 passedmise run demo-record: re-recorded (391 requests)mise run verify: all gates passed (vloer 7 incl.npm test700/700, demo-replay 1, vloer-extension 4, ploeg 7, brand 1, site 5, site-demo 1, helm 15, release 3, integration 1, docs 1)Not in this PR
close_reason = review_failed.Refs VIK-1304
🤖 Generated with Claude Code
Pull request closed