Files
member-console/openspec/changes
cgalo5758 40ce2d3d7f Read the database's -file key in every command that opens the database
Second section of #23, a quick fix listed in its change. Only start and
config validate resolved db-dsn-file, so migrate, config list|set|clear
and seed-demo, run in a container that mounts the connection string as a
file, found no string and let the driver connect with its defaults. They
now resolve the database's secret pair before opening it, and openDB
refuses an empty db-dsn ("db-dsn is not set (MC_DB_DSN or
MC_DB_DSN_FILE)") before it opens anything. connectSettings returns its
error, so a test can call it; the config commands print it as before.

TestDatabaseCommandsReadTheFileKeys runs migrate up, down and status,
connectSettings and seed-demo with only db-dsn-file set, naming a closed
port, and expects the connection failure; with neither key set it
expects the refusal. It blanks MC_DB_DSN and MC_DB_DSN_FILE, so the rows,
migrate down among them, never reach a real database.

Full suite on reset databases: 4207 pass, 15 skip. make lint passes.

Deliberate breaks, scripts/mutation-check -side new, all CAUGHT (6):
  migrate up, migrate down, connectSettings and seed-demo each without
  resolveDatabaseSecretFiles
  openDB without the empty db-dsn check
  resolveDatabaseSecretFiles resolves an empty list
2026-10-23 06:06:40 -04:00
..