Skip to content

🐛 Activity monitor: an adoption pair never asks a human to pick a PR - #15550

Merged
clubanderson merged 1 commit into
v5from
fix/adoption-pair-self-decide
Oct 29, 2026
Merged

clubanderson merged 1 commit into
v5from
fix/adoption-pair-self-decide

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #15549

Why

#15495 / #15500 each listed a contributor PR and the hive's adoption copy of it. The write-back gate (needs-opt-in-label) kept the originals open at 072, so the tracker counted two open PRs, offered "Let hive decide — all 2 PRs", and captioned the row "fell back to Covered by pr — Covered by PR #15537 — …; PR #15508 — … changes requested". Nothing there needed a human — hive had already adopted both.

What

  • Go stageTrackerLinkedPRProgress: skip the superseded original of an adoption pair (open copy listed, or original closed); word the copy as Covered by #N (adopted from @author's #M) — in CI / review. Unrelated multi-PR issues keep the PR #N — caption; PR #M — caption list.
  • SPA stageTrackerLinkedPROpen(lp, issue): an original whose open copy is listed under the issue (and adopted_by_state not closed / closed-twice / copy-failed) is not open; nested-open, parked, sibling and delegate-all counts follow. Two genuinely competing PRs still get the fan-out.
  • SPA stageTrackerEventText: stage table's short word first (no more "Covered by pr"); an issue leaving a mirrored PR stage for its own 040 reads "moved to", not "fell back to".
  • Adoption body adoptionCloses: an annotated Refs #N — partial travels as Refs #N, so the copy keeps its original's issue link (🐛 fix: keep merge queue position visible during sweeps #15499 read "no linked issue").
  • Tests: TestStageTrackerLinkedPRProgressCollapsesAdoptionPair, TestStageTrackerAdoptionPairIsOneOpenPR, TestStageTrackerEventTextUnmirroredCoveredByPR, extended TestAdoptionClosesCarriesRefs. Docs: hive-merge.md adoption section, dashboard-copy-inventory.md. Changelog fragment.

Local: go build ./... && go test ./pkg/dashboard/... ./pkg/github/... green; go generate ./pkg/dashboard/... output committed.

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 29, 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 kellyaa 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 Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 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
#15537 🐛 fix: scope tracker link memo to the excluded PR same files src/pkg/dashboard/stage_tracker.go
#15521 🌱 refactor: split tracker row source same files src/pkg/dashboard/static-src/js/tracker-row.js
#15526 🌱 dashboard: split stage_tracker.go into 4 files same files src/pkg/dashboard/stage_tracker.go
#15499 🐛 fix: keep merge queue position visible during sweeps same files changelog.d/fixed-adoption-pair-no-human-decision.md
src/docs/dashboard-copy-inventory.md
src/docs/hive-merge.md
src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/stage_tracker_adoption_pair_test.go
src/pkg/dashboard/stage_tracker_cues_test.go
src/pkg/dashboard/stage_tracker_merge_failed_column_test.go
src/pkg/dashboard/stage_tracker_rework_test.go
src/pkg/dashboard/static-src/js/tracker-actions.js
src/pkg/dashboard/static-src/js/tracker-motion.js
src/pkg/dashboard/static-src/js/tracker-row.js
src/pkg/dashboard/static/index.html
src/pkg/github/automerge/automerge_contributor_adopt.go
src/pkg/github/automerge/automerge_contributor_adopt_test.go
#15530 🐛 fix(dashboard): issue-row linked PR passes null when the lineage chip is empty same files src/pkg/dashboard/static-src/js/tracker-row.js
src/pkg/dashboard/static/index.html

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

Read the tree at 4be33a6. The adoption-pair collapse looks correct to me; one open question at the end.

Server and SPA agree on what "superseded" means. stageTrackerLinkedPRSupersededByListed (stage_tracker.go:3261-3269) and stageTrackerLinkedPROpen(lp, issue) (tracker-row.js) both exclude the original only when its copy is listed open and adopted_by_state is none of closed / closed-twice / copy-failed — the Go constants at stage_tracker.go:1892-1896 are those exact strings, and lineageAdopted/lineageSuperseded (stage_tracker_lineage.go:26-27) are what the Go lineage branch keys on. A copy that was closed without merging therefore lets the original speak again on both sides.

The lp.State == "closed" early return is not a wider change than the body says. StageTrackerLinkedPR.State is documented and populated only as "closed" for an adopted original closed once its copy existed (#15126; struct doc at stage_tracker.go:~640), so skipping it from the progress caption matches the existing "dimmed line, no chevron" treatment rather than hiding arbitrary closed PRs.

adoptRefsNotePattern fills a real gap. The existing adoptClosesPattern (automerge_contributor_adopt.go:62) anchors #N\s*$, so Refs #15395 — partial never matched and the copy lost its issue link — which is exactly what #15499 shows ("no linked issue").

Open question (not a defect): the new pattern only carries a Refs #N whose annotation starts with a dash ([—–-]). The policy's other documented form, Refs #N (needs-human: <reason>), still won't travel. If that form is in use, it may want the same treatment.

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@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

@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 29, 2026
An issue whose only PRs are a contributor's original and the hive's adoption
copy read "Let hive decide — all 2 PRs" and "fell back to Covered by pr —
Covered by PR #N — …; PR #M — … changes requested". The write-back gate had
kept the original open at 072, the SPA counted it as a competing open PR
(the server never sends a superseded flag), the server caption listed both
PRs, and the feed read the issue's un-mirroring (50 → 40) as a fall.

- stageTrackerLinkedPRProgress skips the superseded original and words the
  copy as "Covered by #N (adopted from @author's #M) — <stage phrase>".
- stageTrackerLinkedPROpen(lp, issue) treats an original whose open copy is
  listed under the issue as superseded; nested open / parked / sibling
  counts and the delegate-all fan-out follow.
- stageTrackerEventText prefers the stage table's short word and reads an
  issue leaving a mirrored PR stage for its own 040 as "moved to".
- adoptionCloses carries an annotated `Refs #N — partial` as `Refs #N` so
  the copy keeps its original's issue link (#15499 read "no linked issue").

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@hivecommons-hive
hivecommons-hive Bot force-pushed the fix/adoption-pair-self-decide branch from 4be33a6 to 0a02ddf Compare October 29, 2026 23:25
@hivecommons-hive

Copy link
Copy Markdown
Contributor

hive/awaiting-ci: rebased onto v5 (resolved a docs table conflict in dashboard-copy-inventory.md by keeping both rows; authorship and sign-off intact). CI pending — sweep will merge when green.


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

— 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

Copy link
Copy Markdown
Contributor

stage 080-awaiting-merge-admission → 071-needs-author: hive-signoff-attribution

@clubanderson
clubanderson merged commit 132d8ca into v5 Oct 29, 2026
77 of 78 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/adoption-pair-self-decide branch October 29, 2026 23:35
@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

hivecommons-hive Bot pushed a commit that referenced this pull request Oct 29, 2026
Mechanical split of the 3298-line merge hotspot into four files in the
same package: stage_tracker.go (types, stage table, authoring/tier helpers),
stage_tracker_caption.go (modifiers, reason/caption text), stage_tracker_build.go
(buildStageTracker, ordering, cache, handler) and stage_tracker_links.go
(linked issue/PR resolution). No behaviour change; declarations moved
verbatim and imports re-derived with goimports.

Rebased onto v5: the ledger-claim inputs (#15425) and the adoption-pair
linked-PR progress helpers (#15550) that landed on stage_tracker.go since
the branch point now live in stage_tracker_build.go and
stage_tracker_links.go respectively. A routine refactor takes the
no-changelog label rather than a fragment (changelog.d/README.md).

Hive-Run: #15511
Hive-Plan: modularize-stage-tracker

Signed-off-by: SACHIN NAIK <sachin.naik@ibm.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
hivecommons-hive Bot added a commit that referenced this pull request Oct 30, 2026
* ♻️ dashboard: split stage_tracker.go into 4 files

Mechanical split of the 3298-line merge hotspot into four files in the
same package: stage_tracker.go (types, stage table, authoring/tier helpers),
stage_tracker_caption.go (modifiers, reason/caption text), stage_tracker_build.go
(buildStageTracker, ordering, cache, handler) and stage_tracker_links.go
(linked issue/PR resolution). No behaviour change; declarations moved
verbatim and imports re-derived with goimports.

Rebased onto v5: the ledger-claim inputs (#15425) and the adoption-pair
linked-PR progress helpers (#15550) that landed on stage_tracker.go since
the branch point now live in stage_tracker_build.go and
stage_tracker_links.go respectively. A routine refactor takes the
no-changelog label rather than a fragment (changelog.d/README.md).

Hive-Run: #15511
Hive-Plan: modularize-stage-tracker

Signed-off-by: SACHIN NAIK <sachin.naik@ibm.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>

* changelog: fragment for #15574

Generated by changelog-fragment-guard from the PR title (#5675).
Edit the wording freely, or replace this file with the no-changelog
label if the change is not user-visible.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com>

* docs: point ADR-0025 stageStoreOrShared citation at stage_tracker_caption.go

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>

---------

Signed-off-by: SACHIN NAIK <sachin.naik@ibm.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Signed-off-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: SACHIN NAIK <sachin.naik@ibm.com>
Co-authored-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

Activity monitor: adoption pair {original, hive copy} offered "Let hive decide — all 2 PRs" and a concatenated caption

1 participant