Skip to content

Restore dev-proxy HTTP client mode (broken by #927) #955

Closed

Description

@malibio

Problem

PR #927 (SurrealDB 3.x upgrade) switched dev-proxy from HTTP client mode to embedded RocksDB mode to work around an HTTP session state bug in the SurrealDB 2.x SDK. This broke the intended dev workflow:

Before #927:

  • surreal start runs on port 8000
  • dev-proxy connects to it via HTTP (HttpStore::new_http)
  • CLI, Surrealist, and dev-proxy all share the same server
  • REBUILD INDEX, INFO FOR TABLE, etc. all work via CLI

After #927:

  • dev-proxy opens RocksDB directly (exclusive file lock)
  • surreal start in demo:browser script is unused/misleading
  • CLI cannot connect while proxy is running
  • No way to inspect or rebuild indexes via CLI

Root Cause

The HTTP session state bug was a SurrealDB 2.x SDK issue. We are now on SurrealDB 3.x where this is no longer a problem.

Fix

Restore dev-proxy to HTTP client mode:

  • SurrealStore::new_http("127.0.0.1:8000", ...) instead of SurrealStore::new(db_path)
  • NODESPACE_DEV_DB_PATH env var becomes unused (proxy connects to server, not file path)
  • demo:browser script already starts surreal start on port 8000 — proxy just needs to connect to it

Acceptance Criteria

  • bun run demo:browser starts SurrealDB server + proxy + frontend
  • dev-proxy connects to SurrealDB server via HTTP (not embedded RocksDB)
  • CLI can connect to port 8000 while proxy is running
  • REBUILD INDEX and INFO FOR TABLE work via CLI
  • All existing proxy functionality works (MCP, SSE, node CRUD)

Activity

  1. added
    bug
    on Mar 14, 2026
  2. malibio commented on Mar 14, 2026

    @malibio
    CollaboratorAuthor

    Baseline before implementation: 117 test files passed, 3705 tests passed.

  3. self-assigned this
    on Mar 14, 2026
  4. added 2 commits that reference this issue on Mar 14, 2026
    dc58ecb
    a22a127
  5. added a commit that references this issue on Mar 14, 2026
    fdefef0
  6. added a commit that references this issue on Jun 22, 2026
    aa172ac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

backendbug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions