From 4f913da0b1d8fc5af5c020cd8256a2c97d4dcf5f Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Sat, 17 Oct 2026 22:51:55 -0400 Subject: [PATCH] =?UTF-8?q?chore(db):=20schema.go=20searches=20three=20lev?= =?UTF-8?q?els=20up=20=E2=80=94=20replaces=20the=20tests-dir=20symlink?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Host-side test runs use CWD=cmd/server/tests, three levels below the repo root; the location search only went up two, so it never found database/schema/schema.sql from there and init() fatal-exited. That gap was being papered over by an untracked local symlink (cmd/server/tests/database -> ../../../database) hidden behind a bare `database` line in .git/info/exclude — which also broke `git add` under database/. Fix the search list instead and drop the filesystem trick: no symlink to commit, no exclude hack, works on any platform. Verified: contract pins green from cmd/server/tests with no symlink present (init resolves via the new entry); parse test green. --- internal/database/schema.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/database/schema.go b/internal/database/schema.go index ae7abe80..f092137d 100644 --- a/internal/database/schema.go +++ b/internal/database/schema.go @@ -25,6 +25,9 @@ func init() { "/app/database/schema/schema.sql", "../database/schema/schema.sql", "../../database/schema/schema.sql", + // Integration tests run with CWD=cmd/server/tests, three levels + // below the repo root — two up only reaches cmd/. + "../../../database/schema/schema.sql", } var content []byte