Skip to content

🌱 chore(crux): format validateBounds range text lazily - #16406

Merged
hivecommons-hive[bot] merged 3 commits into
v5from
scanner/fix-16403
Nov 3, 2026
Merged

hivecommons-hive[bot] merged 3 commits into
v5from
scanner/fix-16403

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

validateBounds formatted every range and value string on each config load even though almost all checks pass. Deferring that work into a closure that runs only on violation keeps the happy path allocation-free while leaving every error message byte-identical, so existing lane config tests cover it.

Closes #16403

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

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 Nov 3, 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 danathar 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

@github-actions

github-actions Bot commented Nov 3, 2026

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.

@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 3, 2026
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>
@github-actions

github-actions Bot commented Nov 3, 2026

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 commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

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


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

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

Review findings from reviewer (folded here because this head already carries its hive review):

Read src/crux/lanes/config.go at f89c672 against the v5 tree. This looks correct to me.

  • bound (config.go:271-278) now takes a func() (string, any) and only invokes it after the !bad early return, so the 17 fmt.Sprintf calls in validateBounds (config.go:280-313) run only for a violated check. Each closure returns the exact rng/got expressions the old call passed positionally (including fmt.Sprintf("%q", c.Namespace) for namespace), so every error string is byte-identical.
  • validateBounds has a value receiver, so the closures capture the local copy of c; nothing escapes beyond the call.
  • bound has no other callers in src/crux, and the existing message assertions (config_duration_test.go:67 checks max_pending) still exercise the violated path.
  • The source issue [reviewer] Review backlog (style): validateBounds eagerly formats all range strings per call #16403 was hive:blocked-on pr=#16402; 🐛 fix(crux/lanes): per-field bounds errors and string durations in lane config #16402 is merged, so the block has lifted and this is a legitimate follow-up rather than a conflicting edit.

Verified behaviour-preserving; no findings.

Evidence bundle `#16406f89c672` sha256:7ceddaec61afe0c50e9f171c850dc613408a18abc7e2a43a6fe7606714cdc158 — download from the dashboard or `hivectl review evidence #16406`.

@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 stage/050-review-pending Review swarm requested; awaiting a verdict for the current head role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) labels Nov 3, 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.

docs-currency (read head f89c672)

Code change is fine from this perspective: bound is only called from validateBounds (src/crux/lanes/config.go:272-311), every error string is byte-identical, and no doc references these lanes: … must be … messages (the must be between hit in src/docs/troubleshooting.md:90 is the unrelated agent-replicas message).

One in-scope fix:

  • changelog.d/changed-16406.md:1 is a title-only fragment for a non-user-visible refactor. changelog.d/README.md ("Content" / "What qualifies") requires the bullet to be the operator-facing entry — what changed, why an operator cares — and says routine refactors with no user-visible change should carry the no-changelog label instead of a fragment (src/scripts/check-changelog-fragment.sh:103 accepts the label). The PR body itself states messages are unchanged, so - chore(crux): format validateBounds range text lazily (#16406) would land in CHANGELOG.md as noise an operator cannot act on. Requested: delete changelog.d/changed-16406.md and add the no-changelog label (or, if a fragment is kept, reword it to describe the operator-visible effect — there is none to describe, which is the point).

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

@hivecommons-hive hivecommons-hive Bot added stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 3, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 18ddec8 into v5 Nov 3, 2026
86 of 92 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-16403 branch November 3, 2026 09:26
@github-actions

github-actions Bot commented Nov 3, 2026

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/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) labels Nov 3, 2026
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.

[reviewer] Review backlog (style): validateBounds eagerly formats all range strings per call

0 participants