Skip to content

fix(api): unblock V23 generation input backfill - #15

Merged
qyinm merged 1 commit into
mainfrom
fix/v23-generation-input-backfill
Aug 19, 2026
Merged

fix(api): unblock V23 generation input backfill#15
qyinm merged 1 commit into
mainfrom
fix/v23-generation-input-backfill

Conversation

@qyinm

Copy link
Copy Markdown
Contributor

Summary

Unblocks the production API by allowing Flyway V23 to enrich legacy generation_inputs rows with their already-recorded generation-run provenance. The append-only safeguard is restored immediately after the one-time backfill.

Why

Production startup repeatedly failed while applying V23 because the existing generation_inputs append-only trigger rejected its required legacy-row update. This kept the Kotlin API unavailable and caused account-dependent Plot API calls to return 503.

The alternatives were to roll back later releases, change the schema migration itself, or add a web-only Better Auth fallback. This PR fixes the migration because it removes the direct outage cause while preserving immutability for normal application writes. A web fallback remains useful resilience work, but would not restore the API. The accepted tradeoff is a tightly scoped, transactional trigger pause during this historical backfill.

Changes

  • Disable the generation_inputs append-only trigger only around V23 legacy provenance backfill, then re-enable it before the migration completes.
  • Add an integration regression test that migrates populated V22 data to V23 and proves subsequent updates remain rejected.
  • Validated with the targeted migration test, just verify-jooq, full generated JUnit report scan (69 reports, no failures/errors), git diff --check, and post-deploy Fly health/API checks.

@vercel

vercelBot commented Aug 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
plot-webReadyReadyPreviewAug 19, 2026 8:39am

@qyinm
qyinm marked this pull request as ready for review August 19, 2026 08:40
@qyinm
qyinm merged commit 77c8ab8 into mainAug 19, 2026
4 checks passed
@qyinm
qyinm deleted the fix/v23-generation-input-backfill branch August 19, 2026 08:54
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@qyinm