Skip to content

πŸ› Adopt stuck contributor PRs automatically from the tracker's offer predicate - #15662

Merged
clubanderson merged 1 commit into
v5from
fix/auto-adopt-stuck-contributor
Oct 30, 2026
Merged

clubanderson merged 1 commit into
v5from
fix/auto-adopt-stuck-contributor

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #15661

Root cause

The engine, the tracker's takeover offer and its presence pill each kept their own adoption clock. The sweep counted the offline wait from the author's freshest heartbeat (Presence.LastSeen, bumped on every relay auth / task completion), so each reconnect or acknowledgement restarted the 15m window; a mode=queued nudge marked an offline clanker online (2h grace); the tracker offered Adopt at 072 with no clock at all, so the operator clicked before the sweep's clock expired (hive#15565/#15566/#15609), and fork-not-editable rows (hive#15312 …) read "No stage recorded yet".

Change

  • New automerge.AutoAdoption (+ AdoptionClock, AdoptionVerdict): the one predicate behind the sweep's adoptionDue, the tracker's Adopt offer (stageTrackerTakeover), the adoption pill and the presence adopt_at projection. The clock runs only while the nudged head is unchanged β€” a pushing clanker is never adopted.
  • Offline wait: a heartbeat after the nudge extends the wait by one window at most (cappedSince).
  • MarkNudged: mode=queued no longer counts as online.
  • Adoption INFO log carries trigger=automatic:<reason> / operator-forced / operator-requested.
  • Tracker: adoption.auto_adopt_at / auto_due, takeover.auto_adopt_at; pill text … β€” hive adopts it in 3m unless a new head lands / … β€” hive adopts it on the next sweep; fork-not-editable β†’ "fork not editable by hive". Adopt now stays as the manual override.
  • Docs: "When hive adopts automatically" in labels-and-control-signals.md; changelog fragment.

Tests

go test ./pkg/github/automerge/ green; go test ./pkg/dashboard/ -run 'StageTracker|Adopt|Takeover|Presence|Delegated|Reroute|Tracker' green; go build ./... and go vet clean.

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 30, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign danathar for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#15671 πŸ› review: the hive closes its own already-landed PRs instead of asking a person same files src/pkg/dashboard/stage_tracker_caption.go
#15668 πŸ› Lead 090 merge-gate action is Approve and let hive merge same files src/docs/labels-and-control-signals.md
#15308 ✨ feature: enqueue eligible PRs into GitHub native merge queues same files src/docs/labels-and-control-signals.md

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Why:

  • the branch conflicts with the base and needs a rebase

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.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

stage 080-awaiting-merge-admission β†’ 071-needs-author: conflicting

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed β€” no findings from this perspective.

β€” hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs-currency review (head 8802b3b). The new "When hive adopts automatically" paragraph matches AutoAdoption/cappedSince (automerge_adoption_clock.go:120-161) and the dashboard captions (stage_tracker_adoption.go:200-202, stage_tracker.go β†’ "fork not editable by hive"). Two operator-facing passages this PR's behavior change makes stale were not updated:

  1. src/docs/labels-and-control-signals.md:1852-1855 β€” the reason=contributor-offline marker bullet still describes the old uncapped clock ("after the later of its last heartbeat and the first nudge"), which is exactly what cappedSince (automerge_adoption_clock.go:151-160) replaces. It now contradicts the new paragraph 60 lines below it.

    - `reason=contributor-offline` β€” the author has a contributor profile
      here and no relay heartbeat within `governor.labels.stage.presence_window`:
      adopted `governor.labels.stage.adoption.after_offline` (default 15m)
      after the later of the first nudge and its last heartbeat, where a
      heartbeat after the nudge extends the wait by one window at most
      (see *When hive adopts automatically* below);
    
  2. src/docs/dashboard-sections.md:976 and :1012 enumerate the tracker's adoption{…} and takeover{…} JSON fields and the default-policy pill caption; this PR adds adoption.auto_adopt_at / adoption.auto_due (stage_tracker_adoption.go:58-59) and takeover.auto_adopt_at (stage_tracker_takeover.go:48), and the 072 caption now reads … β€” hive adopts it in 3m unless a new head lands / … β€” hive adopts it on the next sweep (stage_tracker_adoption.go:200-202). Neither list nor the caption example mentions them, and the :1020 sentence "once the nudge grace has elapsed and the engine is not adopting on its own" describes the pre-fix split clock. Suggested edits:

    -carries `adoption{author, due, blocked_by, since, nudges, author_online, author_registered, author_last_seen, author_maintainer, policy, action, text}`
    +carries `adoption{author, due, blocked_by, since, nudges, author_online, author_registered, author_last_seen, author_maintainer, policy, action, text, auto_adopt_at, auto_due}`
    ...
    -`waiting on @zoe (offline 40m, 2 nudges)` while the default `adopt` policy's clock runs
    +`waiting on @zoe (offline 40m, 2 nudges) β€” hive adopts it in 3m unless a new head lands` while the default `adopt` policy's clock runs (`auto_adopt_at` is the same `automerge.AutoAdoption` verdict the sweep acts on; `… β€” hive adopts it on the next sweep` once `auto_due`)
    ...
    -carries `takeover{author, author_online, adopt_now, adopt_now_reason, reroute, reroute_reason, clankers[], rerouted, forced_by, forced_at, fallback_at, grace_elapsed}`
    +carries `takeover{author, author_online, adopt_now, adopt_now_reason, reroute, reroute_reason, clankers[], rerouted, forced_by, forced_at, fallback_at, grace_elapsed, auto_adopt_at}`

β€” hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed (style / maintainability) at 8802b3b β€” no blockers; two advisory notes, both about the PR's own "one clock, cannot drift" premise.

  1. The defaults now live in three places. src/pkg/github/automerge/automerge_adoption_clock.go:43-49 introduces private defaultGraceOnline … defaultAdoptOfflineGrace "mirroring pkg/config", but pkg/config already exports exactly these (src/pkg/config/config.go:3032-3034, :3070-3071) and this package already imports it (automerge_contributor_adopt.go:15). A second copy is the drift surface AdoptionClock was written to remove.

    -// Defaults applied where the clock is zero (mirroring pkg/config).
    -const (
    -	defaultGraceOnline            = 2 * time.Hour
    -	defaultGraceOffline           = 15 * time.Minute
    -	defaultAdoptAfterOffline      = 15 * time.Minute
    -	defaultAdoptAfterUnregistered = 15 * time.Minute
    -	defaultAdoptOfflineGrace      = 30 * time.Minute
    -)
    -
     func (c AdoptionClock) graceOnline() time.Duration {
    -	return durationOr(c.GraceOnline, defaultGraceOnline)
    +	return durationOr(c.GraceOnline, config.DefaultContributorGraceOnline)
     }

    (and likewise config.DefaultContributorGraceOffline, config.DefaultAdoptAfterOffline, config.DefaultAdoptAfterUnregistered, config.DefaultAdoptOfflineGrace.)

  2. adoptionGrace kept its own inlined 2h / 15m. automerge_contributor_adopt.go:72-83 still hard-codes the nudge graces and is still called at :683 for the supersede grace, so the !hasPresence branch of AutoAdoption (automerge_adoption_clock.go, case !hasPresence) and adoptionGrace compute the same value from two different sources.

    // adoptionGrace returns the grace that applies to the record's first nudge.
    func adoptionGrace(rec stagelabels.Record, policy StageLabelPolicy) time.Duration {
    	clock := policy.AdoptionClock()
    	if rec.NudgeOnline {
    		return clock.graceOnline()
    	}
    	return clock.graceOffline()
    }
    

β€” hive: agent=adjudicator-4 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed (intent-alignment) β€” diff matches #15661: sliding heartbeat clock capped (automerge_adoption_clock.go:150-159), mode=queued no longer counts as online (automerge_contributor_nudge.go:302), sweep/offer/pill share AutoAdoption (automerge_contributor_adopt.go:162-168, stage_tracker_takeover.go:168-173, stage_tracker_presence.go:218-227), fork-not-editable humanised (stage_tracker.go:1430-1434). The sweep reaches adoptContributorPR for every 072 clanker PR regardless of lane reason (automerge_stage_labels.go:1284-1306), so the predicate fix is sufficient for the #15312 rows.

One advisory gap in the "one verdict" claim (low, in-scope):

  • stageTrackerAutoAdoption (stage_tracker_presence.go:93-107) does not read the PR's labels, so a 072 row carrying hold / do-not-merge will now say "hive adopts it on the next sweep" (stage_tracker_adoption.go:199-202) while the engine refuses it at automerge_contributor_adopt.go:640 (adoptionBlocked(obs.Labels)). Before this PR the pill made no promise, so this is a new false positive, exactly the UI-vs-sweep drift the issue targets. Suggested fix:
--- a/src/pkg/dashboard/stage_tracker_presence.go
+++ b/src/pkg/dashboard/stage_tracker_presence.go
@@ func stageTrackerAutoAdoption(
 	if !hasRec || !clock.Enabled || it.Kind != "pr" || it.AuthorKind == authorKindHuman {
 		return automerge.AdoptionVerdict{}
 	}
+	// Mirrors the engine's adoptionBlocked(obs.Labels): a parked PR is
+	// never adopted, so the row must not promise it.
+	for _, l := range it.Labels {
+		switch strings.ToLower(strings.TrimSpace(l)) {
+		case "hold", "do-not-merge", "do-not-merge/hold":
+			return automerge.AdoptionVerdict{}
+		}
+	}

β€” hive: agent=adjudicator-3 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correctness (read at head 8802b3b)

One in-scope gap between the predicate the sweep runs and the one the tracker now projects:

hold / do-not-merge rows still read "hive adopts it on the next sweep" β€” src/pkg/dashboard/stage_tracker_presence.go:97-110 (stageTrackerAutoAdoption) calls automerge.AutoAdoption with only the record/presence; it never looks at it.Labels. The sweep, however, stops after adoptionDue fires when a hold label is present (src/pkg/github/automerge/automerge_contributor_adopt.go:641-644, adoptionBlocked(obs.Labels) β†’ "adoption due but blocked by label", return). So a nudged clanker PR carrying hold gets AutoDue=true / auto_adopt_at and the pill text at stage_tracker_adoption.go:199-202 promises an adoption the engine will log as blocked every sweep β€” the same UI/sweep disagreement #15661 is about, and the new docs paragraph (src/docs/labels-and-control-signals.md, "nothing holds it: no hold / do-not-merge") describes the gate as part of the offer predicate. The takeover's AutoAdoptAt/GraceElapsed (stage_tracker_takeover.go:168-173) inherits the same gap.

Suggested fix β€” gate the tracker verdict on the labels the sweep checks (export the label check or mirror it):

--- a/src/pkg/dashboard/stage_tracker_presence.go
+++ b/src/pkg/dashboard/stage_tracker_presence.go
@@ func stageTrackerAutoAdoption(
 	if !hasRec || !clock.Enabled || it.Kind != "pr" || it.AuthorKind == authorKindHuman {
 		return automerge.AdoptionVerdict{}
 	}
+	// Mirror adoptContributorPR: a hold label stops the sweep after the
+	// clock fires, so the row must not promise an adoption.
+	for _, l := range it.Labels {
+		switch strings.ToLower(strings.TrimSpace(l)) {
+		case "hold", "do-not-merge", "do-not-merge/hold":
+			return automerge.AdoptionVerdict{}
+		}
+	}
 	head := it.Head

(plus a case in TestStageTrackerAutoAdoptionExampleCaptions with a hold label asserting no auto_adopt_at). Everything else checked out: the no-presence branch of AutoAdoption (automerge_adoption_clock.go:132-137) matches the removed adoptionGrace (automerge_contributor_adopt.go:73-84); cappedSince and adoptionRetryVerdict match the described one-window cap; the queued β†’ offline change in MarkNudged only feeds NudgeOnline consumers that already expect "offline" (automerge_contributor_adopt.go:725,734, automerge_adoption_orphan.go:205).

β€” hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88

…predicate

The engine, the tracker's takeover offer and its presence pill each kept
their own adoption clock. The sweep counted the offline wait from the
author's freshest heartbeat, so every reconnect or acknowledgement
restarted the 15m window; a mode=queued nudge marked an offline clanker
online (2h grace); the tracker offered Adopt at 072 with no clock at all.
PRs by an offline clanker (conflicting, changes requested, optional check
red, fork not editable) sat at 072 until a person pressed Adopt.

One predicate, automerge.AutoAdoption, now drives the sweep, the offer and
the adopt-at projection: a heartbeat after the nudge extends the wait by
one window at most, queued nudges count as offline, the adoption log names
its trigger, the row says when hive adopts, and fork-not-editable rows
name their blocker. Adopt now remains the manual override.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@hivecommons-hive
hivecommons-hive Bot force-pushed the fix/auto-adopt-stuck-contributor branch from 8802b3b to ae4db06 Compare October 30, 2026 04:25
@hivecommons-hive

Copy link
Copy Markdown
Contributor

hive/awaiting-ci: rebased onto v5 after #15574 split stage_tracker.go β€” re-applied the three hunks (ForkNotEditable caption, adoptionClock threading in buildStageTracker, AutoAdoptAt fields) onto the new files; no other changes. CI pending β€” sweep will merge when green.


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

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson this PR is back in your court (stage/071-needs-author). Its commits are signed off as the hive App rather than as you, so a squash merge would misattribute them and the sign-off attribution check stays red. No hive agent can rewrite a contributor's commits β€” the fix is yours:

  • 1 commit is signed off as the hive App instead of you, so a squash merge would misattribute it β€” set git config user.email to your own address, then run git commit --amend --reset-author -s && git push --force-with-lease

Once the new head lands, CI and the review swarm re-run automatically and the PR returns to the normal path.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed β€” no findings from this perspective.

β€” hive: agent=adjudicator-3 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intent-alignment (delta re-review at ae4db06). The delta is this PR's single commit rebased onto v5 (the other 49 files are #15410/#15639/#15634/#15655/#15574 already on v5). The core of #15661 β€” one predicate behind the sweep, the Adopt offer and the pill β€” is implemented (automerge.AutoAdoption, automerge_adoption_clock.go:139; adoptionDue at automerge_contributor_adopt.go:163 now wraps it). One previous finding is still present:

Still present β€” held PRs: the row promises an adoption the sweep refuses. stageTrackerAutoAdoption (src/pkg/dashboard/stage_tracker_presence.go:92-105) never looks at the row's hold / do-not-merge labels, so for a parked 072 PR stageTrackerAdoption emits AutoDue/AutoAdoptAt (stage_tracker_adoption.go:171-173) and the caption reads … β€” hive adopts it on the next sweep (stage_tracker_adoption.go:217-220); the presence pill projects adopt_at the same way (stage_tracker_presence.go:221-230). The sweep refuses exactly that case after adoptionDue returns true (automerge_contributor_adopt.go:641-644 β†’ adoptionBlocked, :216-224). That is the UI-says-X / sweep-does-Y gap #15661 is about, and the doc this PR adds lists "no hold / do-not-merge" as a condition of the automatic adoption (labels-and-control-signals.md:1926-1927) that the tracker projection does not honour. The hold modifier is already on the item (stage_tracker_build.go:95-99, stageTrackerOnHold at :517):

func stageTrackerAutoAdoption(it StageTrackerItem, rec stagelabels.Record, hasRec bool, presence func(string) (automerge.ContributorPresence, bool), clock stageTrackerAdoptionClock, now time.Time) automerge.AdoptionVerdict {
	// A parked PR (hold / do-not-merge) is never adopted by the sweep
	// (automerge adoptionBlocked), so the row must not say it will be.
	if !hasRec || !clock.Enabled || it.Kind != "pr" || it.AuthorKind == authorKindHuman || stageTrackerOnHold(it) {
		return automerge.AdoptionVerdict{}
	}

With that, StageTrackerTakeover.AutoAdoptAt/GraceElapsed (stage_tracker_takeover.go:176-181) also stop advertising a clock for held rows, matching the "release the hold first" reason already set at :120-121. A one-row case in TestStageTrackerAutoAdoptionExampleCaptions with the hold label would pin it.

β€” hive: agent=adjudicator-4 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style re-review at ae4db06 (delta since 8802b3b; most of the 50-file compare is base-branch churn from the rebase β€” the PR itself touches 14 files).

Both previous style advisories are still present; neither blocks.

  1. src/pkg/github/automerge/automerge_contributor_adopt.go:72-83 β€” adoptionGrace still hard-codes 2 * time.Hour / 15 * time.Minute beside the new AdoptionClock that owns exactly those graces (automerge_adoption_clock.go:52-58), and is still called at :683. Two sources of truth for the same default:
// adoptionGrace returns the grace that applies to the record's first nudge.
func adoptionGrace(rec stagelabels.Record, policy StageLabelPolicy) time.Duration {
	c := policy.AdoptionClock()
	if rec.NudgeOnline {
		return c.graceOnline()
	}
	return c.graceOffline()
}
  1. src/pkg/github/automerge/automerge_adoption_clock.go:43-49 β€” the default* constants are commented "mirroring pkg/config", but automerge already imports pkg/config (automerge_contributor_adopt.go:15) and the dashboard reads the same values as config.DefaultAdoptAfterOffline etc. (stage_tracker_presence.go:145). Reference the exported config.Default* constants instead of re-declaring them so the mirror cannot drift.

Minor, new in the delta: durationOr (automerge_adoption_clock.go:72) and orDefault (stage_tracker_presence.go:232) are the same helper; the dashboard one survives only for the 000-stage caption at :145.

β€” hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Hive filed review findings that do not block this PR as backlog items:

Cap: 10 backlog item(s) per PR per day.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correctness re-review at ae4db06 (delta vs 8802b3b is a rebase onto v5; the PR's own hunks are byte-identical, only relocated by the #15574 split). One finding from the previous round still stands.

Still present β€” tracker promises auto-adoption for hold / do-not-merge PRs the sweep refuses

src/pkg/github/automerge/automerge_contributor_adopt.go:639-642 β€” after adoptionDue fires, the sweep returns early when adoptionBlocked(obs.Labels) matches hold, do-not-merge, do-not-merge/hold (:217-225), logging "adoption due but blocked by label" every cycle. The tracker side of the "one predicate" never sees labels: stageTrackerAutoAdoption (src/pkg/dashboard/stage_tracker_presence.go:94-108) takes only rec/presence/clock, and StageTrackerItem carries no label slice. So for a held clanker PR at 072 the adoption pill reads "β€” hive adopts it in 3m unless a new head lands" and then "β€” hive adopts it on the next sweep" (stage_tracker_adoption.go:171-173, :217-220), presence.adopt_at is set (stage_tracker_presence.go:215-228), and takeover.grace_elapsed/auto_adopt_at flip true (stage_tracker_takeover.go:176-181) β€” none of which will happen. This is exactly the UI-vs-sweep divergence #15661 set out to remove, so it is in scope. finish already has labels in hand (stage_tracker_build.go:94), so the fix is small:

--- a/src/pkg/github/automerge/automerge_contributor_adopt.go
+++ b/src/pkg/github/automerge/automerge_contributor_adopt.go
@@ func adoptionBlocked(labels []string) string {
 	return ""
 }
+
+// AdoptionHeldByLabel is the hold label that stops every adoption at this
+// head (hold / do-not-merge), "" when none β€” the tracker reads it so its
+// adopt-at projection never promises what adoptContributorPR refuses.
+func AdoptionHeldByLabel(labels []string) string { return adoptionBlocked(labels) }
--- a/src/pkg/dashboard/stage_tracker_presence.go
+++ b/src/pkg/dashboard/stage_tracker_presence.go
@@ type stageTrackerAdoptionClock struct {
 	Enabled bool
+	// Held is the row's hold label (automerge.AdoptionHeldByLabel): the
+	// sweep refuses adoption while it is set, so no clock is projected.
+	Held string
 	automerge.AdoptionClock
 }
@@ func stageTrackerAutoAdoption(
-	if !hasRec || !clock.Enabled || it.Kind != "pr" || it.AuthorKind == authorKindHuman {
+	if !hasRec || !clock.Enabled || clock.Held != "" || it.Kind != "pr" || it.AuthorKind == authorKindHuman {
 		return automerge.AdoptionVerdict{}
 	}
--- a/src/pkg/dashboard/stage_tracker_build.go
+++ b/src/pkg/dashboard/stage_tracker_build.go
@@ finish := func(it *StageTrackerItem, labels []string, ...
+		rowClock := adoptionClock
+		rowClock.Held = automerge.AdoptionHeldByLabel(labels)
 		...
-			if it.Adoption = stageTrackerAdoption(*it, rec, hasRec, presence, maintainerPolicy, adoptionClock, now); it.Adoption != nil {
+			if it.Adoption = stageTrackerAdoption(*it, rec, hasRec, presence, maintainerPolicy, rowClock, now); it.Adoption != nil {
 		...
-			it.Presence = stageTrackerPresenceFor(*it, login, stage, rec, hasRec, presence, adoptionClock, now)
+			it.Presence = stageTrackerPresenceFor(*it, login, stage, rec, hasRec, presence, rowClock, now)
 		...
-		if it.Takeover = stageTrackerTakeover(*it, rec, hasRec, presence, rerouteCandidates, adoptionClock, now); it.Takeover != nil {
+		if it.Takeover = stageTrackerTakeover(*it, rec, hasRec, presence, rerouteCandidates, rowClock, now); it.Takeover != nil {

Please add a hold-labelled row to TestStageTrackerAutoAdoptionExampleCaptions asserting no auto_adopt_at / "hive adopts" text.

Low, non-blocking: rec.AdoptionBlocked(head) for maintainer_policy: never is only written by the sweep once due fires (automerge_contributor_adopt.go:657-662), so a maintainer-authored row reads "hive adopts it in 3m" until the due moment, then flips to "not adopted: maintainer_policy is never". Acceptable, but worth a follow-up if the pill is meant to be exact.

β€” hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@clubanderson
clubanderson merged commit f2a1843 into v5 Oct 30, 2026
76 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/auto-adopt-stuck-contributor branch October 30, 2026 04:56
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

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

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adoption of stuck contributor-clanker PRs is not automatic: offline clanker PRs sit at 072 until an operator clicks Adopt

1 participant