Skip to content

🐛 Load pinned reviewer rules on keyword-less kicks and open a new review-rules channel without a restart - #19095

Merged
kubestellar-prow[bot] merged 1 commit into
v5from
fix/pinned-rules-keywordless-19094
Nov 18, 2026
Merged

kubestellar-prow[bot] merged 1 commit into
v5from
fix/pinned-rules-keywordless-19094

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #19094

Follow-up to #19086.

Keyword-less kicks

The scheduler's kick priming returned before the knowledge primer ran when a kick had no issues or no extractable keywords, so pinned reviewer rules never reached those kicks. It now still calls the primer when the primer has pinned entries; PrimeForKick with no query returns only the pinned entries whose scope admits the kick. Ranked knowledge is unchanged: it still needs keywords, and a primer with nothing pinned stays silent exactly as before.

New channel without a restart

The review-rules channel was connected and pinned only at boot, and only when it or its parent directory existed. On a host without a vaults directory the sweep creates the channel on its first capture, and its rules then waited for a restart. Now boot registers the channel with the primer by path (Primer.AddPinnedDir). The primer opens the directory on the first kick after it appears and calls a hook once, which connects it to the knowledge API so the dashboard lists it too. Boot still never creates a vaults directory the host does not have. The doc now describes this behavior.

Tests

  • Scheduler: a keyword-less kick (no issues, and an issue with nothing to extract) for the owning quality agent gets its pinned rule and no ranked fact. The developer agent gets nothing, and a primer with nothing pinned primes nothing.
  • Primer: a pinned directory that is missing, then a plain file, then a real directory is opened only once it is a directory. The hook runs once, and a nil hook works.
  • Boot: with no vaults directory, nothing is created or connected at boot. After a capture, the next quality kick carries the rule and the channel is connected. With the vaults directory present, the channel is connected and pinned at boot. With capture turned off, nothing is registered.

🤖 Generated with Claude Code

…iew-rules channel without a restart

A kick with no issues or no extractable keywords returned before the
knowledge primer ran, so pinned rules never reached it. The scheduler now
still calls the primer when it has pinned entries, which returns only
those; ranked knowledge still needs keywords.

When the review-rules channel does not exist at boot, the primer now
registers it by path, opens it on the first kick after the sweep creates
it, and connects it to the knowledge API then, so rules captured after boot
are primed and listed without a restart. The docs now say so.

Fixes #19094

Signed-off-by: Andy Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Mutation testing

gremlins found 3 surviving mutant(s) in changed files: the code ran under tests, but changing it did not fail any test.

File Line Mutation
src/pkg/scheduler/kick_priming.go 370 CONDITIONALS_BOUNDARY
src/pkg/scheduler/kick_priming.go 375 CONDITIONALS_BOUNDARY
src/pkg/scheduler/kick_priming.go 375 CONDITIONALS_NEGATION

ℹ️ 2 mutant(s) on added lines were SKIPPED because gremlins v0.6.0 only honours the first lines added lines of each default-context hunk, so non-contiguous edits in one hunk are partly missed. This does not affect the verdict.

File Line Mutation
src/cmd/hive/boot_knowledge_primer.go 110 CONDITIONALS_NEGATION
src/cmd/hive/boot_knowledge_primer.go 113 CONDITIONALS_NEGATION

Verdict: lived (#17349).

@clubanderson clubanderson added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 18, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

The pull request process is described 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Pinned reviewer rules skip keyword-less kicks, and the review-rules channel needs a restart when created on first capture

1 participant