From 70fa16f760bf0cbbb01a82cf57fc477fec4c6a05 Mon Sep 17 00:00:00 2001 From: meshcore-bot Date: Tue, 30 Jun 2026 14:30:54 -0700 Subject: [PATCH] docs(chunked_load): document RunStartupLoad orchestrator in package doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Round-1 fix (C1): the package-level doc enumerated LoadChunked, loadStatusMiddleware, and OnChunkLoaded but never mentioned RunStartupLoad — the orchestrator that gates the bg loader on LoadChunked completion (#1809). Add it so future readers can find the entry point without grepping main.go. Pure doc change. Refs #1809, PR #1811. --- cmd/server/chunked_load.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/server/chunked_load.go b/cmd/server/chunked_load.go index 143044e4..bc5af4eb 100644 --- a/cmd/server/chunked_load.go +++ b/cmd/server/chunked_load.go @@ -8,6 +8,12 @@ package main // first chunk is merged into the store, FirstChunkReady is closed. // main.go binds the HTTP listener on that signal and serves // partial data while remaining chunks stream in the background. +// * RunStartupLoad is the orchestrator: it runs LoadChunked +// synchronously, then on success runs loadBackgroundChunks +// synchronously so s.oldestLoaded is guaranteed set before the +// background loader reads it (#1809). main.go typically invokes +// RunStartupLoad inside its own goroutine and waits on +// FirstChunkReady() in parallel to bind the HTTP listener. // * loadStatusMiddleware stamps X-CoreScope-Load-Status on every // response: "loading; progress=" until LoadComplete() // reports true, then "ready". Dashboards and probes can read the