Skip to content

2026-09-10 PR 378 rebase and migration regeneration

Rebased Diffsim metadata fields onto main and regenerated its migration against an isolated PostgreSQL database.

Work Done

Rebased https://github.com/virdx/mono/pull/378 in bold-flint onto main 35c28c51 after PR 381 merged. Resolved version conflicts to API/SDK/schemas 4.2.0, preserving additive minor increments over main 4.1.0. Regenerated schema families with the package script; no extra generated diff.

Deleted bad1182f1416 and ran Alembic autogenerate against disposable localhost PostgreSQL upgraded through main head f4b2c8d1a9e3. Generated unmodified 7e3b3f419973, adding only nullable diffsim_version, delta_small, delta_big. Upgrade/check/downgrade/upgrade/check passed with no pending operations. API suite 93 passed; SDK 86 passed; schemas 5 passed. Broader Nx validation remained running at report time. Commit 0a04e468 records migration regeneration after the rebase. Push uses explicit force-with-lease pinned to original remote fd782f1d3484c44b86468cb67fb4c62f0e35f7e6.

Pitfalls

Set every POSTGRES_* value explicitly: Alembic env.py overrides configured URL using settings. Never source deployment env for disposable migration validation. Main advanced migration head; changing only the old revision parent would not meet actual regeneration requirement. Check a branch switch succeeds before any rebase; an initial failed create-branch attempt was followed by an unintended PR381 rebase, immediately aborted without retained changes before switching correctly.

Improvements

Use absolute project cwd in chained Alembic commands; repeated relative cd commands accidentally nest directories. Keep raw generator output intact and prove only intended column deltas plus reversible migration behavior. Independent test-quality work stays in its separate main-based worktree.

Legacy version backfill job

Added one 12-line job in apps/vxdata-jobs/src/vxdata/jobs/f_20260910_backfill_diffsim_version/main.py. It uses the typed SDK to copy simulation_outputs.diffsim_version into a missing first-class diffsim_version, skips absent/null legacy values, and preserves existing first-class values and legacy metadata. Alembic remains unmodified. Explicit native Ruff/typecheck and an offline mocked-client behavior check passed. The job was not executed against live data.

Backfill CLI follow-up: wrapped execution in main, required –api and passed it as Client(base_url=…), batched typed update dictionaries at 512 entries with a nonempty tail. Offline checks cover import safety, missing CLI argument, URL forwarding, skipped existing/missing values, and 0/512/1025 candidate batch boundaries. Native static and affected workspace checks passed; no live execution.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close