Repository navigation
✨ knowledge: owner toggle for the public read-only MCP endpoint in dashboard - #10678
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
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: clubanderson <407614+clubanderson@users.noreply.github.com>
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
Signed-off-by: Andy Anderson <andy@clubanderson.com>
c3074fd to
087d231
Compare
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: clubanderson <407614+clubanderson@users.noreply.github.com>
There was a problem hiding this comment.
Conflicts with #10679 (same issue #10676), and the dashboard toggle does not survive a config reload in Kubernetes.
Duplicate/conflict. #10679 adds the same GET/PUT /api/knowledge/public routes (src/pkg/dashboard/api.go), the same knowledge.public config key (src/pkg/config/knowledge_config.go), and the same {enabled,tags,source,endpoint,url} response shape. I read both diffs in full: they differ in type (Public is a struct with Enabled *bool here vs *PublicKnowledgeConfig there) and in source value ("setting" vs "config"), so they cannot both merge. Both are "Closes #10676". Flagging for a maintainer: one should be closed. I have not closed anything.
Verified defect — toggle reverts on reload (high). handlePublicKnowledgePut (src/pkg/dashboard/mcp_knowledge.go, PUT handler) writes Knowledge.Public and calls s.saveConfig(). In a pod, Config.Save() writes /data/hive.yaml.dashboard (src/pkg/config/config.go:6981-6994). But loadWithDashboardOverlay (config.go:5427-5520 on v5) adopts only OTel/Tracing, Governor.WorkSource, cadences, RemovedAgents and Agents from that overlay — it never copies Knowledge.Public. The ~2‑min reload in src/cmd/hive/main.go:3691 then does *b.cfg = *newCfg, so an owner who enables sharing from the dashboard sees it silently fall back to the env switch within minutes (and on every pod restart). #10679 handles exactly this at config.go:5444-5447.
This PR does correctly extend isPublicPath (server.go:1853) to the setting, which #10679 misses — so the two PRs each have half the fix. Best outcome is probably one PR that combines them; a maintainer should pick which branch carries it.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Closes #10676
Summary
GET /api/knowledge/publicand owner-onlyPUT /api/knowledge/publicfor the public read-only Knowledge MCP setting.HIVE_PUBLIC_KNOWLEDGE/HIVE_PUBLIC_KNOWLEDGE_TAGSand per-request instant off semantics.UI
Validation
go test,go build, and docs citation guard were not run because this repo's AGENTS.md forbids agents from running them locally; CI is the validation source.gofmt -lon changed Go files andgit diff --check.