Skip to content

Make the first run real: shared embedded storage, guided setup, and a release gate that installs the tarball - #37

Merged
Phoenixrr2113 merged 4 commits into
mainfrom
feat/onboarding
Aug 22, 2026
Merged

Phoenixrr2113 merged 4 commits into
mainfrom
feat/onboarding

Conversation

@Phoenixrr2113

Copy link
Copy Markdown
Owner

Why this gates publishing

A scout ran the experiments instead of reasoning about them and found three release blockers: two processes on one embedded data directory spawned two database servers and a shutdown-order test erased an indexed graph; pnpm pack from the package directory produced a package with no server in it; and an empty database was not a working first run (500s and raw empty-key errors on both binaries, which is exactly what the first live dashboard load hit).

What changed, in five sequential waves

  1. Shared embedded storage. The first process takes an atomic owner lease and records its socket; later processes attach as clients (falkordb supports socket-path connections). One server per data directory, so Claude Code and the dashboard can share a database. Stale leases from killed owners reclaim safely, start races resolve to one owner, forged leases are rejected, version mismatches block clearly, and an owner vanishing surfaces as a plain error to attached clients. Proven by real multi-process tests including the original data-loss sequence, which now ends with the data intact.
  2. A valid first run. Empty graphs read as empty on every route and MCP action. A single setup-status contract reports storage, embedding profile, and index state. Local embeddings are the no-key default with visible download progress. Embedding profiles persist; switching providers requires an explicit migration that recreates the index at the new dimension; wrong-dimension vectors are refused at the write boundary. The built API boots from dist.
  3. Guided setup. The dashboard opens on a setup flow when nothing is configured (storage status with platform guidance, embedding profile, Browse, index with live progress, done), and configured databases open straight to the explorer. The search and query panels keep their own input and results across tab switches.
  4. A release gate that installs the tarball. The broken pack path refuses with the canonical command. The gate installs the exact tarball into a clean consumer, boots both binaries, completes a real MCP handshake, indexes and restarts each, runs both concurrently on one data directory, and proves the graph survives shutdown in both orders: 25 assertions, SHA-256 printed. CI runs it on Linux x64 and macOS arm64 plus an unsupported-platform guidance check, and a cold local-provider job that proves the real model download.
  5. Documentation that only claims what the gate proves.

Review

One adversarial round: the lease and empty-graph work survived SIGKILL, races, forged leases, and mid-query owner death. Four blockers fell in the embedding and startup layers: the migration button did not migrate, the local default failed on a clean install while the smoke hid it behind a test-only cache preload (root cause: a Response constructor mismatch in the model loader's fetch path), wrong-dimension vectors were stored silently, and an occupied port crashed with a stack trace. All fixed red-first. The full suite then caught one more regression in the scoped continuation pass, fixed at the cause.

Verification

pnpm turbo build 21/21, test 36/36, typecheck 20/20, release:check green from the exact tarball. Core 281, graph 147 plus 60 embedded integration, api 267, mcp-server 107, dashboard 75, plugin-nlp 151.

🤖 Generated with Claude Code

Phoenixrr2113 and others added 2 commits August 22, 2026 11:44
… release gate that installs the tarball

Two processes on one embedded data directory used to spawn two database
servers and silently overwrite each other; a controlled shutdown order
erased an indexed graph. The first process now takes an atomic owner
lease and records its socket; later processes attach as clients, so
Claude Code and the dashboard share one database. Stale leases from
killed owners reclaim safely, start races resolve to one owner, forged
leases are rejected, and an owner vanishing surfaces as a plain error.

An empty database is now a valid first run everywhere instead of a raw
empty-key error. The dashboard opens on a guided setup flow when nothing
is configured: storage status with platform guidance, the embedding
profile, Browse, index, and live progress, landing on the explorer when
done. Local embeddings are the no-key default with visible download
progress, after fixing a runtime Response mismatch that broke the model
loader on a clean install and that the old smoke hid by preloading a
cache. Embedding profiles persist; switching providers requires an
explicit migration that recreates the index at the new dimension, and
wrong-dimension vectors are refused at the write boundary. The query
and search panels keep their own input and results across tab
switches. The built API boots from dist, and an occupied port exits
with one plain line instead of a stack trace.

The broken pack path now refuses with the canonical command, and the
release gate installs the exact tarball into a clean consumer, boots
both binaries, completes a real MCP handshake, indexes and restarts,
runs both binaries concurrently on one data directory, and proves the
graph survives shutdown in both orders. The README documents only what
that gate proves.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The project-scoped embedding wrapper refused the Metadata read the
continuation pass performs before updating nodes, so after indexing
only the initial pass's nodes were embedded while the continuation
reported completion with per-node warnings. Operational reads pass
through; the scope applies to embeddable node queries only. The
continuation test's stub now emits vectors at the persisted dimension,
which is what surfaced this.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
v0-landing-page-build Ready Ready Preview, v0 Aug 22, 2026 4:53pm

…age as a state, not a 500

The occupied-port test leaned on macOS dual-stack behavior; the server
now binds an explicit host with its error handler attached before
listen, and the test occupies that exact host, proven on Linux as well.
On platforms without embedded storage and no external FalkorDB
configured, reads return the setup-status guidance instead of a generic
500, and the installed-package smoke mirrors the driver's platform
rules so Windows asserts the guidance path rather than an indexing flow
it cannot run.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…n MCP status

Setting exitCode left termination to natural event-loop drain, which
Linux CI under Turbo contention stretched past the test deadline; the
server now flushes its one remediation line and exits. MCP status
returned a transient starting state from background warmup instead of
awaiting the connection outcome, so unsupported platforms reported
starting where the API reported blocked with guidance.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Phoenixrr2113
Phoenixrr2113 merged commit 149f6d2 into main Aug 22, 2026
12 checks passed
@Phoenixrr2113
Phoenixrr2113 deleted the feat/onboarding branch August 22, 2026 16:59
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