Skip to content

Supersede-now adoption decision is recorded but never executed (docs#500 waited 15h) #15196

Closed

Description

@clubanderson

Symptom

hivecommons/docs#500 (bot PR by github-actions[bot] via peter-evans/create-pull-request, same-repo head bot/hive-docs-refresh, labels role/trusted, needs-rebase, stage/070-fixing) received an owner-delegate decision:

/hive decision supersede now … Hive decided: Close this PR and open a fresh hive-authored PR with the same commits … expected within 30 min.

The decision comment (<!-- hive:delegated-decision by=hosted-available-oke-11-placeholder-r05x policy=owner-delegate -->, rule contributor-offline) was posted 2026-10-28T23:59:55Z and the adoption/supersede label applied at 2026-10-29T00:00:00Z. No fresh PR was opened, #500 was not closed, the label stayed on. (The PR had been needs-rebase since 09:19Z, hence the ~15h wait before the owner intervened and re-ran the refresh workflow.)

Mirrors #14666 / #14787: a decision is recorded but no executor runs it.

Evidence

  • Logs (hosted hive, pod hive-787656c98f-mp9fr, started before the decision, --since=24h, 16k lines): zero adopt|supersede|decision lines for docs#500. Only automerge skip (trusted-bot-lane, contributor-lane:app-authored, label:needs-rebase) and stage labels lines, every one with "lane":"self-authored".
  • State (/data/stage-labels.json, record hivecommons/docs#500): author: github-actions[bot], adopted_at / adopt_checked_at / adopted_head_at all zero, activity_digest contains adoption/supersede → the durable request is present, no attempt was ever recorded.
  • Control: hive#15105 (contributor lane) was adopted + superseded fine in the same hour by the same pod.

Root cause — (a) executor filters out bot/App-authored heads, silently

automerge_stage_labels.go runs the executor every sweep while the label is present (adoptContributorPR(...), label removed only once an attempt is recorded). But adoptContributorPR opens with

if !ok || obs.Lane == stageLaneSelf || obs.Author == "" || obs.BaseRef == "" {
    return 0, nil
}

sweepLaneForAuthor classifies github-actions as trusted-bot, and the trusted-author tier hands trusted-bot PRs to the self-authored sweep, whose recordStage stamps stageLaneSelf. So a github-actions PR is observed under lane self-authored → the executor returns silently on every sweep: no log line, no attempt recorded, label never cleared, decision never executed.

Ruled out: (b) replay never ran; (c) decision is durable (label + record on disk, pod predates the decision); (d) executor is in the engine sweep, not an agent prompt.

Secondary gaps found on the same path:

  • under maintainer_policy: never, authorMaintainsRepo reads collaborator permission for github-actions[bot], which 404s → deferred forever;
  • supersedeAdoptedPR never replays a conflicting head onto the base: the "fresh PR" would open conflicting, and a failure to do so has no comment or stage reason.

Fix

  • Run the executor for trusted-bot PRs observed on the self-authored lane; refuse (once, with a note) only when the author is the App itself.
  • Skip the collaborator-permission read for [bot] authors.
  • Before opening the copy for a conflicting head, merge the base into the hive branch; on 409 post ONE comment with the concrete failure, consume the request (label cleared, no live adoption), delete the hive branch and keep the PR at its fixing stage (070/071/072) with reason supersede-conflict.
  • Log every early return for a requested adoption.

Activity

  1. github-actions commented on Oct 29, 2026

    @github-actions
    Contributor

    @clubanderson this issue was closed by @hivecommons-hive[bot] as completed.

    If this was closed by a merged PR, the fix only takes effect once it ships in a tagged release and your deployment updates to it — check your running version against the fix before concluding the fix failed.

    If you are still seeing the problem, comment /reopen and it will be reopened for you — you do not need write access. Please add what you are still observing (running version, logs, steps) so it is not closed the same way again.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions