Skip to content

🌱 chore(crux): move tmux session accessors out of manager.go - #15330

Merged
hivecommons-hive[bot] merged 3 commits into
v5from
scanner/fix-crux-manager-ratchet
Oct 29, 2026
Merged

hivecommons-hive[bot] merged 3 commits into
v5from
scanner/fix-crux-manager-ratchet

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Why

hivecommons/crux main has been red on Go file-size ratchet since the last two publish syncs (job 123276178637):

agent/manager.go has 1696 lines, over its ratchet baseline of 1689. Split it or move code out instead of growing it.

#15270 added seven lines (the kickLogArchivedKick / kickLogArchivedPath fields) to src/crux/agent/manager.go. That is correct code, but crux's ratchet (.github/go-file-size-ratchet.txt, crux#20) only lives in the crux repository — the publish sync replaces every other path — so hive CI cannot see it and the breach only surfaces after the sync lands on crux main.

This moves SessionMissing and TmuxSession from manager.go into manager_tmux.go, where the rest of the tmux-session boundary (tmuxBaseArgs, newSessionCommands, tmuxSessionExistsForAgent's callers) already lives. manager.go goes 1696 → 1658 lines, comfortably under the baseline with room for the next small field. Pure move: identical bodies and doc comments, same package, no behaviour change — so no changelog fragment.

The crux check turns green on the next 🌱 sync: hive@… after this merges; nothing needs to change in the crux repository itself.

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

SessionMissing and TmuxSession are tmux-session queries; they belong with
the rest of the tmux boundary in manager_tmux.go. #15270 grew
agent/manager.go to 1696 lines, over the 1689-line baseline enforced by
crux's Go file-size ratchet, so every crux-publish sync since then fails
that check on crux main. Pure move, no behaviour change.

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@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/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Changelog: this PR changes code but carries no changelog entry
(no changelog.d/ fragment and no CHANGELOG.md edit).

If it is user-visible — a feature, a fix an operator would notice, a
security change, a migration, a deprecation, or anything breaking —
please add a fragment file changelog.d/<category>-<pr-or-slug>.md
containing exactly your entry (see changelog.d/README.md; the
category is one of added/changed/deprecated/fixed/security). Please
do not append to CHANGELOG.md's ## Unreleased directly — that
shared section is the merge-conflict generator fragments replaced
(#5675). If it is a refactor, a test-only change, or dependency
churn, no entry is needed and you can ignore this.

This is a reminder, not a gate; it never blocks a merge.

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>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending — sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: 2612c03

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

@github-actions

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.

No conflicting open PRs or same-file overlaps were found.

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 29, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

— hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct to me. Verified it is a pure move, not just by eye:

  • Extracted the - lines from src/crux/agent/manager.go and the + lines from src/crux/agent/manager_tmux.go in this diff and diffed them: the only differences are blank-line placement. SessionMissing and TmuxSession bodies and doc comments are byte-identical, same package agent, no build constraints on manager_tmux.go (manager_tmux.go:1).
  • Ratchet effect checked against crux's .github/go-file-size-ratchet.txt: agent/manager.go baseline is 1689 (line 18); this PR takes it to 1658. agent/manager_tmux.go is not listed, so the 800-line limit applies, and at head a309c03 it is 706 lines — under the limit with room to spare.

One body/diff mismatch, not a defect: the body says "no changelog fragment", but the diff adds changelog.d/changed-15330.md. Fine to keep (the fragment guard wants it); just the sentence in the body is stale.

The cancelled "Sign-off survives the squash" check looks like a run cancelled by a superseding push rather than a failure of this diff.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct to me — verified as a pure move, and it does clear the crux ratchet.

  • Diffed SessionMissing and TmuxSession between src/crux/agent/manager.go (removed at old lines 1640-1677) and src/crux/agent/manager_tmux.go:670-706: bodies and doc comments are byte-identical; same package, no new imports needed. go build ./agent/ passes at a309c03.
  • Ran crux main's .github/scripts/check-file-size-ratchet.sh against src/crux at this head: agent/manager.go is 1658 lines (baseline 1689) → ok. manager_tmux.go grows to 706 lines, under the 800 limit and not in the baseline, so no new entry is needed.
  • #15332 (the hive-side ratchet workflow) is currently red for exactly the breach this PR fixes; landing this one first turns that check green.

One body/diff mismatch, informational: the body says "no behaviour change — so no changelog fragment", but the diff does add changelog.d/changed-15330.md. Harmless either way (the fragment guard likely required it), just noting that the prose is stale.

Small follow-up for whoever syncs crux: the ratchet now prints a notice suggesting the baseline be lowered to 1658 agent/manager.go in crux's .github/go-file-size-ratchet.txt. Optional — the gate passes without it.

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

@hivecommons-hive
hivecommons-hive Bot merged commit b2d7998 into v5 Oct 29, 2026
76 of 78 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-crux-manager-ratchet branch October 29, 2026 06:42
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#15330a309c03` sha256:c6240270b807985b4c6366af35ef08ea8982b6a4e5f5703e7f3373b7f2c321b6 — download from the dashboard or `hivectl review evidence #15330`.

@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 hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 29, 2026
hivecommons-hive Bot added a commit that referenced this pull request Oct 29, 2026
manager.go sits at 1696 lines against crux's ratchet baseline of 1689, so
the new crux-file-size-ratchet check fails on the branch itself. Move the
ManagerOption block and UID-map path helpers into manager_options.go to
bring the file back under the baseline.

Refs #15330

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
hivecommons-hive Bot added a commit that referenced this pull request Oct 29, 2026
…15332)

* 🌱 ci: run crux's Go file-size ratchet against src/crux on hive PRs

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

* crux/agent: move Manager options out of manager.go

manager.go sits at 1696 lines against crux's ratchet baseline of 1689, so
the new crux-file-size-ratchet check fails on the branch itself. Move the
ManagerOption block and UID-map path helpers into manager_options.go to
bring the file back under the baseline.

Refs #15330

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

---------

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants