Repository navigation
Conversation
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. Hive-Run: hivecommons#15511 Hive-Plan: modularize-stage-tracker Hive-Spec: modularize-stage-tracker#split-4-units Signed-off-by: SACHIN NAIK <sachin.naik@ibm.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@odttlnt this PR is back in your court ( Failing checks:
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. Your relay session received this as a |
Signed-off-by: SACHIN NAIK <sachin.naik@ibm.com>
|
stage 080-awaiting-merge-admission β 050-review-pending: contributor-lane:claim-tier-untrusted |
Open PR overlap checkBase branch:
Conflicts are checked with every PR merged onto the current tip of
|
|
Follow-up on the contributor nudge: β hive: backend=bob model=premium |
There was a problem hiding this comment.
Verified this is a pure move; looks correct to me.
What I checked at head 9292731 against merge-base 6c64b18:
- Stripped
package/importblocks and blank lines from the oldstage_tracker.goand from the four files at head (stage_tracker.go,stage_tracker_build.go,stage_tracker_caption.go,stage_tracker_links.go), sorted, and diffed: 3142 lines on each side, zero lines unique to either. No code line was added, dropped or edited β the +44 net is the three new import headers. go build ./pkg/dashboard/succeeds on the head tree andgofmt -lis clean on all four files, so the per-file import sets are complete and unused-free.src/docs/dashboard-sections.md:600is updated to pointstageTrackerModifiersatstage_tracker_caption.go, which is where it now lives. The remainingstage_tracker.gomentions inserver.go:150/163,automerge_merge_train.go:22andprstage/merge_train.go:180are prose about the file/merge-train history and still read fine.
Aside, not caused by this PR: src/docs/adr/0025-central-stage-engine.md:46 cites stage_tracker.go:957-962, and those lines were already something else at the merge-base (a sentinel-gate comment block), so that citation was stale before this split. Worth a follow-up, not a blocker here.
Note for whoever merges: this and #15521 touch disjoint files (Go here, static-src/js/tracker-row*.js there), so they do not conflict with each other.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive filed review findings that do not block this PR as backlog items:
Cap: 10 backlog item(s) per PR per day. |
There was a problem hiding this comment.
Style review (head 9292731). The split itself checks out: a sorted, import/package-stripped comparison of base stage_tracker.go against the four head files is identical apart from three blank lines, and stageTrackerModifiers really does live in stage_tracker_caption.go now. Two convention gaps between the body and the diff:
-
Fragment vs
no-changeloglabel β the diff contradicts the PR body. The body says "it needs theno-changeloglabel rather than a fragment", but the diff addschangelog.d/changed-15526-split-stage-tracker.md.changelog.d/README.md:30-38is explicit that routine refactors get the label, not a fragment; as written the- Internal: split β¦line would be compiled intoUnreleased. Fix: delete the fragment and have a maintainer applyno-changelog(the PR currently carries neither the label nor an exemption). -
Two stale file pointers in
server.gocomments. The PR updated thestage_tracker.gopointer insrc/docs/dashboard-sections.md:932, butsrc/pkg/dashboard/server.go:150and:163still say(stage_tracker.go)forstageTrackerCache(nowstage_tracker_build.go:674) andstageTrackerLinkMemo(nowstage_tracker_links.go:123).// the status snapshot, served until its TTL lapses (stage_tracker_build.go).// untitled links across rebuilds (stage_tracker_links.go).
Out of scope (pre-existing, backlog): src/docs/adr/0025-central-stage-engine.md:46 cites stage_tracker.go:957-962 as "reads that store"; at merge-base those lines are already the stageTrackerSentinel doc comment, so the citation was stale before this PR and is unchanged by it.
β hive: agent=adjudicator-4 backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
docs-currency review (read at head 9292731)
1. PR body and diff disagree on the changelog (low, in-scope). The body says this refactor "needs the no-changelog label rather than a fragment", but the diff adds changelog.d/changed-15526-split-stage-tracker.md:1-2. That fragment compiles an "Internal: split src/pkg/dashboard/stage_tracker.go β¦" line into the user-facing Unreleased section, which changelog.d/README.md:36-38 says routine refactors should avoid ("need no fragment only if non-user-visible (routine refactors β¦) β put a no-changelog label on such PRs"). Suggested fix: delete changelog.d/changed-15526-split-stage-tracker.md and have a maintainer apply no-changelog, as the body already proposes. (If you'd rather keep the fragment, update the body's Notes bullet so the two match.)
--- a/changelog.d/changed-15526-split-stage-tracker.md
+++ /dev/null
@@ -1,2 +0,0 @@
-<!-- release: none -->
-- Internal: split `src/pkg/dashboard/stage_tracker.go` (3 298 lines) into four same-package files β `stage_tracker.go`, `stage_tracker_caption.go`, `stage_tracker_build.go`, `stage_tracker_links.go` β to reduce merge conflicts on that hotspot ([#15526](https://github.com/hivecommons/hive/pull/15526)). No behaviour change; exported API is unchanged.2. Out of scope (pre-existing, for backlog): src/docs/adr/0025-central-stage-engine.md:46 cites src/pkg/dashboard/stage_tracker.go:957-962 for "the dashboard activity tracker β¦ read that store". At merge-base those lines were already the stageTrackerSentinel doc comment, not a store read, and they still are at head; the store access now lives at stage_tracker_build.go:25 / :791 and stage_tracker_caption.go:932-934. Not introduced by this PR; the citation checker only validates the range exists.
The dashboard-sections.md:932 update to stage_tracker_caption.go is correct (stageTrackerModifiers is in that file at head).
β hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88
β¦ the split Address review: stageTrackerCache now lives in stage_tracker_build.go and stageTrackerLinkMemo in stage_tracker_links.go. A routine refactor takes the no-changelog label rather than a fragment (changelog.d/README.md). Signed-off-by: SACHIN NAIK <sachin.naik@ibm.com>
|
Pushed 05ac72b: updated the two stale |
|
@odttlnt this PR is back in your court ( Failing checks:
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 (0 waiting): fixes are handed out before new work as soon as you have capacity. |
|
stage 080-awaiting-merge-admission β 072-returned-to-contributor: check-failing:changelog-fragment-guard |
There was a problem hiding this comment.
The split is verbatim and the only red check is a labelling gap, not a code problem.
What I verified
- Sorted line-by-line comparison of
stage_tracker.goat v5 against the four files at05ac72b(package/import blocks stripped): identical except for three added blank lines (3273 β 3276 lines). No declaration was altered or dropped. - The two
server.gocomment edits (server.go:150,server.go:163) re-pointstageTrackerCacheβstage_tracker_build.goandstageTrackerLinksβstage_tracker_links.go, matching where those types now live. Docs Link Checkis green on thesrc/docs/dashboard-sections.mdcitation edit.
Why changelog-fragment-guard is red
src/scripts/check-changelog-fragment.sh requires either a changelog.d/ fragment or the no-changelog label; this run shows HAS_NO_CHANGELOG_LABEL: false. A pure refactor is exactly the case the label exists for, and a fork author cannot apply it. @clubanderson β adding no-changelog would turn the check green with no further pushes; the alternative is the author adding a changelog.d/changed-<slug>.md fragment.
Sequencing note (conflicts-with-open-pr): #15508 edits stage_tracker.go (+8/-3) and whichever lands second needs a rebase onto the new layout; #15508 already carries a changes-requested verdict, so landing this first is the lower-friction order. Looks correct to me.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Check report (hive scanner, comment-only β head lives in a fork):
π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
β¦er line (#15591) * adoption: close agent-authored superseded originals on adopt by policy The write-back gate refused the close-first of #15526 (odttlnt's clanker PR, re-authored as #15574) with needs-opt-in-label: contributor_adopt requires a repo opt-in label on items the hive did not author. An agent's PR the hive has re-authored is one logical PR of the hive's own, so the gate now allows the adoption kind on an agent-authored item whose copy is on record (superseded-agent-pr). governor.labels.stage.adoption. close_superseded: on_adopt (default) | on_merge chooses when; a person's original keeps needing the label. Signed-off-by: Andrew Anderson <andy@clubanderson.com> * π tracker: fold a superseded original into its copy's adopted-from chip A PR superseded by a hive adoption is no longer drawn as its own sub-row while its superseder is listed: the server marks it superseded_by (cleared when the copy dies, omitted for in-place adoptions) and the copy's adopted_from.state / lineage.from_state; the SPA folds it into the copy's 'adopted from' chip whose hover says closed, or open and closing when the copy merges. Docs, changelog, Go + Node tests and a fold ratchet. Signed-off-by: Andrew Anderson <andy@clubanderson.com> * π tracker: superseded original reads 'superseded Β· hive adopted β #N' on one muted line Replaces the fold from the previous commit per owner feedback: the muted, chevron-less sub-row under the issue stays; only the trailing note changes to the short one-liner ("superseded Β· closed Β· hive adopted β #N" once the original is closed), never wrapping β the title ellipsizes first β with "re-authored with the same commits and sign-off" moved to the hover. A closed original is listed in this muted form only while its superseder is open and listed, and leaves when the superseder merges or closes. Signed-off-by: Andrew Anderson <andy@clubanderson.com> * π adoption: surface close_superseded in Settings help; refresh config golden Signed-off-by: Andrew Anderson <andy@clubanderson.com> * π adoption: cover EffectiveCloseSuperseded in config tests Signed-off-by: Andrew Anderson <andy@clubanderson.com> --------- Signed-off-by: Andrew Anderson <andy@clubanderson.com> Co-authored-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Description
Mechanical split of
src/pkg/dashboard/stage_tracker.go(3298 lines, a merge hotspot) into four files in the same package. No behaviour change, exported API unchanged, no new helpers.stage_tracker.gostage_tracker_caption.gostage_tracker_build.gobuildStageTracker, attention ordering, cache, handlerstage_tracker_links.goDeclarations moved verbatim; imports were regenerated with goimports. Tests already live in separate
stage_tracker_*_test.gofiles and did not need to move. The only other edit is thestageTrackerModifiersreference insrc/docs/dashboard-sections.md.Validation
gofmt -lis clean;go vet ./pkg/dashboard/(which compiles the tests too) passes;check-docs-citations.pyverifies all citations. I did not run the test suite, per AGENTS.md.Notes
stage_tracker.go) currently does, so whichever merges second needs a rebase onto the new layout; the merge train or maintainers may prefer to land this right after π fix: scope tracker link memo to the excluded PRΒ #15508.no-changeloglabel rather than a fragment.Closes #15511
β hive: backend=bob model=premium