Repository navigation
π± ci: run crux's Go file-size ratchet against src/crux on hive PRs - #15332
Conversation
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
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 |
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. |
There was a problem hiding this comment.
Decision needed: @clubanderson should decide whether hive CI may execute crux's ratchet script fetched from the mutable ref crux@main at run time (contents: read token, pinned actions), or whether the script/baseline should be pinned to a SHA or vendored.
Routing to a human because this adds a workflow. The code is correct as far as I can verify; the open question is a trust/CI-policy choice, not a defect.
What I verified against the actual trees:
crux/.github/scripts/check-file-size-ratchet.shtakes the baseline as$1(BASELINE="${1:-...}"), walksfind .from the cwd, and strips./so paths come out asagent/manager.goβ exactly the form ingo-file-size-ratchet.txt.working-directory: src/cruxplus the two$GITHUB_WORKSPACE/crux-ratchet/...arguments (crux-file-size-ratchet.yml:46-48) match that contract. The usage guard rejects >1 argument; one is passed.- The red
crux-file-size-ratchetcheck on this PR is the gate working, not a bug in it: the run log reportsagent/manager.go has 1696 lines, over its ratchet baseline of 1689, which is the real breach onmainthat #15330 removes. This PR cannot go green until #15330 merges (the body'sRefs #15330says as much). Sequencing: land #15330 first. - Hardening is in place:
permissions: contents: read(:19-20), bothactions/checkoutuses pinned to a full SHA (:28,:34),persist-credentials: falseon both, path-scoped trigger, 5-minute timeout.
The decision: crux-file-size-ratchet.yml:36-37 checks out hivecommons/crux at ref: main and then executes the script from it. Anyone who can push to crux main can run arbitrary code in hive's PR CI. Blast radius is small (read-only token, sparse checkout of src/crux, no secrets in the job) and both repos share the same OWNERS, so this may well be acceptable β but executing code from a mutable ref in a workflow is the kind of choice a maintainer should sign off on explicitly rather than a reviewer bot. Alternatives if you'd rather not: pin ref: to a crux SHA (and accept a bump PR whenever the baseline changes), or fetch only the baseline .txt from main and vendor the script.
I have not approved or changed anything.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
a29261e
βΉοΈ Sentinel notice β informational; author is trusted (hive agent), merge is not blockedHive flagged this PR (author @hivecommons-hive[bot], head
Hive did not add the |
There was a problem hiding this comment.
Decision needed: @clubanderson should decide whether hive PR CI may execute crux main's .github/scripts/check-file-size-ratchet.sh fetched at run time (new .github/workflows/crux-file-size-ratchet.yml, contents: read only), and confirm #15330 lands before this so the new check is not red on arrival.
Routing to a human because this adds a workflow under .github/workflows/ that runs a script fetched from another repository at run time β a trust decision, not a code defect. The code itself reads correctly to me.
What I verified
.github/workflows/crux-file-size-ratchet.yml:19-20βpermissions: contents: read, both checkoutspersist-credentials: false, actions pinned by SHA. The fetched script gets no write token and no secrets.:44-48βworking-directory: src/crux+ the script'sfind .(crux.github/scripts/check-file-size-ratchet.sh, "paths without the leading ./") producesagent/manager.go-style paths that match the baseline format, and the second checkout lands at$GITHUB_WORKSPACE/crux-ratchet, outside the scanned tree. I reproduced the run locally: same::error::output as the CI job.- The check is red on this PR's own head (
run 40829235649):agent/manager.go has 1696 lines, over its ratchet baseline of 1689. That is the pre-existing breach from #15270, not something this diff introduced β and it is the correct outcome for the workflow to detect. #15330 bringsmanager.goto 1658 and I confirmed crux's script passes on that head. So the merge order matters: #15330 first, then this (or this merges with a failing non-required check, which the automerge sweep may refuse).
The decision for an approver
Running crux main's bash in hive CI means anyone who can push to hivecommons/crux main can run code in hive PR jobs. The blast radius is small (read-only token, 5-minute timeout, no secrets) and crux is a sync target of this very repo, but it is still a cross-repo execution edge that didn't exist before. The alternative β vendoring the script/baseline into src/crux/.github/ β was deliberately rejected in the body to avoid two-repo drift. Body and diff agree; no gap found. I have not approved anything.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
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>
|
hive/awaiting-ci: pushed 7af26e9 moving the ManagerOption block out of src/crux/agent/manager.go (1696 β 1654 lines, baseline 1689) so the new ratchet passes on this branch. CI pending β sweep will merge when green. π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
7af26e9
βΉοΈ Sentinel notice β informational; author is trusted (hive agent), merge is not blockedHive flagged this PR (author @hivecommons-hive[bot], head
Hive did not add the |
|
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.
Decision needed: @clubanderson should decide whether hive CI may run a script fetched from hivecommons/crux main at run time (.github/workflows/crux-file-size-ratchet.yml) rather than vendoring the ratchet script and baseline into hive.
Code is fine; this is a trust-surface decision, not a defect report.
What I verified at 7af26e9
.github/workflows/crux-file-size-ratchet.yml:19-20grants onlypermissions: contents: read; both checkouts pinactions/checkoutby SHA and setpersist-credentials: false; no secrets are referenced. The step at:45-48runsbashon a script and baseline checked out fromhivecommons/crux@main, i.e. whoever can push to cruxmaincan change what runs in hive CI. With read-onlyGITHUB_TOKENand no secrets the blast radius is limited to the check's verdict, but it is a run-time cross-repo code dependency, which is why I am asking rather than confirming.- The check already executed on this PR and is
SUCCESS;working-directory: src/cruxwith the cone sparse-checkout gives the script paths likeagent/manager.go, matching the baseline format in crux's.github/go-file-size-ratchet.txt. src/crux/agent/manager_options.gois a byte-identical move of the 42 lines removed frommanager.go:802-843; same package, no callers change.
Body vs tree β one stale line. Refs #15330 (clears the current breach): #15330's own move (SessionMissing/TmuxSession β manager_tmux.go) is already on v5 β manager.go is 1658 lines on v5 tip and on crux main, under the 1689 baseline β so the breach is already cleared and this PR's split only adds headroom (β ~1616 after merge). Worth trimming that line so the issue link does not read as if this PR is the fix.
I have not approved or changed anything.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Decision needed: @clubanderson should decide whether hive CI may execute check-file-size-ratchet.sh fetched live from crux main on every src/crux PR (new workflow, contents: read, no secrets), or whether the script should be pinned/vendored instead.
Routing to a human because this adds a file under .github/workflows/; the code itself checks out. What I verified at 7af26e9:
- The workflow does what the body says.
crux-file-size-ratchet.yml:40-48checks out exactly.github/scripts/check-file-size-ratchet.shand.github/go-file-size-ratchet.txtfrom cruxmain(both exist there), and runs the script fromsrc/cruxwith the baseline path as its single argument β the usage the script documents (check-file-size-ratchet.sh:21-24, "Run from the module root",[baseline]). Baseline paths are module-root-relative (agent/manager.go), so running fromsrc/cruxis correct. - I ran it. Executing crux main's script against this PR's
src/cruxpasses (file-size ratchet: ok) and emits only the notice thatagent/manager.goshrank to 1654 lines, under its 1689 baseline. Before the split it was 1696, which is the breach in #15330. - Line counts survive publishing.
src/scripts/crux-publish.sh:68-91usesrsyncplus in-linesedmodule-path substitutions only β no line insertions β so a count measured insrc/cruxis the count crux main will see. - The code move is a pure relocation.
manager_options.gois byte-for-byte the 42 lines removed frommanager.go:802-843; same package, no behaviour change, no callers affected. - Permissions are minimal.
permissions: contents: read,persist-credentials: falseon both checkouts, action pinned to the sameactions/checkoutSHA used across the repo (e.g.backend-smoke.yml:120),timeout-minutes: 5, path-scoped trigger.
The decision I cannot make: the job executes a shell script fetched from another repository's moving main at run time. It runs with a read-only token and no secrets, and the body argues this is intentional so the baseline never drifts. Whether that is acceptable for hive CI β versus pinning crux to a SHA or vendoring the two files β is a CI-trust call for a maintainer. If the live fetch is accepted, the one thing to watch is that a crux main baseline regeneration can turn this check red on hive PRs that did not change anything (the baseline file's own header warns about that ordering).
Not blocking: changelog.d/added-15331-crux-file-size-ratchet.md uses the added- category correctly.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Intent alignment (read at head 7af26e9; linked issue #15331)
The workflow half matches the issue exactly: .github/workflows/crux-file-size-ratchet.yml:9-12 path-scopes to src/crux/**, :33-43 fetches crux's script + baseline from crux main (nothing vendored), :46-48 runs it from src/crux, and the check passed on this PR.
Undocumented scope creep β src/crux/agent/manager.go:802-843 β new src/crux/agent/manager_options.go. The PR body and the changelog fragment describe only the CI workflow, and the body hands the breach fix to #15330 ("Refs #15330 (clears the current breach)"). The move isn't mentioned anywhere. It was evidently needed to make the new check pass on this PR's own run (manager.go at merge-base 467ca6a is 1696 lines > baseline 1689), but #15330 has since merged and v5 manager.go is now 1658, so the move is redundant. Request: rebase onto v5 and drop the manager.go/manager_options.go hunks so the PR stays within #15331's contract (the check still passes at 1658 β€ 1689); if you'd rather keep the extra headroom, say so in the PR body β these lines are published to crux main by the sync with no explanation otherwise.
Advisory (non-blocking): the fragment's "cannot β¦ break crux main on the next sync" is slightly stronger than what a pull_request-only check gives β two PRs each under the baseline at their merge ref can still combine past it (the case crux's baseline header calls out for crux#22). Fine for #15331's acceptance; just don't rely on it as airtight.
β hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Needs a decision, not a merge:
Head: verdict requires_human @7af26e9, 64/64 checks green, DCO yes, soak 0s of 30m0s. What to do: approve this head ( How to release it:
Clear the cause and the hive re-evaluates on its next pass; the stage moves to |
|
Test coverage (quality) β approve; one advisory, read at head 7af26e9. Ran crux
Advisory, not blocking: the job runs only crux's π Hive Agent: β hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
/lgtm Posted by @clubanderson from the Hive dashboard; the merge gate decides from here. |
|
@hivecommons-hive[bot]: you cannot LGTM your own PR. DetailsIn response to this:
Instructions 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. |
|
/approve Posted by @clubanderson from the Hive dashboard; the merge gate decides from here. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: hivecommons-hive[bot] 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 |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
β¦l of text (#15399) * π dashboard: Let hive decide preview is one clear decision, not a wall of text The delegated-decision preview showed the repo#number twice, composed 'Hive would:' twice (the plan API's summary already carried the prefix and stageTrackerDelegatePlanText prepended it again), inlined the consequences into a paragraph, drowned the decision under a rails footer, and offered 'Approve & merge as-is' for a head the preview itself called not mergeable. The plan API now returns one verb-first sentence, a why line of at most twelve words, at most two consequences, the ladder, and mergeable_as_is; merge-now alternatives are dropped unless the head is mergeable as it is. The dashboard renders every plan β PR, issue, adopt/close/return β through one renderer: title, subject line, optional Sentinel chip, 'Hive would' sentence, Why, Then list, and a collapsed Details holding the rails, the ruled-out rungs and the sentinel finding. Two buttons by default; the merge button appears only when the ladder says mergeable-as-is. Fixes #15397 Signed-off-by: Andrew Anderson <andy@clubanderson.com> * dashboard: keep the preview CSS comment free of hex-like refs TestStageTrackerCuesWiring scans the tracker CSS block for raw colours; '#15332' in a comment tripped its '#1' probe. Signed-off-by: Andrew Anderson <andy@clubanderson.com> --------- Signed-off-by: Andrew Anderson <andy@clubanderson.com>
crux main enforces a Go file-size ratchet that hive CI never ran, so a hive PR growing a grandfathered src/crux file was green here and broke crux main on the next sync (hive#15270). This adds a path-scoped (
src/crux/**) workflow that fetches crux's script and baseline from crux main at run time and runs them fromsrc/crux, failing the PR with crux's own::error::annotation. crux stays the source of truth for the baseline, so nothing is vendored and there is no two-repo drift.Closes #15331
Refs #15330 (clears the current breach)
β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88