Point the test at the database the project actually has - #234
Open
zopeVaibhav wants to merge 1 commit into
Open
Conversation
zopeVaibhav
requested review from
MikeRyanDev,
davidmckayv,
guidovizoso and
tylerslaton
as code owners
August 24, 2026 19:05
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.
Closes #233
What this changes
server/tests/server-side-tools.integration.test.tsfell back topostgres://openkai:openkai@localhost:5432/openkaiwhenDATABASE_URLwas not set. No user, password or database by that name exists indocker-compose.ymlor.env.example, and the string appears nowhere else in the tree. It now saysopenbot, like the twenty-five other test files that carry the same fallback.The failure only showed up when the file was run from inside
server/. Bun reads.envfrom the working directory,DATABASE_URLis set in the repository's root.env, and there is noserver/.env— so the fallback fires there and nowhere else. Every other file's fallback was already correct, so the whole suite was green from the root and green in CI while this one file failed for anyone who ran it from the workspace it lives in.What they saw was
password authentication failed for user "openkai", plus a Drizzle error from theafterAllcleanup pointing atplugin_grants. Neither names the real cause, and nothing else in the project mentionsopenkaito search for.Deliberately left alone: the DSN is still written out twenty-six times. Giving it one home in
server/tests/support/— next toTEST_POOLindatabase.tsandtestEnvironment()inenvironment.ts— is the change that stops this recurring, but it touches twenty-six files and is a separate call. Happy to send it if wanted.Where it runs
Boundary and audit
Changelog
No
CHANGELOG.mdentry. A deployment behaves no differently afterwards — the change is a fallback value inside a test file, reached only whenDATABASE_URLis unset, which never happens in a running deployment.Proof
Before, from
server/withDATABASE_URLunset:After, same command, same shell:
Note the count: the file has five tests, and before the fix only two of them were reported at all.
Full server suite from
server/,DATABASE_URLstill unset — the run that used to carry the two failures:bun run typecheckpasses acrossapp,serverandworker.bun run lintreports no findings on 421 files.