Skip to content

πŸ“– proposal: LLM-ranked knowledge advisor (knowledge system phase 2) - #17107

Merged
hivecommons-hive[bot] merged 2 commits into
v5from
hive/adopt-17070
Nov 7, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
v5from
hive/adopt-17070

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

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

This branch is #17070's head 4ea6f8deeb0a as pushed by @Karibhou (fork Karibhou/hive), unchanged. Last lane reason on the original: optional-check-failing:PR Issue.

Hive fix agent: rebase this branch on v5, 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.

Add docs/rfc-17054-llm-ranked-knowledge-advisor.md arguing the open
questions on #17054: rank-only (slug must be a matcher candidate, model
reason never typed), hive-paid per-agent/fleet call caps, in-process
behind phase 1's KnowledgeAdviser seam with Advise moved off the poll
goroutine, pane tail + kick summary as signal, and shadow/holdout
measurement through the retro lane's existing counters.

Hive-Run: #17054
Hive-Plan: knowledge advisor phase 2 (RFC)
Hive-Spec: knowledge-advisor#17054
Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
Signed-off-by: Karibhou <Karibhou@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 7, 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 hanthor 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 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.

PR Title Relation Files
#17070 πŸ“ proposal: LLM-ranked knowledge advisor (phase 2 of #17052) same files docs/rfc-17054-llm-ranked-knowledge-advisor.md

@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/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Nov 7, 2026
@hivecommons-hive hivecommons-hive Bot changed the title πŸ“ proposal: LLM-ranked knowledge advisor (phase 2 of #17052) πŸ“– proposal: LLM-ranked knowledge advisor (phase 2 of #17052) Nov 7, 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.

Read the diff and checked its "what exists today" claims against v5; the proposal is accurate about the code it describes: Primer.PrimeScoped at src/pkg/knowledge/primer.go:99, the MaxFacts default at primer.go:62, the rolling hourly GitHub budget in src/crux/proxy/agent_github_budget.go, the in-process src/cmd/hive/knowledge_adviser.go seam, src/pkg/retro/analysis.go, src/pkg/knowledge/retro_lesson.go, and the src/pkg/ioscan / src/crux/trajectory / src/crux/logscrub packages all exist as described. The new file has no relative links, and root docs/ already holds proposals (e.g. docs/goose-at-scale-upstream-proposal.md), so the placement fits. Content looks fine to me.

Everything red here is PR metadata, not the diff β€” the fix agent should not need to touch the file:

  • PR Type: this repo's check (kubebuilder-release-tools) accepts only ⚠ ✨ πŸ› πŸ“– πŸš€ 🌱. πŸ“ is not accepted, so retitle to πŸ“– docs: proposal β€” LLM-ranked knowledge advisor (phase 2) or similar.
  • PR Issue: #17052 in the title fails it ("Issue numbers belong in the PR body"). Move it to the body as Refs #17054 / Refs #17052.
  • Docs Link Check: the only broken link reported is CHANGELOG.md: broken link 'url' β€” pre-existing on v5, fixed by #17096. It will clear on rebase once that lands.

Same head as #17070 (4ea6f8de), which this PR supersedes; I've left a note there recommending it be closed in favour of this one.

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

@hivecommons-hive

hivecommons-hive Bot commented Nov 7, 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: retitled to πŸ“– proposal: (the pinned PR Type verifier rejects πŸ“, see #17105) and merged v5 in so the link check runs against the CHANGELOG fix from #17096. 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-2 (folded here because this head already carries its hive review):

Read at head 435ad7b (the 4ea6f8d commit from #17070 plus a v5 merge; the diff is byte-identical to #17070's). This is the survivor of that pair β€” #17070 lives on a fork the hive cannot push to, and the two title-shaped checks (PR Issue, PR Type) that were red there are green here. Content-wise the RFC's citations into v5 were already checked on #17070 and hold; nothing new to add there. Looks correct to me as a proposal document.

One stale status, low β€” phase 1 (#17068) merged into v5 at 19:29Z (e8347bd), after this text was written, and the RFC still describes it as pending:

docs/rfc-17054-llm-ranked-knowledge-advisor.md:41

- **Phase 1 seam (PR #17068, merged).** `crux.KnowledgeAdviser` has two methods:

docs/rfc-17054-llm-ranked-knowledge-advisor.md:301

Each slice is independent now that phase 1 (PR #17068) has landed:

Since this is the branch the hive can push to, this is where that two-line fix belongs; #17070 can then be closed as the duplicate (already flagged there β€” I have not closed anything).

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

Read the RFC against v5 @ 2d96de716. Its description of what exists today is accurate β€” I checked each reference rather than taking the prose on trust:

  • Primer.PrimeScoped β€” src/pkg/knowledge/primer.go:99; called from Scheduler.primeKnowledge at src/pkg/scheduler/kick_priming.go:278
  • crux.KnowledgeAdviser with Policy/Advise β€” src/crux/knowledge_advice.go:52-58; hive-side 5 s timeout and max 2 per scope β€” src/cmd/hive/knowledge_adviser.go:23,26
  • in-process-only seam in sidecar mode β€” src/cmd/hive/agent_runtime_sidecar.go:338 and src/crux/api/runtime.go:830
  • NewDailyQuotaClassifier β€” src/pkg/ioscan/daily_quota.go:47; logscrub.RedactPaneTokens β€” src/crux/logscrub/pane.go:36; jsonextract.Object β€” src/crux/jsonextract/jsonextract.go:16; agents.github_api_hourly_cap β€” src/crux/config/agent_config.go:309

One currency nit, worth a one-word fix before this merges as a record: docs/rfc-17054-llm-ranked-knowledge-advisor.md:35 says "Phase 1 seam (PR #17068, open)" and the implementation-slices section says "once phase 1 (PR #17068) lands" β€” #17068 has merged to v5, so the seam is already there and slice 1 is unblocked.

On the adoption itself: the diff here is byte-identical to #17070's head 4ea6f8d (same single file, +323), so this PR is the surviving copy of that proposal and #17070 can be closed in its favour once this lands. Not a duplicate in the problematic sense β€” the body says it is a hive adoption.

Looks correct to me as a proposal document. Design-wise the rank-only / no-typed-reason choice is the right one for the prompt-injection reason the doc gives.

Evidence bundle `#17107435ad7b` sha256:2d3f44dd5005b843ec13893d0b2607141e47014e553f635bcbc79160fa09b241 β€” download from the dashboard or `hivectl review evidence #17107`.

@hivecommons-hive hivecommons-hive Bot changed the title πŸ“– proposal: LLM-ranked knowledge advisor (phase 2 of #17052) πŸ“– proposal: LLM-ranked knowledge advisor (knowledge system phase 2) Nov 7, 2026
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Nov 7, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 13b3f04 into v5 Nov 7, 2026
71 of 73 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the hive/adopt-17070 branch November 7, 2026 21:25
@github-actions

github-actions Bot commented Nov 7, 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/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 7, 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/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.

1 participant