Repository navigation
Conversation
The "# Relevant Knowledge" query was an issue's labels plus title words, and on hive-routed work those were mostly the hive's own routing: stage/010-actionable, agent/reviewer, approved-direction and the "[reviewer] Review backlog (style):" stem. They match review and scanning notes in every repo, so utah-packages#879 was primed with other repos' entries. extractKeywords now drops the hive's routing label families and the filer tag, and cuts a review backlog title to its perspective and finding. The kick context carries the issues' repositories, and the primer adds 0.1 to the rerank score of entries tagged repo:<org>/<name> for them. The tag orders what the search found; it admits nothing. Label-scoped entries still see every label. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1 Signed-off-by: Douglas Baggett <doug.baggett@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1 Signed-off-by: Douglas Baggett <doug.baggett@gmail.com>
Seen in the projectbluefin hive's primer queries: origin/governor and hive: churn-triaged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1 Signed-off-by: Douglas Baggett <doug.baggett@gmail.com>
There was a problem hiding this comment.
Style review (head c9c5541). Approving; two maintainability notes the author may want to pick up, neither blocks.
1. TestKnowledgeKick_TaskRepoRanksItsEntriesFirst reaches for the role-guidance fixture just to get a config β src/pkg/scheduler/kick_priming_query_test.go:84. guidanceScheduler(t, "") (role_guidance_test.go:42) builds the golden scheduler, a checkouts dir and an AGENTS.md that this test never reads. kickContextFor accepts a nil config (covered by the "nil config keeps the agent name" case in kick_priming_scope_test.go:40), so the test can stand alone:
kc := kickContextFor(nil, "scanner", []github.Issue{task})
Relatedly, the new Repos field is asserted only inside this integration test; TestKickContextFor (kick_priming_scope_test.go:11) is the table that already pins Lane/Labels/Paths for kickContextFor and is the natural home for a wantRepos column (de-dup, lower-casing, and the Contains("/") guard are untested as written).
2. Three label-noise tables where one would do β src/pkg/scheduler/kick_priming.go:684-718. noiseControlLabels has the same shape and purpose as the existing noiseLabels map directly above it ("labels that say nothing about the work"), and noiseLabels["triage/accepted"] (line 685) is now shadowed by the "triage/" prefix. Folding the four control labels into noiseLabels and dropping the redundant entry keeps isNoiseLabel to one map lookup plus the prefix loop.
Minor: the PR body names the first test TestExtractKeywords_DropsHiveRoutingAndNamesTheRepo; the file has TestExtractKeywords_DropsHiveRouting (line 20), which matches what it asserts.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from Read the diff against What I verified:
One nit in the PR body only: it names the test No code changes requested. |
Round 2, from an independent review of round 1: - A query left empty by the filter falls back to the old one (legacyKeywords), so no kick loses a section it had. - A leading [tag] comes off only when it names a hive lane, origin source or configured agent; "[nvidia] β¦" keeps nvidia. - The complexity tier is no longer a search term; epic, claimed, author/* and hive-pause/* join the routing labels, using the config helpers for agent/* and origin/*. - The task-repo boost is a separate rankBoost that applyPriority sorts on within a type; Confidence, which kicks show, is untouched. It uses FactRepo and matches a bare repo:<name> code-map tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1 Signed-off-by: Douglas Baggett <doug.baggett@gmail.com>
Round 3, from a second independent review: - The repo ranking is out of this PR (kept on a local branch): it could change which entries survive the caps, and does nothing on a vault without repo: tags. The knowledge package is back to v6. - When the issue's own terms match no entry, renderKnowledge searches again with the old query, so no kick loses the section it got. - Never-claim labels come from claims.never_claim_labels; Prow's tide/, ok-to-test, release-note, cncf-cla: and bare do-not-merge are left out. - One collectKeywords walk serves both queries; the review backlog regex takes any leading tag; the filer set is built once per query. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1 Signed-off-by: Douglas Baggett <doug.baggett@gmail.com>
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
|
Summary Findings
Questions / decision
Verdict: approve. |
|
/lgtm |
|
/approve |
|
LGTM label has been added. DetailsGit tree hash: f52082ff5f54f36a781af444ee72bde3e7f254bf |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: clubanderson The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
β¦le CI runs (#17462) While a CI / Review track runs, the stage chevron renders settled-current (filled but still, icon only). The Open-column word tints (draft slate, blocked yellow, New blue, stale amber-red) and the held-gate amber were declared later in tracker.css at equal specificity, so they repainted the settled chevron and the row showed two coloured chevrons β hive's own #17329, a draft PR with no stage, read as slate Open + amber CI 51/64. One higher-specificity settled-current rule after the tints restores the neutral fill; the draft class stays for the tooltip. Node test covers the rendered classes and the CSS ordering/specificity. Fixes #17461 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Summary
Resident kicks and contributor role guidance get a "# Relevant Knowledge" section from a search built from the work's issues. On hive-routed work that search was mostly the hive's own routing words, so it pulled in knowledge about other repos, and on the projectbluefin hive it gave nearly every agent the same section. Now the search uses what the issue is about.
It cannot leave a kick without a section it gets today. If the filtered terms are empty, or they match no entry, the search runs again with exactly the old query.
Seen live: a scanner task on
projectbluefin/utah-packages#879built the querystage/010-actionable agent/reviewer kind/cleanup approved-direction reviewer review backlog style β¦(from the log line #17319 added), and was primed with review notes about knuckle, bluefin-lts and dakota.Draft: the maintainer wants to review this before it is marked ready. This is round 3; two independent reviews and what changed are listed at the end.
What changes
All in
extractKeywordsForandrenderKnowledge(src/pkg/scheduler/kick_priming.go). The knowledge package is untouched.Routing labels are no longer search terms. Left out:
stage/(stagelabels.Prefix),agent/andorigin/(config.IsAgentLaneLabel/IsOriginLabel),hive/,hive:(hive: churn-triaged),hive-pause/(github.HiveHoldLabelPrefix),author/(authorkind.Prefix),triage/,size/,lifecycle/,do-not-merge,needs-,dco-signoff,sentinel-;tide/,ok-to-test,release-note,cncf-cla:;approved-direction,hive-review,lgtm,approved,claimed;claims.never_claim_labels, defaultepic).Labels that describe the work stay, for example
kind/cleanup,priority/highandarea/*.The complexity tier is no longer a search term.
simple,mediumandcomplexcome from the hive's classifier, andmediumwas in every projectbluefin query sampled.A filer tag comes off a title only when it names a hive filer: a built-in lane, an origin source (
selfreport,governor, β¦) or an agent configured on this hive. A person's[nvidia] driver fails to buildkeepsnvidia.A review backlog title is cut to its perspective and finding, with any leading tag:
[reviewer] Review backlog (style): spec file mixes tabssearches asstyle spec file mixes tabs.Two fallbacks keep today's sections:
legacyKeywords);renderKnowledgesearches once more with the old query and logsknowledge primer: no entry matched the issue terms, retrying with the full query.legacyKeywordsand the new query share one walk (collectKeywords), and the legacy filter is the oldnoiseLabelslist unchanged.What this can still change: when the filtered terms do match entries, the section holds those entries rather than the ones the routing words used to pull in. That is the intended change. On the projectbluefin hive every search returns the 25-entry maximum (see below), so in practice sections stay full and only their contents change.
Who it affects
The query is shared, so this changes both contributor role guidance (
BuildAgentGuidanceForTask) and resident kicks (templates.goand the lane messages for scanner, quality, architect and other agents). Label-scoped entries (scope.labels,scope.lanes) are unaffected: the kick context still sees every label, includingagent/*andstage/*.What the projectbluefin hive shows (read-only, 2026-11-08 18:00Z to 2026-11-09 01:55Z)
epic, approved-direction, stage/010-actionable, stage/stalled, medium, β¦, and the reviewer, quality and sec-check kicks injected the identical 3,972 bytes from 12 entries.hive/already-done,hive/partially-addressed,hive/verified-open,hive: churn-triaged,origin/governor,agent/ci-maintainer.Not in this PR
repo:<name>tags, multi-repo tags, five queued repos at once), and does nothing on the projectbluefin hive, whose vault has norepo:tags. It is now a separate local branch,fix/v6-knowledge-task-repo-rank, not opened.hold_labels(Linear, Jira, GitLab sources). They are per source rather than hive-wide; GitHub'sholdwas already left out.Files
src/pkg/scheduler/kick_priming.go:extractKeywordsFor(extractKeywordsis its no-config form),legacyKeywords,collectKeywords,searchableTitle,hiveFilers,neverClaimLabels,isRoutingLabel; the no-hit retry inrenderKnowledge.isNoiseLabelis unchanged.src/docs/agent-knowledge-and-memory.md: primer diagram, step 1.changelog.d/fixed-knowledge-priming-query.md.Tests
CI is the verdict here. Nothing was run locally except
gofmt -l.src/pkg/scheduler/kick_priming_query_test.go:TestExtractKeywords_DropsHiveRouting: the fix: tighten advisor/newcomer token permissionsΒ #879 issue, with its tier and every routing family including Prow's, gives exactlykind/cleanup style spec file mixes tabs spaces.TestExtractKeywords_AllRoutingFallsBackToLegacyQuery:[ci-maintainer] Fix CIwith only routing labels gets the old query.TestExtractKeywords_ConfiguredNeverClaimLabels: a configurednever_claim_labels: [Tracker]is left out, andepicthen stays.TestSearchableTitle: lane, origin-source and configured-agent tags come off; any tag before "Review backlog" comes off;[nvidia],[ACMM L0], an unconfigured agent name and "Review the backlog of β¦" stay.TestIsRoutingLabel: every family above is left out;kind/cleanup,priority/high,area/packaging,stagehand,agentic,authoringandepic(as a label word) stay.TestPrimeKnowledge_NoHitFallsBackToLegacyQuery: a wiki that matches only the old query'sci-maintainerterms. The kick still gets that entry, from a second search, and the first search wasflaky lint job.The existing keyword tests are unchanged and still hold.
TestExtractKeywords_IncludesTierpasses through the first fallback, since its issue has nothing but a tier.Review history
epic,claimed,author/*,hive-pause/*)[nvidia])epichard-coded; configured never-claim labels ignoredcfg.Governor.Claims.EffectiveNeverClaimLabels()ok-to-test,tide/, baredo-not-merge, β¦) keptcollectKeywordswalk; filer set built onceπ€ Generated with Claude Code
https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1