Skip to content

Gate server readiness on initial datasource discovery#224

Merged
samcm merged 2 commits into
masterfrom
feat-server-readiness-gate
Jun 17, 2026
Merged

Gate server readiness on initial datasource discovery#224
samcm merged 2 commits into
masterfrom
feat-server-readiness-gate

Conversation

@samcm

@samcm samcm commented Jun 16, 2026

Copy link
Copy Markdown
Member

Two server-startup improvements (rebased onto master after #228/#222 merged).

The server's /ready returned 200 as soon as the HTTP listener was up — before the proxy completed its first datasource discovery — and panda init/server start waited on the equally-unconditional /health, so they reported ready while /api/v1/datasources was still empty. This tracks a per-proxy discovery flag exposed via proxy.Service.Ready() (the router reports its primary external proxy, or all locals when there's no external one), gates /ready on it, and switches the init/start wait to /ready; /health stays for liveness. Crucially, Ready() also returns true when discovery is blocked waiting for the user to authenticate — the server is up and can do no better unattended, so a yet-to-auth user never wedges the wait at 503; only transient discovery failures keep it not-ready.

It also logs document-level progress of the (still synchronous) search-index build, so operators can watch it advance in panda server logs: the embedder reports documents embedded as it works and searchruntime attributes it to the current stage, e.g. Embedding search index stage=runbooks embedded=450 total=1200".

@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

🐼 Smoke eval — 1db6c4d: ✅ 6/6 pass

📊 Interactive report — tokens p50 13,774 · tokens/solve 14,324.

Reference points: v0.33.0 100% · feat-server-readiness-gate@25ec97f 100% · master@25a1784 100%.

question result tokens tools
forky_node_coverage 12,256 3
tracoor_node_coverage 12,785 3
mainnet_block_arrival_p50 17,538 15
list_datasources 11,467 1
block_count_24h 17,134 13
missed_slots_24h 14,764 6
🔭 Langfuse traces (6 runs; ⚠️ = failed)

The report walks this branch's commits against the master baseline and the most recent release. A self-contained copy is in the run's eval-smoke-* artifact.

samcm added 2 commits June 17, 2026 12:30
The server's /ready endpoint returned 200 as soon as the HTTP listener
was up, before the proxy completed its first datasource discovery, and
'panda init'/'server start' waited on the equally-unconditional /health —
so they declared the server ready while /api/v1/datasources was still
empty.

Track a per-proxy discovery flag exposed via proxy.Service.Ready() (the
router reports its primary external proxy, or all local proxies when
there is no external one), gate /ready on it, and switch the init/start
wait to poll /ready. /health stays unconditional for liveness.

Ready() also returns true when discovery is blocked waiting for the user
to authenticate: the server is up and can do no better unattended, so a
yet-to-auth user does not wedge the wait at 503. Only transient discovery
failures keep it not-ready.
The semantic-search index build stays on the startup path (synchronous),
but now logs document-level progress so operators can watch it advance in
'panda server logs'. The remote embedder reports documents embedded as it
works (per cache phase and per batch) via an OnProgress callback, and
searchruntime attributes that to the current stage, logging e.g.
"Embedding search index stage=runbooks embedded=450 total=1200".
@samcm samcm force-pushed the feat-server-readiness-gate branch from af27bbe to 1db6c4d Compare June 17, 2026 02:30
@samcm samcm merged commit e56f413 into master Jun 17, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant