Repository navigation
Description
Part of #17054 (approved direction: #17054 (comment)). RFC: docs/rfc-17054-llm-ranked-knowledge-advisor.md § "Where it runs" (Sidecar). Land on v5.
Readiness (owner condition 6): last slice. Open for work only after in-process rank mode has run with holdout_percent: 50 on hive's own hive for at least one week and the outcome comparison (#17156) is published on #17054.
Why
The phase-1 seam is in-process only: sidecarHost.SetKnowledgeAdviser in src/cmd/hive/agent_runtime_sidecar.go is a no-op, so sidecar-mode runtimes have no adviser at all. The hive side holds the knowledge store, the Primer and the inference credentials, so the work stays on the hive; the sidecar only ships the scope (and scrubbed pane tail) across and receives advice lines.
Scope
- Hive side:
POST /v1/knowledge/adviseon the existing runtime-callback server, authenticated the same way the other/v1/*sidecar callbacks are. Request: agent, kick identity,crux.KnowledgeScope(includingAction,PaneTail). Response:[]crux.KnowledgeAdviceplus the policy (MaxPerKick,Cooldown,WantsPaneTail,PaneLines). The hive runs the same adviser chain it runs in-process (phase 1, optionally wrapped by the ranking decorator from ✨ knowledge: LLM ranking decorator over the mid-task adviser — rank-only, fail-closed, shadow/rank/holdout (advisor phase 2, slice 3) #17155). - Runtime side: a
crux.KnowledgeAdviserimplementation that calls the route, bounded by the async contract from ✨ crux: asynchronous KnowledgeAdviser with scope Action and scrubbed PaneTail (advisor phase 2, slice 1) #17153 (one in-flight call per agent). Pane tail is scrubbed in the runtime before it is sent; the hive scrubs again on receipt (defence in depth). - Fail closed: any transport error, non-2xx or malformed body means no advice; log once per kick, not per tick.
- No inference credentials or model settings are shipped to the sidecar.
Acceptance criteria
- Sidecar runtime with the route reachable delivers the same lines an in-process runtime delivers for the same pane fixture (golden test).
- Route unreachable: nothing typed; exactly one warning per kick.
- Request body never contains an unredacted token from the
logscrubset; the hive rejects (400) a body whosePaneTailexceedspane_lines. - The route refuses unauthenticated calls with the same status the other sidecar callbacks use.
Tests expected
Hive-side handler tests next to the other /v1/* callback tests; runtime-side client tests with httptest. CI is the verdict; do not run the suite from an agent pane.
Housekeeping
- Changelog fragment:
changelog.d/added-sidecar-knowledge-advise.md, single-bullet. - Docs: sidecar section of
src/docs/design/crux.mdand the advisor section ofsrc/docs/agent-knowledge-and-memory.md;src/docs/api-referenceentry for the route (letcheck-docs-citations.py --fixhandle citations if CI reports drift).
Activity
hivecommons-hive commentedon Nov 8, 2026
Deferred: owner condition 6 gates this slice on a week of in-process
rankmode withholdout_percent: 50plus the #17156 comparison published on #17054. Not starting until that evidence exists.🐝 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
clubanderson commentedon Nov 9, 2026
Advisor rank mode with 50% holdout enabled on hive's hive (r05x) at 2026-11-09T22:48Z; evidence window starts now → recheck 2026-11-17 earliest.
Config (
knowledge:section of/data/hive.yaml.runtime+.dashboard):First decisions landed at 22:57Z (
knowledge advisor: decisionlog lines;/data/knowledge-advisor-decisions.jsonlhas its firstarm: deliver / outcome: deliveredrecord, plus held-out picks logged).Notes for follow-up (separate issues worth filing):
/v1/chat/completionstoendpoint; the Copilot API only serves/chat/completions, hence the?_=suffix workaround. It should honor endpoints already ending in/chat/completions.knowledge.advisor*, and hot-reload of/etc/hive/hive.yamlwas starved (cfgReloadMuheld by the governor run loop for whole eval cycles; startup tick ~800s), so the edit had to be done with the deployment scaled to 0 via a helper pod on thehive-dataPVC. Backups:/data/hive.yaml.*.bak-advisor-20261109T224800Z.hivecommons-hive commentedon Nov 18, 2026
🔓 Claim by @Karibhou released (lease revoked).
Claim history
Karibhou(contributor on hive hosted-available-oke-11-placeholder-r05x)Karibhou(contributor; lease revoked)Karibhou commentedon Nov 18, 2026
Owner condition 6 is still in effect. The Nov 18 rollout update excludes the Nov 9–14 data because rate limits starved the deliver arm. It schedules a Nov 21 recheck; the clean seven-day comparison has not been published and the owner has not cleared the sidecar slice. #17156 being closed means the measurement tooling landed, not that the rollout gate passed. No code or PR changes made.
-- hive: backend=omp model=openai-codex/gpt-6.2-sol
11 remaining items
hivecommons-hive commentedon Nov 18, 2026
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.
PR #19172 covers this issue: #19172
The PR body says this is partial/non-closing work (
Refs/Part ofor leave-open wording), so Hive will not add a closing keyword. GitHub will not show its issue-list PR icon without a closing keyword; the stage comment is the link.✨ sidecar: knowledge advise callback so sidecar runtimes get the mid-…
✨ sidecar: knowledge advise callback so sidecar runtimes get the mid-…
github-actions commentedon Nov 19, 2026
PR #19172 has merged (#19172) and referenced this issue with a non-closing
Refs #17157rather than a closing keyword.This issue remains open because the merged PR did not use
Closes/Fixes/Resolves. If the fix should close it on merge, use a closing keyword in the PR body; use the opt-inhive: needs-confirmationmarker only when the reporter genuinely must verify before closure.clubanderson commentedon Nov 19, 2026
Closing as completed. Slice 5 landed in #19172 (merged 2026-11-19): POST /v1/knowledge/advise on the runtime-callback server with the same bearer auth as the other sidecar callbacks, fail-closed handling, pane-tail limits and re-scrubbing, golden and handler tests, changelog fragment and docs. It ships default off behind knowledge.sidecar_advise, per the 2026-11-18 owner decision on this issue. Turning it on for a live hive is a rollout decision gated on the rank-mode evidence tracked in #17054, not remaining work here. The merged PR used Refs rather than a closing keyword, which is why this stayed open.
🐛 Close partially-addressed issues the scanner verified complete (#19301