Repository navigation
π Activity Monitor: author's force-push after a 071 ask reads pushed, not "no response" - #16022
Conversation
β¦ response The stage record keeps the original ask and the head pushed after it across the re-ask the sweep issues when the new head is red again, the rework chip derives pushed from it (requested_at on the original ask), and a row whose push field says pushed drops the Needs @author decision and the needs-human count until CI / the re-review settle. Fixes #16021 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
|
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. @clubanderson this PR is held at Failing checks:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. Review findings from Read the diff against the tree at What I verified:
One low-severity note, not a blocker: |
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
There was a problem hiding this comment.
Correctness review (read at head cd19223, the PR moved past 716748a). The store memory survives the 071 β 050 β 071 bounce as described, and stageTrackerPushPending only fires in the pre-sweep window, so the red-head re-ask keeps the decision per #16021. One edge case in the new store logic worth closing while you're here:
rework_asked_at is never reset by a review-verdict re-ask, so the next exchange anchors to a stale ask (src/pkg/stagelabels/store.go:887-905, NoteActivity store.go:855-859)
The clear path in NoteActivity requires !a.WaitingOnHive, but at 050 with no verdict yet stageActivity sets WaitingOnHive = true (src/pkg/github/automerge/automerge_stage_labels.go:709-711, the stage == ReviewPending && β¦ !VerdictKnown arm). So after the author's push settles green and sits at review-gate:awaiting-review-approval, the memory is kept; when the reviewer then returns reviewer-verdict:changes_requested, Observe(071) runs notePushStageChange with ReworkAskedAt already set and only tops up noteReworkPush β the epoch stays at the original CI ask. The dashboard handles that 071 correctly (stageTrackerReworkAnswered, stage_tracker_rework.go:220-222 β fresh requested), but the author's next push β 050 β red 071 reads pushed with requested_at = the first-ever CI ask, not the changes-requested ask. TestStoreReworkPushSurvivesReAsk only covers the settle via WaitingOnHive=false, which production does not emit for an unreviewed 050.
Suggested store-side reset (reason is already on the record when notePushStageChange runs, store.go:692-701):
func (r *Record) notePushStageChange(now time.Time) {
switch {
case r.Stage.WaitsOnPush():
- if r.ReworkAskedAt.IsZero() {
+ if r.ReworkAskedAt.IsZero() || r.reworkReAskIsVerdict() {
+ // First ask, or a reviewer looked at the head the author
+ // pushed and asked again: a new exchange starts here.
+ r.clearRework()
r.ReworkAskedAt = now
} else if r.LastPushSha != "" && !r.LastPushAt.Before(r.ReworkAskedAt) {// reworkReAskIsVerdict reports a 071 entry whose reason is a review verdict
// on the head the author pushed for the standing ask.
func (r Record) reworkReAskIsVerdict() bool {
return r.ReworkPushedHead != "" && strings.EqualFold(r.ActivityHead, r.ReworkPushedHead) &&
strings.HasPrefix(r.Reason, "reviewer-verdict:")
}Plus a store test: push β 050 (WaitingOnHive: true, awaiting review) β 071 LaneReasonChangesRequested β assert ReworkAskedAt == now and ReworkPushedHead == "".
Not blocking: the issue's reported symptom is fixed; this only mis-dates requested_at in a multi-round exchange.
β hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Closes #16021
Root cause
notePushStageChangeclearslast_push_at/last_push_shaand restartswaiting_push_since;noteTrustedHuman071βMarkNudged(newHead)resetsnudge_head/first_nudge_at.required-check-pending) β 071 (optional-check-failing:server-tests) within 12 s, so the record then said: ask issued just now for the current head, no push since.stageTrackerReworkForonly reportspushedwhenit.Head != rec.NudgeHead, which is never true after the re-ask.requested Β· no responseand the row kept the "Needs @author" decision / needs-human even while a push was pending CI.Fix
stagelabels.Recordgainsrework_asked_at/rework_pushed_head/rework_pushed_at: opened on 071/072 entry, booked from the webhook push (notePushStageChange), the enumerate head change at 071 (NoteActivity) and a nudge for a different head (MarkNudged); cleared when the pushed head settles in the CI / Review column without a re-ask, or when the item leaves the column.stageTrackerReworkFor: a remembered push on the current head readspushed/ evidencecommit,since= push instant (the webhook-booked instant now also dates the existing head-moved branch),requested_atanchored to the original ask β unless the re-ask is a review verdict on that head (the re-review happened; a freshrequestedis right). Commit dates are never consulted, so a rebase + force-push with old author dates behaves the same.pushfield ispushed(new head not yet evaluated) returns no "Needs @author" decision and does not count as needs-human. A red new head keeps the ask; the chip still says pushed.Tests
TestStoreReworkPushSurvivesReAsk(store, end-to-end bounce incl. enumerate-seen second push, settle, fresh ask, leaving the column).TestStageTrackerReworkFor: re-asked on pushed head β pushed from original ask; review verdict β requested; other-head memory ignored; webhook-booked push dates the state.TestDecisionNeededDropsWaitingOnAuthorAfterPush,TestStageTrackerNeedsHumanpushed cases.No JS change (
STAGE_TRACKER_REWORK_WORDSalready carries the pushed wording).