Skip to content

🐛 [v6] adoption: the 074 stall clock runs while the adopted PR waits unattempted in the fixer queue #15036

Closed

Description

@Danathar

Target: v6.

Target branch: v6 only. Open the PR with --base v6. hive-open-pr defaults to the repo's default branch (v5) when --base is omitted.
Citations: path:line against v6 @ 26e5fc227, paths relative to src/.

An adopted PR's 074 stall clock runs while the PR is still waiting, unattempted, in the fixer's queue, so a busy single fixer turns queued rebases into 085 parks.

Owner decision needed before implementing: should the 074 dwell pause while the fixer has not reached the PR, or should the fixer's throughput change instead (for example more than one adopted rebase per kick, or a dedicated adoption fixer)? This issue describes the first option. The second would close it too.

What happened

projectbluefin/utah-packages on 2026-10-28. Four contributor fork PRs, #761, #772, #773 and #776, were adopted in place (072 → stage/074-adopted-by-hive) between 11:32 and 11:36Z. They were conflicting, so each needed a rebase.

  • They were routed correctly. At 11:43:04Z one cycle routed 11 adopted rows to the single scanner (9 rebase, 2 fix-ci), logged as adopted PR routed to fixer work=rebase (cmd/hive/merge_eligibility.go:1220). The rows were re-routed every cycle after that.
  • The scanner worked one PR per kick. It rebased feat: K8s scaffold — Dockerfile, kustomize, secrets #770 at 13:46Z, but did not reach the other four within the dwell.
  • All four parked at once. At 14:31–14:35Z, exactly at the 3h 074 dwell, they parked at stage/085-needs-decision as adoption-stalled:conflicting.
  • The park killed the queued fix. At about 15:00Z the scanner reached them and refused: "not resolved by hive because PR lacks stage/074-adopted-by-hive".

So the stall was the queue, not anything the hive was blocked on. The park then sent the work to a maintainer.

Code

  • The stall clock. adoptionStale (pkg/github/automerge/automerge_contributor_adopt.go:1486) measures from Record.AdoptedHeadSince() (pkg/stagelabels/store.go:913), the adoption or the hive's last push.
  • Its consumers. inPlaceRehomeReason (:1523, which gives rebase-rehome for idle rebase work) and adoptionStalledReason (:1545) act on it in escapeStalledAdoption (:1572).
  • No "attempted" record exists. Nothing records whether the fixer has attempted a queued conflict row for a head. The escalation store's re-engagement ledger (StaleRed, ReEngageEligible) covers red-CI PRs only.

Change (if the owner picks the dwell pause)

  1. Record when the fixer first attempted an adopted row's head. The attempt is the first pushable row of a scanner kick that the agent accepted. Persist it per (repo, PR, head) next to the stage record, or in the fixer-routing state that writes ci-failing.json. Also expose when the row was first queued.
  2. Pause the clock. In adoptionStale, while the PR is queued and not yet attempted on this head, count the dwell from max(AdoptedHeadSince, attemptedAt) instead of AdoptedHeadSince.
  3. Hard cap. Add a cap, for example 4× the 074 dwell from AdoptedHeadSince, so a dead or paused fixer still escalates. Do not pause at all when the fixer is unavailable (agentAvailability, used at cmd/hive/main.go:7794).
  4. Unchanged: the escalation note and its reasons.

Acceptance criteria

  • An adopted PR that has waited in the fixer queue, unattempted, for longer than the 074 dwell is not parked at 085 for that reason.
  • Once the fixer has attempted the head, the normal dwell applies from the attempt.
  • With the fixer unavailable or paused, or past the hard cap, the PR parks as today.
  • A same-repo or in-place adoption with no queued fixer row behaves as today.

Test plan

  • automerge_adoption_escape_test.go / automerge_adoption_rebase_test.go, each with a fake fixer-queue source:
    • queued and unattempted past the dwell: no stall and no rehome;
    • attempted 1h ago on a 3h dwell: not stale;
    • attempted 4h ago: stale;
    • fixer unavailable: stale at the dwell;
    • past the hard cap while queued: stale.
  • A unit test for the attempt record: a new head resets it.
  • Docs: the 074 dwell description in src/docs/labels-and-control-signals.md (the stage/074-adopted-by-hive row) and hive-merge.md.

Out of scope

Activity

  1. hivecommons-hive commented on Oct 28, 2026

    @hivecommons-hive
    Contributor

    🔒 Claimed by @thatguywob (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.

  2. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Oct 28, 2026
  3. thatguywob commented on Oct 28, 2026

    @thatguywob
    Contributor

    The issue explicitly leaves an owner decision open before implementation: pause the stage/074 dwell while an available fixer has queued but not yet attempted the adopted head (with the proposed hard cap), or change fixer throughput instead. Please select the intended approach; the proposed implementation and acceptance tests are conditional on choosing the dwell pause. No owner choice is recorded in the current issue comments.

    Verified that upstream/v6 exists at c7edf3af5; this is a design choice in this issue, not a missing base branch or companion checkout. No implementation PR was opened.

    — hive: backend=codex


    🐝 Hive Agent: contributor | SHA: unknown

  4. added
    stage/045-needs-decisionIssue parked on a person: needs-human or a maintainer decision is owed before the hive picks it up
    and removed
    stage/020-claimedClaimed by the scanner or a relay contributor
    on Oct 28, 2026
  5. hivecommons-hive commented on Oct 28, 2026

    @hivecommons-hive
    Contributor

    🔓 Claim by @thatguywob released (lease revoked).

  6. hivecommons-hive commented on Oct 28, 2026

    @hivecommons-hive
    Contributor

    What to reply

    • /hive approve: go with the recommendation
    • /hive decision <your instructions>: go ahead, following your instructions
    • /hive help: show these again

    If what this issue waited on has been done (a merged fix, or an action taken outside this repository), a maintainer can reply /fixed to close it as completed; Hive clears its park labels.

    Only a maintainer with write access can un-park; everything else is ignored. Full command reference: https://github.com/hivecommons/hive/blob/v5/src/docs/maintainer-commands.md.

  7. hivecommons-hive commented on Oct 28, 2026

    @hivecommons-hive
    Contributor

    /hive decision go with the recommendation; where options remain, take the one that keeps work moving and is reversible

    Rationale: no owner rule singles this out; the standing default is the hive's own recommendation.

    Decided by the hive at @clubanderson's request as the owner's delegate under the owner-delegate policy (rule default-approve).

  8. added
    stage/010-actionableTriaged; eligible for the hive to pick up
    and removed
    stage/045-needs-decisionIssue parked on a person: needs-human or a maintainer decision is owed before the hive picks it up
    on Oct 28, 2026
  9. hivecommons-hive commented on Oct 28, 2026

    @hivecommons-hive
    Contributor

    Un-parked by @clubanderson. Decision: go with the recommendation; where options remain, take the one that keeps work moving and is reversible

    stage/045-needs-decision is cleared when present and approved-direction is applied; any hold label is left exactly as it was.

    Recorded from the hive dashboard.

  10. hivecommons-hive commented on Oct 28, 2026

    @hivecommons-hive
    Contributor

    🔒 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.

  11. hivecommons-hive commented on Oct 29, 2026

    @hivecommons-hive
    Contributor

    Fixed by #15131 (merged 9f58413). Closing. Reply /reopen if the problem persists.

  12. github-actions commented on Oct 29, 2026

    @github-actions
    Contributor

    @Danathar 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

    approved-directionhelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions