Repository navigation
✨ knowledge: refresh inbox sources and surface reload errors after connector hot-load - #18135
Merged
kubestellar-prow[bot] merged 1 commit intoNov 13, 2026
Merged
Conversation
…nnector hot-load Follow-up to #18099 (Syncer.Reconfigure hot-load), porting the two pieces #18100 had that #18099 left out: - The Inbox follows the live connector set. boot.reloadKnowledgeConnectors rebuilds the Inbox sources (inbox.Service.SetSources) after every dashboard save that reached the runtime, so a Plaud/WisprFlow connector added through the dashboard feeds GET /api/inbox at once, and removing the last one drops it. bootKnowledgeConnectors does the same once the boot syncer exists, so the direct Plaud read path (PreferDirect) is attached at boot instead of the fact-only fallback the Inbox had because it boots ahead of the syncer. - A save the running syncer refused is reported. The PUT still persists the config, but the response now carries runtime_error verbatim (plus runtime, with the status endpoint's meaning), and kcSave rejects with 'saved, but the running syncer did not reload: ...' so the toast says so instead of a plain success. Refs #18091 Signed-off-by: Andy Anderson <andy@clubanderson.com>
Contributor
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: 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 |
kubestellar-prow
Bot
deleted the
feat/knowledge-connectors-hotload-followup
branch
November 13, 2026 22:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #18099 (hot-load of the knowledge connector syncer via
Syncer.Reconfigure), porting the two remaining pieces of #18100 onto the #18099 design (no factory /Apply; boot'sreloadKnowledgeConnectorsstays the single owner of the syncer lifecycle).1. The Inbox follows the live connector set. Connectors that feed the Inbox were attached once in
bootInbox, so a Plaud/WisprFlow connector added from the dashboard never showed in the Inbox until a restart.inbox.Service.SetSources/HasSourcereplace the source map at runtime (src/pkg/inbox/service.go).boot.inboxSources/boot.refreshInboxSourcesbuild sources from an explicit entry list + syncer (src/cmd/hive/boot_inbox.go).boot.reloadKnowledgeConnectorscalls it after a successful reconfigure, after a hot-load build, and when the list is emptied;bootKnowledgeConnectorscalls it once the boot syncer exists.inboxSourcepreviously always sawb.knowledgeConnectors == niland the direct Plaud read path (PreferDirect) was never attached at boot. It now is (same as ✨ knowledge: hot-load connector syncer on dashboard config changes #18100). Hives not signed in to Plaud are unchanged (Readygates the direct path).2. A save the running syncer refused is surfaced. The config is already persisted when
Reconfigurefails, so the PUT now answers 200 withruntime_error(the reload error verbatim) andruntime(same meaning as the status endpoint: a syncer is running).kcSaverejects withsaved, but the running syncer did not reload: <error>so every caller's existing catch handler toasts it instead of the plain success.Server.reloadKnowledgeConnectorsnow returns the error; the previous runtime is kept as before.No new
Dependenciesfield:ReloadKnowledgeConnectorsfrom #18099 already routes into boot, which is where the Inbox lives.Refs #18091 (follow-up to #18099, ports the remaining pieces of #18100)
Tests
src/pkg/inbox/service_sources_test.go(from ✨ knowledge: hot-load connector syncer on dashboard config changes #18100):SetSourceswires, replaces and drops sources;Itemspicks the new set up on the next call.src/cmd/hive/boot_inbox_sources_test.go: a hive booted with zero connectors gains the Inbox plaud source onreloadKnowledgeConnectors(as*inbox.PreferDirect) and loses it when the list is emptied; a hive booted with a Plaud connector attachesPreferDirect, notFactSource.src/pkg/dashboard/api_knowledge_connectors_hotload_test.go:TestKnowledgeConnectorsPutReportsRuntimeError: a failing reload still persists the config, answersruntime_errorverbatim withruntime: true, and keeps the previous runtime; a clean reload has noruntime_error.src/pkg/dashboard/knowledge_connector_reload_error.test.js(node --test):kcSaverejects with the saved-but-not-reloaded message after refreshing the list, the rejection reaches a caller toast verbatim, clean saves resolve, emptyruntime_erroris not an error, non-2xx still reports the server error.static/index.htmlregenerated withgo generate ./pkg/dashboard/webstatic/; notime.Sleepadded; citation guard reports no drift.Not run locally per repo policy; CI is the gate.
🤖 Generated with Claude Code