Files
OmniRoute/docs/reference
diegosouzapw e712a6e011 fix(db): keep the migration gate tests green once real timestamped files exist
The final verification found that the first real timestamped migration
would have turned three of the new tests red:
- the generator test checked the real directory with a fixed clock
  (2026-11-13T12:00Z), so any real migration dated later read as "in the
  future". It now uses one second after the newest real stamp;
- two gate e2e tests copied every real migration into their synthetic
  bases, so the fixed synthetic stamps were no longer the newest. The
  synthetic bases now take only the legacy NNN_ files.
Both files honor OMNIROUTE_TEST_MIGRATIONS_SOURCE_DIR and joined the guard
test that re-runs them against a copy holding a real timestamped migration.
Without the fix that guard fails on exactly those three tests.

The self-contained gate e2e copies src with dereference, so a symlinked
checkout can never receive the test's constants.ts writes.

--base-latest-tag:
- in a repository with no pure vX.Y.Z tag (the Enterprise one only carries
  vX.Y.Z-ee.N tags) it compares with the newest -ee tag instead of failing;
- against a tag, every file since it is already merged, so the gate and the
  checker (new --merged-base flag) say "fix forward with a new migration"
  instead of "rename" or "new stamp".

MIGRATION_BASE_REF and MIGRATION_COMMUTATION_SCRIPT (test-only) are
documented in .env.example and ENVIRONMENT.md. CODEBASE_DOCUMENTATION.md
and two test messages no longer talk about sequential numbers. A stale
contract comment in migration-commutation.ts now names C1.
2026-11-13 23:46:52 -03:00
..
2026-07-13 09:12:40 -03:00