feat: always-on remote node — MCP over HTTP, TLS/token, Docker, CI, sqlc #9

Merged
david merged 14 commits from feat/remote-node into main 2026-11-05 02:14:34 +00:00
Showing only changes of commit 24d28c4cc5 - Show all commits
+11 -6
View File
@@ -233,16 +233,21 @@ func (w *Watcher) Start() error {
snippetTicker := time.NewTicker(snippetInterval) snippetTicker := time.NewTicker(snippetInterval)
gossipTicker := time.NewTicker(gossipInterval) gossipTicker := time.NewTicker(gossipInterval)
// A node that only replicates peers (a server with none of the local // Derivation always runs. Threads and snippets are computed from rows that
// sources) skips the ingest/derive tickers entirely. Nil channels block // are already in the log, so a replica needs them exactly as much as the
// forever, so the select simply never fires for them. // origin does — gating them with the ingesters left a replica with an
var browserC, giteaC, gitC, opencodeC, karakeepC, healthC, threadC, snippetC <-chan time.Time // almost empty thread list while the data sat right there.
threadC, snippetC := threadTicker.C, snippetTicker.C
// Ingestion only runs where the sources exist. A node with no local
// sources (KNOX_LOCAL_SOURCES=none) leaves these nil: nil channels block
// forever, so the select never fires for them.
var browserC, giteaC, gitC, opencodeC, karakeepC, healthC <-chan time.Time
if LocalSourcesEnabled() { if LocalSourcesEnabled() {
browserC, giteaC, gitC = browserTicker.C, giteaTicker.C, gitTicker.C browserC, giteaC, gitC = browserTicker.C, giteaTicker.C, gitTicker.C
opencodeC, karakeepC, healthC = opencodeTicker.C, karakeepTicker.C, healthTicker.C opencodeC, karakeepC, healthC = opencodeTicker.C, karakeepTicker.C, healthTicker.C
threadC, snippetC = threadTicker.C, snippetTicker.C
} else { } else {
log.Printf("[knox] KNOX_LOCAL_SOURCES=none: gossip-only mode, local ingest disabled") log.Printf("[knox] KNOX_LOCAL_SOURCES=none: local ingest disabled, derivation still active")
} }
var browserRunning, giteaRunning, gitRunning, threadRunning, gossipRunning atomic.Bool var browserRunning, giteaRunning, gitRunning, threadRunning, gossipRunning atomic.Bool
var opencodeRunning, karakeepRunning, healthRunning, snippetRunning atomic.Bool var opencodeRunning, karakeepRunning, healthRunning, snippetRunning atomic.Bool