Skip to content

πŸ› fix(adoption): an adopted red PR is routed to the fixer once per red episode, and not at all once parked at 085 - #17081

Merged
hivecommons-hive[bot] merged 3 commits into
hivecommons:v6from
Danathar:fix/fix-ci-route-dedupe
Nov 7, 2026
Merged

hivecommons-hive[bot] merged 3 commits into
hivecommons:v6from
Danathar:fix/fix-ci-route-dedupe

Conversation

@Danathar

@Danathar Danathar commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Summary

An adopted contributor PR that stays red at the same head was "routed to fixer" on every eligibility pass, and it stayed in the scanner's FIX-BEFORE-NEW list even after the hive had parked it at stage/085 saying it had nothing to push. Two projectbluefin printer-app PRs were routed 61 times each in eight hours. One scanner kick spent two background sub-agents re-triaging them, and came to the same "upstream bug, nothing to push" answer it had already posted. With this change, each red episode (the head plus its failing checks) is routed once. A PR the hive has parked at 085 on its current head leaves the fixer list until the head moves or the park is released.

What went wrong

What changes

Files

  • src/cmd/hive/adopted_fix_ci_routes.go: the per-PR episode ledger (in memory, pruned to open PRs) and the 085 park check.
  • src/cmd/hive/merge_eligibility.go: the fix-ci branch uses both.
  • src/docs/labels-and-control-signals/stage-labels.md: one sentence on the new behavior.
  • src/changelog.d/fixed-adopted-fix-ci-route-once.md

Tests

  • TestWriteMergeEligible_AdoptedFixCIRoutedOncePerHeadAndCheckSet: same head and same checks (reordered) on the second sweep: listed, routed 0 times. A new failing check routes once. A new head routes once, then goes quiet.
  • TestWriteMergeEligible_AdoptedPRParkedAt085IsNotFixCIWork: parked at this head: not listed and not routed on two sweeps, with one park line. Released: routed once. A new head after a park on the old head: routed once.
  • Both fail on v6 tip (2161745f3): the second sweep re-routes, and the parked PR is listed and routed. Both pass with the fix. go test ./cmd/hive/ passes in full. go vet, and the docs link and citation checks, are clean.

Follow-up, not in this PR: the fixer has no machine-readable way to say "red because of an open issue in another repo". hive-ci-external covers only a fork parent that is red too. The scanner's "tracked in fsdk-containers#509" note was prose, so until the 085 park the PR stays on the fixer's list.

πŸ€– Generated with Claude Code

https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1

An adopted contributor PR red at an unchanged head was logged "adopted PR
routed to fixer" on every eligibility pass (61 times each for
projectbluefin/hplip-printer-app#199 and ghostscript-printer-app#190 in
eight hours) and stayed in the scanner's FIX-BEFORE-NEW list even after
the hive parked it at stage/085 with nothing to push, so the scanner
re-triaged an upstream fsdk-containers bug it had already diagnosed.

- Route and announce fix-ci once per (head, failing-check set); the row
  stays listed and queued for the 074 dwell between announcements.
- An adopted PR whose current head is parked at 085
  (AdoptionEscalated) leaves ci-failing.json until the head moves or the
  escalation is released, with one log line naming the reason.
- The sentinel alert alone still does not block repair (hivecommons#13280).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 7, 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 7, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@Danathar this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Failing checks:

  • check-failure

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Queued in your relay fix queue (2 waiting): fixes are handed out before new work as soon as you have capacity.

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v6

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

PR Title Relation Files
#17080 πŸ› fix(automerge): a contributor-lane PR on a hive with the review swarm off parks for a person instead of waiting at review-pending forever same files src/cmd/hive/merge_eligibility.go
src/docs/labels-and-control-signals/stage-labels.md

Danathar and others added 2 commits November 7, 2026 14:49
changelog-fragment-guard failed because the fragment sat under
src/changelog.d/, which is never compiled into CHANGELOG.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <Danathar@users.noreply.github.com>

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

Conclusion: looks correct to me; the diff does what the body says and I found no defect.

What I read on origin/v6:

  • adoptedFixCIParked relies on stagelabels.Record.AdoptionEscalated(head) (src/pkg/stagelabels/store.go:1635), which is head-pinned, so a new push on a parked PR correctly falls through to the fixer path β€” the test at adopted_fix_ci_routes_test.go:112-121 covers exactly that.
  • The release paths the park depends on exist and don't need the fixer to have run: ClearAdoptionEscalation is called from the #14500 recovery (automerge_contributor_adopt.go:2405), from stall-reason clearing (:2435), and from automerge_adoption_intent.go:186. Removing the row from ci-failing.json therefore cannot strand a parked PR.
  • retain(openPRs) is built from candidates, which is actionable.PRs.Items + Held (merge_eligibility.go:1316-1321) β€” the full open set β€” so a PR temporarily held does not lose its episode and get re-announced. The len(openPRs) > 0 guard against an empty read is a sensible defensive choice.
  • fixCIEpisode sorts and compacts check names, so check-order churn in the GitHub payload is not a new episode (covered at adopted_fix_ci_routes_test.go:71-77).

One observation, not a defect: a CIStatus: failure row with an empty FailingChecks (checks not yet loaded) forms the episode fix-ci\0<head>\0, and once check names arrive it is announced a second time. That seems like the right behaviour β€” the second line carries information the first did not β€” just noting it so nobody is surprised by two lines at one head.

Scope note for the author: as the body says, until the 085 park lands the row still appears in ci-failing.json on every sweep; only the log line is deduplicated. So the "re-triaged by a scanner kick" cost in the Summary is addressed by the park check, not the episode ledger.

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

@hivecommons-hive

hivecommons-hive Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Hive status β€” updated in place; edits do not notify. Full history is in the Activity Monitor.

Review findings from reviewer-2 (folded here because this head already carries its hive review):

Read the diff against v6 and the callers at 19687bf; the change does what it says and I found no defect.

  • adoptedFixCIRouteLedger.first (src/cmd/hive/adopted_fix_ci_routes.go:31-43) keys an episode on head + the sorted, de-duplicated failing-check set, so a same-head/same-checks sweep is silent while a new head or check set re-announces. retain is only applied when the pass saw at least one PR (merge_eligibility.go:1563-1566), so a failed read does not wipe the ledger.
  • The 085 skip at merge_eligibility.go:1512-1521 keys on Record.AdoptionEscalated(head) (pkg/stagelabels/store.go:1635-1637), which holds until ClearAdoptionEscalation (automerge_adoption_intent.go:186, automerge_contributor_adopt.go:2405,2435) or a head move. After release the fix-ci episode differs from the stored parked\0… key, so the route is announced once more β€” matching the doc text in stage-labels.md:1062-1067.
  • The row still reaches markAdoptedFixerQueued on every non-parked sweep (merge_eligibility.go:1538), so the 074 dwell bookkeeping is unchanged.

One wording note (info): the changelog fragment and stage-labels.md:1065 describe the skip as adoption-stalled:<reason>, but AdoptionEscalated(head) is true for every 085 escalation reason written via MarkAdoptionEscalated β€” fixer-reverts, workflow-refused, copy-failed, child-closed-twice too (automerge_adoption_intent.go:134, automerge_contributor_adopt.go:908,1575,2465, automerge_adoption_orphan.go:188,285). That broader behaviour seems right (none of those heads are fixer work either); the operator text just understates it.

Evidence bundle `#1708119687bf` sha256:6ecc6dbece5480965167f11c2dc3aeb912d0cc580d7484f048c9cc8d13c85880 β€” download from the dashboard or `hivectl review evidence #17081`.

@hivecommons-hive
hivecommons-hive Bot merged commit 160d4db into hivecommons:v6 Nov 7, 2026
67 of 68 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @Danathar holds role owner and GitHub permission maintain on repo; CI green at 19687bf.

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/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant