Store the registry in PostgreSQL in production - #1
Merged
Merged
Conversation
Replace the synchronous SQLite-only store with an async store that uses PostgreSQL when DATABASE_URL is set and SQLite otherwise. Every caller (HTTP routes, site renderer, operations dispatch, conformance script, tests) now awaits the store. The registry contract tests run against both backends; CI adds a Postgres service. Health reports the active storage backend. Deployment docs describe the self-hosted Railway Postgres setup. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DATABASE_URLis set, SQLite otherwise (local dev and tests)./healthzreports"storage": "postgres" | "sqlite".W3BS_TEST_DATABASE_URLis set; CI adds apostgres:18-alpineservice..env.exampledescribe the self-hosted Railway Postgres service. No app volume is needed anymore.Test plan
npm teston SQLite: 14 passnode --test test/core.test.mjswith a local Postgres 18 container: 12 pass, including the 3[postgres]casesDATABASE_URL: health showsstorage: postgres, 10 seeded resources,/prompts200, resolve returns the canonical manifestnpm run check,npm run conformance(evidence regenerated),npm run test:browser(8 pass)🤖 Generated with Claude Code