Skip to content

Review backlog (correctness): Race closed only post hoc; UpdateBranchExpectedHead already exists #14537

Closed

Description

@hivecommons-hive

Blocked on PR #14535. This finding came from reviewing PR #14535 and is about code that PR is changing. Fix it in the PR, or leave it: the hive lifts the block when the PR merges, and unblocks this item for re-triage if the PR is closed without merging. Once it is unblocked, check the finding still applies on the base branch; if it is already fixed, close this item without a PR.

Filed from an out-of-scope finding in the Hive review of PR #14535.

PR: #14535 (#14535)
Perspective: correctness
Severity: info (P3)
Evidence: src/cmd/hive/main_helpers.go:284 (

if err := ghClient.UpdateBranch(ctx, pr.Repo, pr.Number); err != nil {
)
Finding: Race closed only post hoc; UpdateBranchExpectedHead already exists

maintainHeldPRMergeability calls ghClient.UpdateBranch (main_helpers.go:284) without expected_head_sha, although UpdateBranchExpectedHead (src/pkg/github/pullrequest.go:534) exists precisely so GitHub rejects an update when the head moved after enumeration. Using it would prevent the hive from stacking a merge commit on top of unreviewed contributor commits at all, rather than detecting it afterwards and leaving the branch with the hive's merge on an unadopted head. Advisory; the post-hoc parent check is still needed for a push landing after the 202.

Fingerprint: 7d85ff1088456d1257a949cb8e1741b127045f573a22f5a45467f5b9d3909352

filed by Hive review backlog

Activity

  1. added
    blockedWaiting on something outside this repository; not contributor work until a human clears the label
    on Oct 27, 2026
  2. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Oct 27, 2026
  3. removed
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    blockedWaiting on something outside this repository; not contributor work until a human clears the label
    on Oct 27, 2026
  4. hivecommons-hive commented on Oct 27, 2026

    @hivecommons-hive
    ContributorAuthor

    Unblocked: #14535 is no longer open. This issue is actionable again.

  5. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Oct 27, 2026
  6. hivecommons-hive commented on Oct 27, 2026

    @hivecommons-hive
    ContributorAuthor

    Unblocked: #14535 merged. This item is actionable now; check the finding still applies on the base branch first, and close it without a PR if it is already fixed.

  7. hivecommons-hive commented on Oct 27, 2026

    @hivecommons-hive
    ContributorAuthor

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

  8. hivecommons-hive commented on Oct 27, 2026

    @hivecommons-hive
    ContributorAuthor

    🔓 Claim by @Karibhou released (lease revoked).

  9. added a commit that references this issue on Oct 27, 2026
    6977027
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/reviewerFiled by the reviewer agenthelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions