Repository navigation
🐛 Review chevron: done-style once perspectives finish, verdict word when adopted - #16532
Conversation
…hen adopted A complete review verdict (5/5) parked on a human decision wore the amber in-progress fill and kept saying "awaiting human decision" even after the hive adopted the PR back into PR in progress. - JS: a settled human_decision track is done-style + muted (.decided); amber only while perspectives are running (a.active). CI unchanged: passed is done. - JS/Go: with the hive on the repair (074 adopted, 07x fix stages, no needs-human/hold/085) a human_decision verdict reads "changes requested"; the decision question and provenance ride in detail/source. - Tests: Go per-stage table, node shapes (adopted / parked / approved / both-running #16494), rows fixture; prelude now lifts stageTrackerTrackWord. Fixes #16531 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 1407a2c. |
There was a problem hiding this comment.
Correctness review (read at head 1407a2c; diff plus stage_tracker_remediation.go, stage_tracker_activity.go, stage_tracker_build.go, tracker-row-strip.js). No in-scope blocker; two advisories.
-
Undisclosed behaviour change on already-red 074 rows, untested through the real entry point —
stage_tracker_remediation.go:288-291. The newif out.State == "adopted" { return }runs for every red 074 row, not just the rewrittenhuman_decisionone. Before this PR a 074 row with a genuinechanges_requestedverdict or failing CI and no pickup evidence fell to the default branch (:323-338) and readChanges requested · unassigned · next: <fixer>; now it keepsAdopted repair · activity unknown. That is probably the right word for an adopted row, but the PR body doesn't list it andTestStageTrackerAdoptedRowRewordsHumanDecisioncallsstageTrackerAdoptHumanDecisiondirectly, so nothing exercisesstageTrackerApplyRemediationon a 074 row at all (neither the new red-via-rewrite path nor the changed pre-existing one). Suggest one table case through the real function:+func TestStageTrackerApplyRemediationAdoptedKeepsStageWord(t *testing.T) { + now := time.Now() + for _, state := range []string{"human_decision", "changes_requested"} { + it := &StageTrackerItem{Repo: "org/repo", Kind: "pr", Number: 9, Head: "abc", Stage: trackerNumberAdopted, + CodeActivity: &StageTrackerActivity{Head: "abc", State: "adopted", Caption: "Adopted repair · activity unknown", Source: "native-adoption"}, + ReviewActivity: &StageTrackerActivity{Head: "abc", State: state, Since: timePtr(now.Add(-time.Hour))}} + stageTrackerApplyRemediation(it, review.DispatchState{}, nil, "fixer", now) + if it.CodeActivity.State != "adopted" || it.ReviewActivity.State != "changes_requested" { + t.Fatalf("%s: adopted row lost its stage word or verdict: %+v %+v", state, it.CodeActivity, it.ReviewActivity) + } + } +}
-
JS fallback treats
unassignedas "hive owns the repair" —tracker-row-strip.js:91-96(and the generated copy instatic/index.html).codeStateUnassignedis emitted when there is no pickup evidence (stage_tracker_remediation.go:323-338), and for a human-authored PR the word isnext: @author(stageTrackerNextRemediator,:216-226), so nobody from the hive owns it. On a non-adopted row with failing CI and ahuman_decisionverdict the client would therefore saychanges requestedwhere the Go side still sayshuman_decision. Low impact since Go is authoritative and the two can only disagree when the server is older than the client, but the list is misnamed as written:const hive = code && code.head === item.head && ['adopted', 'remediating', 'fix_pushed', 'fixing'].includes(code.state);
Not verified: mobile-shots fails on this head on tracker-header-geometry across all viewports; this PR only adds a .done.decided rule, so it looks unrelated to the diff, but I could not confirm the base-branch status.
— hive: agent=adjudicator-3 backend=copilot model=claude-fable-5.1 copilot=1.0.88
Fixes #16531
Problem
On a PR row back in PR in progress ("Adopted by hive · activity…"), the Review chevron rendered AMBER (in-progress fill) reading
Review 5/5 · awaiting huma…although all perspectives were done and nobody was running anything.Rules implemented
stageTrackerActivityTrackHtml: a completehuman_decisionverdict isdone decided(muted settled style, never the active fill, no pulse). Approved staysdone, changes requested staysfailing, in-progress perspectives (a.active) stayactive. CI unchanged:11/11 passed=done; amber only while checks run.stageTrackerAdoptHumanDecision(called fromstageTrackerApplyRemediation) rewrites a current-headhuman_decisionreview activity tochanges_requested/ "Review findings · changes requested" when the row is at 074 adopted or a 07x fix stage and is not parked on a person (NeedsHuman,OnHold,Hold, 085). The decision question and+adopted-decisionprovenance ride indetail/source.stageTrackerHiveOwnsRepair(item)→ word "changes requested" for adopted / remediating / unassigned / fix_pushed / fixing code activity, stage 74 oradopted_by; "awaiting human decision" stands when genuinely parked.Tests
TestStageTrackerAdoptedRowRewordsHumanDecision(adopted / fixing / needs-human / hold / 085 / old head); rows fixture instage_tracker_ui_rows_test.go(adopted row + parked row); prelude now liftsstageTrackerTrackWord+ helper.stage_tracker_remediation_chevron.test.jsadopted-row shapes (decided / changes / approved / CI done) and both-running.cd src && go test ./pkg/dashboard/green (full package);make dashboard-gen && make dashboard-gen-checkclean; gofmt/vet clean.Changelog:
changelog.d/fixed-review-chevron-amber.md.