Repository navigation
Conversation
Persist public sharing and tag scope, restore Kubernetes overlays, and expose shared controls in the Knowledge header and Settings. Preserve environment fallback and gate writes on verified owner access. Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com> Hive-Run: hivecommons#10676 Hive-Plan: owner-only-public-knowledge-sharing Hive-Spec: issue-10676#design Signed-off-by: arteeh <arteeh@users.noreply.github.com>
|
[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 |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
Conflicts with #10678 (same issue #10676), and the dashboard toggle alone does not open the endpoint through the auth middleware.
Duplicate/conflict. #10678 adds the same GET/PUT /api/knowledge/public routes, the same knowledge.public config key and the same response shape. I read both diffs in full; the Go types differ (*PublicKnowledgeConfig here vs struct-with-*bool there) and source reports "config" here vs "setting" there, so they cannot both merge. Flagging for a maintainer: one should be closed. I have not closed anything.
Verified defect — isPublicPath still reads only the env (high). This PR switches handlePublicKnowledgeMCP to s.publicKnowledgeSettings() (src/pkg/dashboard/mcp_knowledge.go), but src/pkg/dashboard/server.go:1854 at this head is unchanged: case path == publicKnowledgeMCPPath && publicKnowledgeEnabled(): — the env-only function. authenticate (server.go:1508-1512) only short-circuits to next.ServeHTTP for public paths; otherwise the request falls through to the token/identity checks. So on a spoke with DASHBOARD_AUTH_TOKEN set and HIVE_PUBLIC_KNOWLEDGE unset, an owner who enables sharing from the dashboard gets a UI that says "enabled" and a URL that anonymous MCP clients cannot reach. #10678 makes isPublicPath a Server method and fixes this (server.go:1853 in that PR).
Conversely, this PR correctly adopts Knowledge.Public in loadWithDashboardOverlay (src/pkg/config/config.go:5444-5447), which #10678 lacks — each PR has half the fix. A maintainer should pick one branch to carry both halves.
Minor: PublicKnowledgeConfig.Enabled bool + pointer-to-struct means the overlay cannot express "explicitly disabled" vs "unset" at the field level, but the pointer on the struct handles it; fine as written.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Supersession sweep found that this PR's claimed issue is already closed by another merged PR.
A different merged PR closed the claimed issue. Leaving this contributor PR open for a human to review. This comment is edited in place by the supersession sweep; it is not duplicated. |
Owners currently need environment variables to control anonymous Knowledge MCP access. This adds sharing controls to the Knowledge header and Settings, with an enable confirmation, tag scope, endpoint URL/copy, and read-only status for other viewers.
Authenticated
GET /api/knowledge/publicreports the effective settings; verified-ownerPUTpersists them through runtime config and the Kubernetes dashboard overlay. Explicit settings override environment variables, including disabled/empty values. Each MCP request uses a settings snapshot; subsequent requests stop immediately after disabling. Successful changes are audited and failed saves restore the prior runtime value.Validation:
gofmt -lis clean. Added regression tests for authorization, persistence/overlay restoration, environment precedence, public tag filtering, immediate disable, save failure, and UI confirmation cancellation. Tests were not run locally per AGENTS.md; CI owns execution.Fixes #10676
— hive: backend=codex model=gpt-6-astra effort=medium
🐝 Hive Agent:
contributor| SHA:c9a30f3ef