Pin the autovacuum dialect guard with a test #210

Merged
paulhitt merged 1 commits from test/autovacuum-dialect-regression into main 2026-09-21 15:32:09 +00:00
paulhitt commented 2026-09-21 12:22:41 +00:00 (Migrated from gitlab.com)

The dialect guard is already on main. The test that would have caught its absence is not, so nothing stops the same mistake being made again.

TuneUserDataAutovacuum emits a PL/pgSQL DO $$ block. SQLite also conforms to SQLDatabase, so the original guard — a plain as? any SQLDatabase — passed on SQLite and fed it a block it cannot parse. Fluent turns a failed migration into a process exit at boot, so every SQLite-backed relay in the fleet crash-looped while the Postgres one beside them stayed healthy and the deploy gate reported the fleet OK.

Four cases, each pinning a different part of the failure

  • the whole boot schema migrates cleanly on SQLite — the shape that actually broke
  • the migration applied alone is a no-op rather than an error, so a failure names this migration instead of whichever runs first
  • the SQLite dialect still reports the literal the guard compares against, because a rename would silently skip Postgres too and the tuning would then never be applied anywhere
  • the migration is still registered in the boot list, since a Postgres-only migration has to stay safe to register everywhere

Falsified, not assumed

Guard Result
main as it stands 4 tests pass
dialect check removed run does not pass — dies with an assertion, the same class of failure the fleet hit

Note on !145

This supersedes the test portion of !145. That branch predates ~122 files of main and merging it would revert thousands of lines, so it should be closed rather than merged — its migration and the docs/PLAINTEXT.md correction are already on main by another route. This carries across the one thing that was not.

The dialect guard is already on `main`. The test that would have caught its absence is not, so nothing stops the same mistake being made again. `TuneUserDataAutovacuum` emits a PL/pgSQL `DO $$` block. SQLite also conforms to `SQLDatabase`, so the original guard — a plain `as? any SQLDatabase` — passed on SQLite and fed it a block it cannot parse. Fluent turns a failed migration into a process exit at boot, so **every SQLite-backed relay in the fleet crash-looped** while the Postgres one beside them stayed healthy and the deploy gate reported the fleet OK. ### Four cases, each pinning a different part of the failure - the whole boot schema migrates cleanly on SQLite — the shape that actually broke - the migration applied alone is a no-op rather than an error, so a failure names *this* migration instead of whichever runs first - the SQLite dialect still reports the literal the guard compares against, because a rename would silently skip Postgres too and the tuning would then never be applied anywhere - the migration is still registered in the boot list, since a Postgres-only migration has to stay safe to register everywhere ### Falsified, not assumed | Guard | Result | |---|---| | main as it stands | 4 tests pass | | dialect check removed | run does **not** pass — dies with an assertion, the same class of failure the fleet hit | ### Note on !145 This supersedes the test portion of !145. That branch predates ~122 files of `main` and merging it would revert thousands of lines, so it should be closed rather than merged — its migration and the `docs/PLAINTEXT.md` correction are already on `main` by another route. This carries across the one thing that was not.
paulhitt commented 2026-09-21 12:22:53 +00:00 (Migrated from gitlab.com)

mentioned in merge request !145

mentioned in merge request !145
paulhitt commented 2026-09-21 14:12:56 +00:00 (Migrated from gitlab.com)

added 2 commits

  • b38480bf - 1 commit from branch main
  • 9d070822 - Pin the autovacuum dialect guard with a test

Compare with previous version

added 2 commits <ul><li>b38480bf - 1 commit from branch <code>main</code></li><li>9d070822 - Pin the autovacuum dialect guard with a test</li></ul> [Compare with previous version](/paulhitt/flamenet-relay/-/merge_requests/147/diffs?diff_id=2041668862&start_sha=11bd0278c051e6b9d0a809fef82cf1bd98e635cf)
paulhitt commented 2026-09-21 15:32:09 +00:00 (Migrated from gitlab.com)

mentioned in commit 30d530025e

mentioned in commit 30d530025eee70d3407ab669ad937497845495b8
paulhitt (Migrated from gitlab.com) merged commit 30d530025e into main 2026-09-21 15:32:09 +00:00
Sign in to join this conversation.