Files
OmniRoute/tests
Diego Rodrigues de Sa e Souza 764a4aee02 fix(base-red): fix execArgv test-env leak masking mass-migration abort + heal legacy refresh_token before index
Two independent bugs, not migration 126:

1. tests/unit/db-migration-runner.test.ts and
   tests/unit/migration-safety-abort-6260.test.ts: withNonTestEnvironment()
   only sanitized process.argv, not process.execArgv. #7359 made
   isAutomatedTestProcess() also scan execArgv (to catch `node --test`), so
   under the node:test runner execArgv always retains `--test` and the
   "simulate a non-test environment" helper became a no-op. The
   mass-migration safety-abort check (gated on !isTestEnvironment) never
   fired, migrations ran for real, and hit the hardcoded version-032
   apikey-lifecycle special case against fixtures that never created
   api_keys — surfacing as "no such table: api_keys" instead of the
   expected MigrationSafetyAbortError. Fix: also strip test-token args from
   process.execArgv in the test helper.

2. tests/unit/db-core-init.test.ts: SCHEMA_SQL created
   idx_pc_auth_active_refresh on provider_connections(refresh_token)
   unconditionally, before ensureProviderConnectionsColumns() ran its
   column-healing pass — and that function never healed refresh_token in
   the first place. A legacy provider_connections table predating that
   column (simulated by the "max_concurrent column is healed" fixture)
   fails startup with "no such column: refresh_token" instead of healing.
   Fix: move the index into ensureProviderConnectionsColumns(), after
   adding a defensive refresh_token backfill.
2026-07-18 22:24:55 -03:00
..
2026-05-23 01:46:59 -03:00
2026-07-13 09:12:40 -03:00
2026-07-02 10:47:13 -03:00
2026-07-06 02:25:17 -03:00
2026-07-13 09:12:40 -03:00
2026-06-13 17:27:40 -03:00