You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seven findings, all verified against the code first. Two were real bugs:
- The non-local refusal message called new URL(cfg.databaseUrl).host to name
the host — but that branch is reached BY unparseable URLs, so it threw a
TypeError and printed a stack trace instead of the guidance. Confirmed:
`new URL("not a url")` throws. Now degrades to "unparseable DATABASE_URL".
- The entry-point guard was process.argv[1]?.endsWith("seed-dev.ts"). Rename
the file or emit it as .js and main() silently stops running: the command
exits 0 having seeded nothing. Now compares resolved paths against
fileURLToPath(import.meta.url).
The truncation table list was duplicated between scripts/seed-dev.ts and
tests/helpers/db.ts. Drift there is silent — a new table missing from one copy
leaves stale rows after --reset and fails no test. Both now import
src/db/tables.ts, and a new test asserts the list matches information_schema,
so adding a table without registering it breaks a test instead of leaking rows.
Test fix: the session-reissue assertion compared two Sets for inequality, which
passes if only one of six cookies changed. Now asserts full disjointness.
Docs: the cookie step said the "value" is the printed string, but the script
prints a full name=value assignment and devtools has separate fields — pasting
the whole line fails to authenticate. The documented id range said 91_000_0xx
while alts use 91_000_1xx; corrected to the reserved 91_000_000-91_999_999
range. And "later file first" was a confusing way to describe env precedence —
now states that Next applies its own .env.local-wins rule while the tsx scripts
get the same result from flag order.
0 commit comments