Skip to content

πŸ› fix: align standby qualification with dispatch queue - #16450

Merged
hivecommons-hive[bot] merged 3 commits into
v6from
hive/adopt-16436
Nov 3, 2026
Merged

hivecommons-hive[bot] merged 3 commits into
v6from
hive/adopt-16436

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Supersedes #16436 (adopted after CI went red and the contributor was unavailable; original commits by @mrbobbytables preserved).

Fixes #16420

This branch is #16436's head 7511fe18d47b as pushed by @mrbobbytables (fork mrbobbytables/hive), unchanged. Last lane reason on the original: contributor-lane:changes-requested.

Hive fix agent: rebase this branch on v6, fix the failing checks / review asks, and push to THIS branch. Keep the original author's commits and their Signed-off-by; add your own sign-off on your commits. Do not open another PR.

Open review finding carried over from #16436: the review swarm's latest verdict on 7511fe18d47b requested changes (changes_requested); read the swarm's review on #16436, address it here, and let the swarm re-review this PR. Green CI alone is not done.

mrbobbytables and others added 2 commits November 3, 2026 16:19
Use the dispatchable admission queue and exact lane assignment when computing standby qualification counts.

Hive-Run: #16420

Hive-Plan: standby-contributors

Hive-Spec: standby-contributors#S7

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>
Document that qualified standby counts use the dispatchable queue and exact lane assignment.

Hive-Run: #16420

Hive-Plan: standby-contributors

Hive-Spec: standby-contributors#S7

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: mrbobbytables <mrbobbytables@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 clubanderson 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 Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v6

Conflicts are checked with every PR merged onto the current tip of v6, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#16378 🌱 Top up v6 with the latest v5 snapshot same files src/pkg/dashboard/contribute_ws.go
src/pkg/dashboard/server.go

@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 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.

Looks correct to me (read at head 7511fe1, byte-identical to #16436's head I reviewed earlier today).

  • standbyLaneItems (src/pkg/dashboard/contribute_ws.go:3141-3155) applies the same Held skip and strings.EqualFold(strings.TrimSpace(item.Lane), lane) test that standbyDispatchItem uses (contribute_standby_dispatch.go:198-209), so "M qualify" can only name a contributor for an item that lane can actually dispatch β€” the #16420 scenario (scanner item routed to another lane, or held) now yields 0.
  • No lock hazard: UpdateStatusIfFresh calls admissionQueueSnapshot at server.go:2429 and does not take statusMu until ~:2481; the snapshot only RLocks it (contribute_sse.go:304-306).
  • Advisory, not blocking: admissionQueueSnapshot reads h.server.status, the previously published payload (contribute_sse.go:305), so qualified_standbys lags one refresh and is 0 on the first publish. Dispatch reads the same source, so tile and dispatch agree. lane_queue_depths is unchanged, so "N waiting" and "M qualify" are now computed from different splits; the issue accepted that trade-off and the S7 doc edit says so.

Nothing here that I would ask the fix agent to change before merge.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@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.

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

Looks correct to me; the only red check is not this diff's fault.

Read at 7511fe1 against v6, callers included.

  • standbyLaneItems (src/pkg/dashboard/contribute_ws.go:3140-3152) now filters with item.Held || !strings.EqualFold(strings.TrimSpace(item.Lane), lane). That is the same predicate standbyDispatchItem applies at src/pkg/dashboard/contribute_standby_dispatch.go:200-207, over the same admissionQueueSnapshot(readyQueueDefaultLimit, withheldNone) source (contribute_standby_dispatch.go:198 vs server.go:2429). So the "M qualify" set is now exactly the set a POST /api/contribute/standby/dispatch can pick from β€” which is the mismatch [v6] πŸ› standby tile counts an item for a lane that dispatch then refuses (lane split mismatch)Β #16420 reports (tile said scanner: 1, dispatch said no dispatchable standby item in lane "scanner").
  • Nil/empty semantics are unchanged in practice: ItemTiers.LaneQueue (src/pkg/standby/item.go:169-182) returns []ItemMatch{{}} when no item-tier list is in force, so lanes without a tier list ignore the items entirely; with a list in force, an empty per-lane slice yields 0 qualifying under both the old nil-actionable path and the new one.
  • go build ./pkg/dashboard/ at the head compiles; the rewritten TestStandbyLaneItemsUsesDispatchableQueue covers the held-item and cross-lane exclusions that the old test asserted the opposite of.
  • Docs: src/docs/design/standby-contributors.md:725-728 is updated to say M no longer shares buildLaneQueueDepths' split with N. Worth knowing for anyone reading the tile: N (from buildLaneQueueDepths) can still exceed M's candidate set because the depth split double-counts unrouted items into scanner; this PR deliberately fixes M only, as the issue scopes it.

On the failing native-queue-policy check: the job log ends with Error: #16436: head/base moved, draft, closed, or held β€” the workflow is evaluating the superseded original PR (#16436), not this adopted head. Nothing in this diff can turn it green; it needs a re-run (or the workflow to stop following the superseded number). PR body matches the diff: head 7511fe1 is #16436's unchanged head.

Evidence bundle `#16450fdc56a7` sha256:aa9835e3b8254d2c092b3755aa15e2b1cebedb363405c8507dc4f952b7b64fad β€” download from the dashboard or `hivectl review evidence #16450`.

@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 3820712 into v6 Nov 3, 2026
83 of 86 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the hive/adopt-16436 branch November 3, 2026 17:45
@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

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. role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) size/M Denotes a PR that changes 30-99 lines, ignoring generated files. stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[v6] πŸ› standby tile counts an item for a lane that dispatch then refuses (lane split mismatch)

1 participant