Skip to content

✨ dashboard: expose knowledge.* settings in the Settings dialog (parity batch 8) - #12313

Merged
hivecommons-hive[bot] merged 1 commit into
v5from
scanner/parity-batch-8
Oct 16, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
v5from
scanner/parity-batch-8

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Progress: parity batch 8. This exposes 26 scalar knowledge.* keys in the Settings dialog and removes them from the parity allowlist.

Refs #11854 (epic: closes when the parity allowlist is empty; remaining: the deferred knowledge list/map keys and knowledge.publish.*, plus agents, the governor remainder, project, hub, variables, agent_sandbox, runs, the review list/map keys, tracing and upstream_watch)

Settings → Knowledge → Knowledge pipeline (saved by PUT /api/config/knowledge/pipeline)

No existing endpoint held these scalars. The knowledge config editors are /api/config/knowledge/connectors (a connector list) and /api/config/knowledge/agent-scopes (a map), so this adds a sibling owner-only GET/PUT /api/config/knowledge/pipeline. The block loads lazily and has its own Save button, like the Forge App block from batch 6.

How saves work:

  • Every field is pointer-typed, so an absent field is left unchanged. 0 or empty restores the default that applyDefaults sets at Load.
  • The defaults are now exported from config as Default* constants.
  • The request is checked by the new config.ValidateKnowledgePipeline before anything is applied:
    • schedules must be hourly or daily (the values ParseSynthSchedule understands);
    • layers must be personal, project, org or community;
    • confidences must be in [0, 1];
    • counts must not be negative;
    • promote_from and promote_to must differ.
  • Only the keys a request carries are validated. A value already in hive.yaml that the editor would reject does not block saving an unrelated field.
  • Each save is persisted and audited as config_knowledge_pipeline.

The keys:

  • Bead synthesizer: knowledge.bead_synthesizer.enabled applies live: it starts or stops the running synthesizer, as PUT /api/knowledge/bead-synthesizer/enabled does. These require restart: schedule, target_layer, min_confidence, max_facts_per_cycle and max_api_calls_per_cycle. ✨ re-run PRs red on a fixed shared-CI baseline, and stop shedding unstick sweeps under API budget pressure #12005 is closed, and the cap it asked for landed through [scanner] ✨ knowledge: conditional requests and configurable cap for bead_synthesizer PR GETs #12252, so the # TODO #12005 line no longer needs to stay deferred.

  • Bead retention: knowledge.bead_synthesizer.retention_policy.max_beads, archive_after_synth_days, high_priority_retain_days and preserve_with_deps require restart. A retention block created from the dialog starts with preserve_with_deps: true, which is the boot behaviour when the block is absent.

  • Curator: knowledge.curator.enabled, schedule, auto_promote_threshold, promote_from and promote_to require restart. Scheduled promotion stays opt-in.

  • Code maps: knowledge.code_maps.enabled, schedule, layer and max_bytes require restart.

  • Primer: knowledge.primer.max_facts and max_bytes require restart.

  • Read-only, with a YAML hint and "set in hive.yaml; requires restart":

    • knowledge.engine;
    • knowledge.bead_synthesizer.vault_path and knowledge.code_maps.vault_path, which are directories the hive creates and writes to. This follows the batch 6 precedent for identity and path keys;
    • knowledge.primer.merge_strategy, because precedence is the only strategy implemented.

    The PUT does not accept any of these.

Settings → Knowledge → Knowledge sharing

knowledge.public.enabled gets a YAML hint on its existing switch. That switch saves through PUT /api/knowledge/public and applies live.

None of these keys is a secret or hub-managed. Every new control has a yamlHint and a settingHelpMark, and saves report through toasts. dashboard/openapi.json documents the new route. src/docs/api-reference.md lists it; its api.go line citations were re-synced with check-api-reference-citations.sh --fix because two route lines were inserted. src/docs/settings.md gains a Knowledge section.

Allowlist

src/pkg/dashboard/settings_parity_allowlist.txt on origin/v5: 456 → 430 lines (−26 keys).

Deferred

  • knowledge.publish.connector, dry_run, propose_via and root are deferred. config.ValidateKnowledgePublish checks them as one block, together with the publish.layers[] list (connector, layers and root are required together), so they belong with the publish and connector list keys.
  • The list and map keys are deferred:
    • knowledge.agent_scopes.<key>.*, connectors[].*, documents[].*, git_sources[].*, layers[].* and vaults[].*;
    • code_maps.repos[].*;
    • curator.extract_from[], primer.priority[] and public.tags[];
    • publish.include_types[] and publish.layers[].

Tests

knowledge_settings_parity_test.go (mirroring governor_settings_parity_test.go) covers:

  • the PUT/GET round-trip;
  • 20 rejection cases, with a check that a rejected PUT changes nothing;
  • a partial PUT, cross-checking promote layers against the saved value;
  • restoring defaults;
  • the read-only keys being ignored;
  • validation of only the carried keys;
  • owner-only GET/PUT;
  • a check that every exposed key renders with its YAML hint and control.

owner_only_handlers_deny_test.go lists both new handlers. The parity ratchet (TestSettingsDialogReferencesEveryHiveYAMLLeaf) covers the allowlist removal. CI is the verdict.

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 requested_by=@clubanderson

…parity batch 8)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <scanner@hive.kubestellar.io>
Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 16, 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 danathar 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Oct 16, 2026
@github-actions

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
#12168 🐛 fix(hub): do not advance a stale upgrade while the spoke is still mid-rollout same files src/docs/api-reference.md
#12096 ✨ feat(evidence): add GET /api/evidence/summary same files src/docs/api-reference.md
src/pkg/dashboard/api.go
#12229 ✨ hub: owner-only cross-hive evidence view feeding the Fleet quadrant same files src/docs/api-reference.md
#12158 ✨ review: add review.shadow to record would_have_held for the review gate same files dashboard/openapi.json
src/pkg/config/config.go
src/pkg/dashboard/static/index.html

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: 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

@hivecommons-hive
hivecommons-hive Bot merged commit 9861797 into v5 Oct 16, 2026
74 of 75 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/parity-batch-8 branch October 16, 2026 09:05
@github-actions

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 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.

Reviewed — no findings from this perspective.

— hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copilot dco-signoff: yes Indicates the PR's author has signed the DCO. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants