Skip to content

feat: host EdgeQuake on Databricks Apps with Lakebase and MLflow - #508

Draft
raphaelmansuy wants to merge 11 commits into
edgequake-mainfrom
cursor/databricks-support-study-69f4
Draft

raphaelmansuy wants to merge 11 commits into
edgequake-mainfrom
cursor/databricks-support-study-69f4

Conversation

@raphaelmansuy

@raphaelmansuy raphaelmansuy commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Description

Lakebase checks tenant_access_guard when the document row is written. current_tenant_id() has to be set in that same statement. Setting it on an earlier statement left the check empty, so dedup reserve still failed with new row violates row-level security policy "tenant_access_guard".

Document, chunk, task, shell, and entity inserts now call set_config in the insert statement. Rows with no tenant keep the previous statement. Superuser sessions still bypass the policy.

Deployed snapshot 01f1cd36fcb61b02b6b803f8547e42ed. Highest glibc symbol is 2.34. Boot report: ldd clean, ui-ready 200, exit=None, app RUNNING.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (describe below)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes

Additional context

On Lakebase, an insert as edgequake_tenant_access succeeded when set_config ran inside the insert, after the tenant id had been cleared. cargo test -p edgequake-tasks --lib 183 passed. cargo test -p edgequake-storage --lib 294 passed.

Open in Web Open in Cursor 

cursoragent and others added 3 commits October 21, 2026 02:29
Record live probe results for Postgres 18.6, pgvector 0.8.6, and AI Gateway chat and embeddings, plus a code-grounded plan that reuses the SPEC-164 plain graph.

Co-authored-by: Raphael MANSUY <raphael.mansuy@gmail.com>
Mint a Lakebase password for each new pool connection, speak the MLflow chat and embeddings API, and add an App launcher. Docker keeps the static DATABASE_URL path.

Co-authored-by: Raphael MANSUY <raphael.mansuy@gmail.com>
Apps inject DATABRICKS_HOST without a scheme and the app role cannot
ALTER a schema an admin already migrated. The launcher normalizes the
host, keeps the boot log when the binary exits, and starts the server
before migrate. Production CORS is the app origin.

Co-authored-by: Raphael MANSUY <raphael.mansuy@gmail.com>
@cursor cursor Bot changed the title docs: SPEC-165 Databricks Apps, Lakebase, and AI Gateway study feat: host EdgeQuake on Databricks Apps with Lakebase and MLflow Oct 21, 2026
cursoragent and others added 8 commits October 21, 2026 07:31
The API has no route for GET /, so a signed-in browser showed a 404.
The launcher keeps the public port and returns the home page there,
and forwards every other path to the API on an internal port.

Co-authored-by: Raphael MANSUY <raphael.mansuy@gmail.com>
The Databricks launcher starts the Next.js app beside the API and
forwards browser routes to it. Sign-in returns to the app instead of
the API reference.

Co-authored-by: Raphael MANSUY <raphael.mansuy@gmail.com>
Databricks Apps set DATABRICKS_HOST, so the settings picker can offer
Llama 4 Maverick and GTE large when that host is present.

Co-authored-by: Raphael MANSUY <raphael.mansuy@gmail.com>
The public proxy forwarded the live socket as a normal HTTP request and
dropped the Upgrade header. The API answered 400, the browser reported
the connection lost, and the tenant request on that connection failed.

Co-authored-by: Raphael MANSUY <raphael.mansuy@gmail.com>
/health is public, so the header shows API v0.36.0, but /api/v1/tenants
returns 401 unless the EdgeQuake bearer arrives. The Apps proxy replaces
Authorization, so the launcher stores that bearer in a cookie and puts it
back on the internal request.

Co-authored-by: Raphael MANSUY <raphael.mansuy@gmail.com>
/health is public, so the header shows API v0.36.0, while /api/v1/tenants
returns 401 when the EdgeQuake bearer is missing. The page now copies that
bearer into X-EdgeQuake-Authorization and the launcher restores it on the
internal request.

Co-authored-by: Raphael MANSUY <raphael.mansuy@gmail.com>
FORCE RLS rejects autocommit inserts because current_tenant_id() dies
when the statement ends. Superuser sessions keep the existing statements.
A Lakebase service principal sets the tenant inside the same transaction
for documents, chunks, tasks, and the entity sink.

Co-authored-by: Raphael MANSUY <raphael.mansuy@gmail.com>
Lakebase checks tenant_access_guard when the row is written. A tenant
id set by an earlier statement is not visible to that check, so the
document insert still failed. The insert now calls set_config itself.

Co-authored-by: Raphael MANSUY <raphael.mansuy@gmail.com>

This branch has not been deployed

No deployments
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.

2 participants