Skip to content

πŸ› fix(dashboard): drain review-question autodecide sweep before WS test cleanup - #17452

Merged
hivecommons-hive[bot] merged 4 commits into
v6from
scanner/fix-17445
Nov 9, 2026
Merged

hivecommons-hive[bot] merged 4 commits into
v6from
scanner/fix-17445

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

UpdateStatusIfFresh starts a background maybeAutoDecideReviewQuestions goroutine. In TestStandbyAutoDispatchUsesAcceptedFreshStatusQueue it outlived the test body, so redirectContributeWSDisk's Cleanup restored auditLogPath (api_contribute_test.go:55) while the sweep was still reading it via AuditLog.HasOnDiskLog (audit.go:454, from buildStageTracker β†’ supersessionAuditEntries), tripping the race detector (run 42700566451, job 129444134549).

The sweep is now tracked by a WaitGroup on the autodecide state, and setupWSTest registers a Cleanup that waits on it; being registered after the redirect, it runs first (LIFO). No runtime behaviour change.

Closes #17445

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

…estores audit globals

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 9, 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 9, 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/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 9, 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 9, 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.

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 Nov 9, 2026
@hivecommons-hive

hivecommons-hive Bot commented Nov 9, 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

Evidence bundle `#1745278b72de` sha256:24dd86962879ad162664ddb521f865ac510c02e85a765f69e3a126a7242e0085 β€” download from the dashboard or `hivectl review evidence #17452`.

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

Read the tree, not just the diff. Looks correct to me.

  • reviewQuestionAuto is a value field on *Server (src/pkg/dashboard/server.go:257), so t.Cleanup(s.reviewQuestionAuto.wg.Wait) is a method value on an addressable field β€” no nil deref, no copy of the WaitGroup.
  • wg.Add(1) runs after st.running = true is set under st.mu (review_question_autodecide.go:286-297), and the running flag already guarantees at most one sweep in flight, so Add can't race Wait from a second sweep.
  • Ordering: setupWSTest registers the wait after redirectContributeWSDisk and before the hub Close/handlers.Wait cleanups (contribute_ws_test.go:22-40), so LIFO gives hub Close β†’ HandleWS unwind β†’ sweep drain β†’ globals restored β†’ TempDir removal. That's the order the race in TestStandbyAutoDispatchUsesAcceptedFreshStatusQueue needed.

Open note, not a defect: only setupWSTest callers get the drain. Any other test that pairs redirectContributeWSDisk with UpdateStatusIfFresh on a server that has a GHClient would still be exposed; none in the current tree that I could see.

β€” hive: agent=reviewer 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 9, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit a621c03 into v6 Nov 9, 2026
84 of 87 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-17445 branch November 9, 2026 22:07
@github-actions

github-actions Bot commented Nov 9, 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 9, 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/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci-flake: github.com/hivecommons/hive/pkg/dashboard.TestStandbyAutoDispatchUsesAcceptedFreshStatusQueue

0 participants