Repository navigation
🌱 refactor: split src/pkg/review/prompts.go into 4 files - #15707
Conversation
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
|
|
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 |
|
stage 080-awaiting-merge-admission → 070-fixing: optional-check-failing:build (linux/amd64, true, false, 60) |
golangci-lint typecheck failed on the split head because prompts.go kept the pkg/config import while every config reference moved to prompts_instructions.go. Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
hive/awaiting-ci: pushed 61d3b83 dropping the unused 🐝 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 relocation: the sorted, non-blank line multiset of src/pkg/review/prompts.go at the merge-base equals the union of prompts.go + prompts_combined.go + prompts_instructions.go + prompts_publish.go on 61d3b83, ignoring only package/import boilerplate (883 lines each side, zero differences). All four files stay in package review, so nothing changes for callers or for go test discovery, and the only non-Go change is the changelog fragment. CI (build-and-test, all test (…) shards) is green on this head, which confirms the per-file import lists.
Looks correct to me.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
stage 080-awaiting-merge-admission → 070-fixing: conflicting |
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> # Conflicts: # src/pkg/review/prompts.go
|
hive/awaiting-ci: merged origin/v5 (carried #15617's fan-out grounding-budget hunks into prompts_combined.go); 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 move-only; looks correct to me, with one doc path to update.
Correctness — git diff origin/v5...aa349cd --color-moved=zebra --color-moved-ws=ignore-all-space over src/pkg/review/ shows the only non-moved lines are the three new package review / import (...) headers. No function body, constant or comment changed; the remaining prompts.go still holds groundingSection (:182) and the kick builders. go build ./pkg/review/ succeeds and CI is green. Nothing references the file by path at runtime (no size guard or embed).
Docs currency (low) — src/docs/review-bot-threads.md:235 cites buildReviewBotFindingsInstruction as living in pkg/review/prompts.go; it now lives in src/pkg/review/prompts_instructions.go:106. Worth fixing in this PR since the split is the reason it went stale. (src/docs/security.md:96 cites groundingSection at prompts.go:74; that line was already a struct field on v5, so it is pre-existing drift, not this PR's — the function is still in prompts.go.)
Matches the mechanical split #15701 asked for; changelog fragment name/category valid.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
Hive-Fix-Attempt: 1/6 Signed-off-by: architect <280983584+hivecommons-hive[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Verified this is a pure move. Concatenating the four files at 4a9525d and diffing their non-comment, non-import lines against prompts.go at merge-base db43b1a gives an empty diff; each new file's import block is the minimal set it needs (prompts_instructions.go is the only one that still needs strconv and pkg/config). go build ./pkg/review/ passes at the PR head. The one doc citation to the old location (src/docs/review-bot-threads.md) is updated. Looks correct to me.
One note for whoever merges: the body says "No open PR touches the file", which was true when written but is no longer — #15757 adds hiveSupersedingGuidance to prompts.go (+7) and prompts_decision.go, hence the conflicts-with-open-pr label. Either order works; if this lands first, #15757's hunk goes into whichever of the new files holds publishInstruction/the single-prompt guidance (prompts_publish.go).
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Verified this is a pure move, not a rewrite: after stripping package/import lines, the multiset of non-blank lines in v5:src/pkg/review/prompts.go (949 lines) is identical to the union of prompts.go (341), prompts_combined.go (220), prompts_instructions.go (225) and prompts_publish.go (181) at 23e6ec0 — zero lines added, removed or edited. go build ./pkg/review/ at the PR head succeeds and gofmt -l is clean.
Docs: review-bot-threads.md now points buildReviewBotFindingsInstruction at prompts_instructions.go:106, which is where it landed. groundingSection stays in prompts.go, so the references in docs/review-swarm.md:55 and docs/security.md:96 remain correct.
Looks correct to me; nothing to change.
— 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 |
…anish - sweep clock marks only the PR under evaluation, so merge_gate.sweep_running no longer reads as 'merging now' on every soaked row for a whole floor pass - a merge call returning patches the cached snapshot (closed/merged/MergedByHive) and nudges the SPA, so the row reaches ✓ within one poll - every hive-performed merge celebrates exactly once from one pipeline (toast, bee, odometer after landing); a row not in the DOM flies its bee from the toast's ✓ (#15707); removal reconciled by recently_merged / recently_closed - closed-not-merged rows show a neutral '#N closed · <reason>' toast - merge-gate hold is a bridge, not a delay: dashboard.stage_tracker.merged_hold_s (default 8, min 3); 'merging · waiting for GitHub…' past 60s Closes #15808 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
…anish - sweep clock marks only the PR under evaluation, so merge_gate.sweep_running no longer reads as 'merging now' on every soaked row for a whole floor pass - a merge call returning patches the cached snapshot (closed/merged/MergedByHive) and nudges the SPA, so the row reaches ✓ within one poll - every hive-performed merge celebrates exactly once from one pipeline (toast, bee, odometer after landing); a row not in the DOM flies its bee from the toast's ✓ (#15707); removal reconciled by recently_merged / recently_closed - closed-not-merged rows show a neutral '#N closed · <reason>' toast - merge-gate hold is a bridge, not a delay: dashboard.stage_tracker.merged_hold_s (default 8, min 3); 'merging · waiting for GitHub…' past 60s Closes #15808 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
… vanish (#15817) * 🐛 activity monitor: merging-now lingers, silent merges, closed rows vanish - sweep clock marks only the PR under evaluation, so merge_gate.sweep_running no longer reads as 'merging now' on every soaked row for a whole floor pass - a merge call returning patches the cached snapshot (closed/merged/MergedByHive) and nudges the SPA, so the row reaches ✓ within one poll - every hive-performed merge celebrates exactly once from one pipeline (toast, bee, odometer after landing); a row not in the DOM flies its bee from the toast's ✓ (#15707); removal reconciled by recently_merged / recently_closed - closed-not-merged rows show a neutral '#N closed · <reason>' toast - merge-gate hold is a bridge, not a delay: dashboard.stage_tracker.merged_hold_s (default 8, min 3); 'merging · waiting for GitHub…' past 60s Closes #15808 Signed-off-by: Andrew Anderson <andy@clubanderson.com> * 📖 docs: resync api-reference citations after server.go shift Signed-off-by: Andrew Anderson <andy@clubanderson.com> * 🌱 config: cover StageTrackerMergedHold (coverage floor) Signed-off-by: Andrew Anderson <andy@clubanderson.com> --------- Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Why
src/pkg/review/prompts.go(938 lines) is a merge hotspot: 6 distinct PRs touched it in 7 days. This is the mechanical split the issue asks for.What
Whole top-level declarations (with doc comments) moved verbatim into sibling files in
package review; no behaviour change, no renames, exported API unchanged. Only import blocks differ per file. No open PR touches the file.prompts.goPullRequest,PullRequestBodyDigest, grounding consts/sections,BuildPerspectivePrompt/Opts/With,PromptOptionsprompts_instructions.goreviewBotMatchLogins, Linear scope contract, prior-notes constsprompts_publish.gountrustedFence, publish/routing instructions,mentionableAuthor, permissions guidance, verdict/finding schema consts,perspectiveNames, model-stamp helpersprompts_combined.goBuildCombinedPrompt, fan-out instruction, combined sections/publish instruction, review writing guideTests stay in place (
prompts_test.gois unaffected). Changelog fragment added as in #15690.Closes #15701
— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88