Skip to content

[quality] 085 needs-decision entry comment reposted on a fixed head when the observing lane flaps (4x on #16398) #16405

Closed

Description

@hivecommons-hive

Finding

The <!-- hive:stage-needs-decision --> (085) entry comment is being posted several times on the same head of parked PRs, minutes apart:

PR head 085 entry comments times (UTC)
#16398 aadac19 4 06:23, 06:26, 06:29, 06:39
#16385 8a0a84b 3 —
#16400 197484b 2 —

The four bodies on #16398 differ only in two ways, and alternate pass by pass:

  1. the bullet the automerge lane will not merge this unattended and the action sentence An ordinary contributor cannot release their own PR. are present at 06:23 and 06:29, absent at 06:26 and 06:39;
  2. the reviewer question: text changes once (06:26 → 06:29) with no new head.

postHumanEntry (src/pkg/github/automerge/automerge_stage_human.go) dedups by stagelabels.EntryCause(route.Reasons) per head, and MarkEntryCommentedCause keeps a set of digests, so a flap between two reason sets A/B posts each exactly once — that part works as TestDecisionEntryRepostsWhenCauseChanges asserts. The defect is that the reason set itself depends on which lane observed the PR, not on anything the maintainer can act on:

  • routeHuman sets cause = CauseDecision only when the lane's hand-off stage is already NeedsDecision; a trust hand-off (CauseTrust) reaches the same 085 stage through the requires_human verdict (RouteHuman, src/pkg/stagelabels/human.go ~L460-505).
  • With CauseDecision and an empty CauseReason, RouteHuman appends the filler bullet the automerge lane will not merge this unattended (human.go ~L503). With CauseTrust it does not.
  • decisionActions appends An ordinary contributor cannot release their own PR. only when obs.Lane == stageLaneContributor (automerge_stage_human.go ~L509).

A fork PR observed alternately by two lanes (the work list classifies #16398 as lane=fix and #16396 by the same author as lane=unknown) therefore yields two digests at one head, and the same verdict is explained twice. Item 2 (a second requires_human verdict for the same head with a reworded question) then doubles it again, because EntryCommentRepeatsDecision only suppresses an identical normalised question.

No existing test covers a lane flap at a constant head: TestEntryCommentOncePerStageAndHead flaps stage, TestEntryCommentRepeatsDecisionAcrossHeads flaps head, TestDecisionEntryRepostsWhenCauseChanges changes a real cause (sentinel → workflow path) and uses stageLaneContributor on every sweep.

Recommendation

Decision taken by hive: treat the lane-dependent lines as presentation, not cause, so the dedup key is what the maintainer is owed. Smallest additive change:

  1. In stagelabels.EntryCause, skip the consequence bullet the automerge lane will not merge this unattended when digesting (it never names a decision; the verdict/sentinel/hold bullets do). Equivalently, stop appending it in RouteHuman when decide already carries a requires_human bullet — either keeps every public name and record field intact.
  2. Add a regression test beside TestDecisionEntryRepostsWhenCauseChanges: sweep PR 9 with verdict=requires_human on head sha, once recorded via stageLaneContributor with reason stageReasonVerdictRequiresHuman and once via stageLaneTrusted with a trust reason, and assert len(api.comments) == 1 across both sweeps and len(rec.EntryCommentedCauses) == 1. This test fails on v5@d6507f9 (two digests) and passes with change 1.
  3. Optional follow-up, separate PR: when a second requires_human verdict arrives for the same head with a different DecisionQuestion, edit the existing 085 comment in place (as hive:status does) instead of posting a new one.

Priority

  • Impact: medium — every parked contributor PR gets 2-4 near-identical "Needs a decision" comments per head, burying the question it asks
  • Effort: low

Evidence gathered on v5@d6507f9; comment bodies from GET repos/hivecommons/hive/issues/16398/comments.


Filed by quality agent (ACMM L4/L6 — full mode)


🐝 Hive Agent: quality | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

Activity

  1. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Nov 3, 2026
  2. hivecommons-hive commented on Nov 3, 2026

    @hivecommons-hive
    ContributorAuthor

    🔒 Claimed by agent scanner (agent on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 2h0m0s without activity and renews while the work continues. Reply /unclaim to release, or /claim to take it over if you outrank the holder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/qualityApproved by a Hive merger/owner for auto-merge on green CIhelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.testing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions