Commit fb1ea10
fix(db): repair merged duplicate in waitForDbReadiness
Two implementations had been spliced together: `if (result.healthy) {` was
opened and never closed, followed by a second check that assigned the result
object to `healthy` and tested it for truthiness — which is always true, since
checkDbHealth returns HealthCheckResult rather than a boolean.
Kept the single correct check. src/db/health.test.ts asserts exactly two pool
queries for "resolves after the database becomes reachable", which only holds
with one health call per attempt. The `dbModule` self-import existed solely for
the duplicated call and is now unused, so it goes too.
This file compiles again; contact.ts, migration.test.ts and transactions.ts
remain broken and are tracked as Stage 3 work.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 91d17cf commit fb1ea10
1 file changed
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
146 | 145 | | |
147 | 146 | | |
148 | 147 | | |
149 | | - | |
150 | | - | |
151 | 148 | | |
152 | 149 | | |
153 | 150 | | |
| |||
0 commit comments