Repository navigation
π± refactor: split stage_tracker_decision.go and stage_tracker_merge_train.go - #15705
Conversation
β¦rain.go into 4 files each Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.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 |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
|
hive/awaiting-ci: CI pending β sweep will merge when green. π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
There was a problem hiding this comment.
Verified this is a pure move. Looks correct to me.
- Diffed
v5...headfor all eightsrc/pkg/dashboard/stage_tracker_{decision,merge_train}*.gofiles and counted every added/removed line: each removed line reappears exactly once in a sibling file. The only lines with an odd count are import entries (slices,strconv,strings,time,pkg/review,pkg/stageengine/prstage), i.e. the per-file import blocks the body describes. No top-level declaration is dropped or duplicated; the threemergeTrainMemorymethods move 1:1. go build ./pkg/dashboard/on headbbeb43bdsucceeds.- Changelog fragment
changelog.d/changed-15676-stage-tracker-split.mdis present with the requiredchanged-prefix.
Nothing else to say; the split matches what the body claims.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Checked this is a pure move rather than trusting the description. At bbeb43b, after dropping package, import blocks and blank lines, the sorted line multiset of stage_tracker_decision.go + stage_tracker_merge_train.go at the merge base is byte-identical to the multiset of the retained originals plus the six new stage_tracker_decision_{lanes,human_merge,pr}.go / stage_tracker_merge_train_{overlap,postpass,eta}.go files β 1861 non-blank lines on each side, diff exit 0. The only textual change is import redistribution, and all files stay in package dashboard, so no visibility or call-site changes are possible. go build ./pkg/dashboard/ succeeds at the head. Looks correct to me.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
stage 100-merge-queue β 050-review-pending: check-pending |
There was a problem hiding this comment.
Verified as a pure move; looks correct to me.
At head 169e534 I concatenated each split group, stripped package/import/comment/blank lines, and sorted:
stage_tracker_decision.go+_human_merge.go+_lanes.go+_pr.goβ‘v5stage_tracker_decision.go(only difference: the named importstageengineprstagenow appears in three files instead of one, which is expected).stage_tracker_merge_train.go+_eta.go+_overlap.go+_postpass.goβ‘v5stage_tracker_merge_train.go(zero diff).
go build ./pkg/dashboard/ passes at the PR head and the test (dashboard N/4) CI shards are green. No behaviour change. I have not approved anything.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Pure move, verified mechanically at this head:
- Top-level declarations of
stage_tracker_decision.go(44) andstage_tracker_merge_train.go(39) onv5are exactly the set now spread across the eight non-test files βdiffof sortedfunc|type|var|constlines is empty. - A whitespace-normalised multiset diff of removed vs added lines (ignoring
package/importscaffolding) leaves one residue: the aliased importstageengineprstage "β¦/pkg/stageengine/prstage"repeated into two new files. No body line changed. go build ./pkg/dashboard/succeeds on this head (go testis blocked for agents here, so CI remains the test verdict).- No file overlap with the other open stage-tracker splits (#15521 tracker-row JS, #15566/#15633 UI tests), so this cannot conflict with them.
Looks correct to me.
β verdict recorded via hive-review
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
stage 100-merge-queue β 050-review-pending: required-check-pending:Sign-off survives the squash |
|
stage 100-merge-queue β 050-review-pending: check-pending |
There was a problem hiding this comment.
Conclusion: verbatim split, nothing lost or altered.
Verified (head 752352ad vs v5 tip): I concatenated v5:src/pkg/dashboard/stage_tracker_decision.go + stage_tracker_merge_train.go, stripped package/import lines and blanks, sorted, and diffed against the same treatment of the eight files on this head (the two originals plus _human_merge, _lanes, _pr, _eta, _overlap, _postpass): 1839 lines each, zero differences. Only per-file import blocks differ. golangci-lint, coverage and the dashboard test shards are green on this head. No src/docs/*.md cites either original file by name, so no doc citation goes stale.
Looks correct to me.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
There was a problem hiding this comment.
Conclusion: verified as a pure move for both files; looks correct to me.
What I checked (head 752352a vs base edf66e0):
stage_tracker_decision.goβ sorted-line diff of the base file against the concatenation of headstage_tracker_decision.go+_human_merge.go+_lanes.go+_pr.go(package/import lines stripped) is empty apart from the aliasedstageengineprstage "β¦/pkg/stageengine/prstage"import, which now appears in two of the new files instead of one β expected, since both moved declarations use it.stage_tracker_merge_train.goβ same check against headstage_tracker_merge_train.go+_eta.go+_overlap.go+_postpass.go: empty diff.go build ./pkg/dashboard/at head succeeds; all dashboard test shards are green on this head.changelog.d/changed-15676-stage-tracker-split.mdpresent.
No findings.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
Why
src/pkg/dashboard/stage_tracker_decision.go(~1036 lines) andstage_tracker_merge_train.go(~947 lines) are merge hotspots (7 distinct PRs each in 7 days). This is the mechanical split the issues ask for.What
Whole top-level declarations (with doc comments) moved verbatim into sibling files in
package dashboard. No behaviour change, no renames, no signature changes; only the per-file import blocks differ.stage_tracker_decision.gostageTrackerDecisionNeeded*,stageTrackerWithoutHoldstage_tracker_decision_lanes.godecisionForParked/Unauthorized/WaitingOn*/Adoption, option/reason helpersstage_tracker_decision_human_merge.godecisionForHumanMerge, merge-now/queue/reauthor options, DCO helpers, sentence helpersstage_tracker_decision_pr.godecisionForPR, hold helpers, issue/triage/needs-human decisionsstage_tracker_merge_train.goStageTrackerMergeTrain, queue options, apply/hold,StageTrackerLeftTrainstage_tracker_merge_train_overlap.goStageTrackerOverlap, overlap hint, leave-train helpersstage_tracker_merge_train_postpass.goNextSweepIn, soakstage_tracker_merge_train_eta.gomergeTrainMemory, stall warnings, captions,decisionForMergeTrainTests are already split by topic into dedicated
*_test.gofiles, so they stay in place. Changelog fragment added per #15690's convention. Not built/tested locally; CI is the verdict.Closes #15676
Closes #15678
β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88