HOTFIX: mig 134 violates paliad_proceeding_code_shape (paliad.de offline, crash-loop) #130
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Incident
paliad.de is offline. Container
compose-transmit-multi-byte-driver-v7jth9-web-1on mlake is crash-looping every ~65s since 2026-05-26 12:48 UTC, immediately after the Slice B1 deploy (commit426b90b).Diagnosis
internal/db/migrations/134_berufung_unification.up.sqlline 89 attempts to insertcode = 'upc.apl'intopaliad.proceeding_types. The table carries this check constraint (pre-existing, unchanged):upc.aplhas only 2 dot-segments and fails the check. The whole migration TXN rolls back on every retry, so the DB is unchanged from pre-deploy state.Fix
Rename the unified Berufung code from
upc.apltoupc.apl.unified(3 segments, satisfies the constraint, preserves the design intent). The constraint stays as-is — it enforces a useful jurisdiction.category.specific shape across the catalog.Files to edit
internal/db/migrations/134_berufung_unification.up.sql— replace all'upc.apl'string literals with'upc.apl.unified'(lines 89, 123, 191, 224, 243, and any RAISE NOTICE messages that quote the literal — keep prose mentions readable). Checkgrep -n "'upc\.apl'" 134_berufung_unification.up.sql.internal/db/migrations/134_berufung_unification.down.sqlline 47 —DELETE FROM paliad.proceeding_types WHERE code = 'upc.apl';→ use'upc.apl.unified'.frontend/src/verfahrensablauf.tsxline 42 —{ code: "upc.apl", ... }→"upc.apl.unified".frontend/src/client/verfahrensablauf.tslines 67 and 81 —"upc.apl"→"upc.apl.unified".frontend/src/i18n-keys.tsline 1520 —"deadlines.upc.apl"→"deadlines.upc.apl.unified".frontend/src/client/i18n.ts— find bothdeadlines.upc.aplkeys (DE + EN translation rows added by mig 134's frontend changes) and rename todeadlines.upc.apl.unified.pkg/litigationplanner/types.goline 185 — prose comment, can stay asupc.apl.unifiedfor accuracy.Do NOT change prose-only mentions in comments / docstrings that aren't string literals — they're descriptive.
Acceptance
grep -n "'upc\.apl'\|\"upc\.apl\"" internal/ frontend/ pkg/returns zero hits (only the 3-segment form remains).go build ./...andcd frontend && bun run buildclean.go test ./...green.ssh mlake "docker ps --filter name=compose-transmit-multi-byte"shows Up, not Restarting).Why
The check constraint
paliad_proceeding_code_shapeis a long-standing invariant. Cronus's Slice B1 design assumed a 2-segment code without grepping the constraint first. The fix preserves both the constraint and the design intent.Priority: production-down. No design choices to revisit — just rename and ship.
Verified fixed in the migration, not stepped past
What I ran — repo greps plus read-only queries against prod.
The constraint violation is fixed in mig 134 itself
internal/db/migrations/134_berufung_unification.up.sqlinserts'upc.apl.unified'(line 99), and every other code literal in the file is 3-segment: lines 113, 133, 144, 158, 179, 187, 195. The rename was applied to the migration, not worked around downstream.Acceptance 1 passes.
grep -rnE "'upc\.apl'|\"upc\.apl\"" internal/ frontend/src/ pkg/returns exactly one hit, and it is a prose comment in155_upc_apl_resplit.up.sqldescribing a pre-flight check — not a string literal. The issue explicitly excluded prose mentions.The constraint is intact and was never relaxed
Unchanged on prod.
upc.apl.unifiedsatisfies it. The fix preserved the invariant, as the issue intended.It applied cleanly on prod
The issue reports the crash-loop starting 12:48 UTC, so the outage ran roughly 33 minutes.
One thing worth knowing before closing
Mig 155 later reversed what mig 134 built, on m's own ruling (Q5, 2026-05-27: "Reverse the unification… they are actually different proceedings!"). Applied 2026-05-27 13:09:00. Current prod state:
upc.apl.meritsupc.apl.costupc.apl.orderupc.apl.unifiedSo the hotfix is real and permanent — the code shape is still correct in the migration file and the constraint still holds — but the feature it unblocked no longer exists. That does not reopen anything; it just means nobody should go looking for
upc.apl.unifiedin the product.What I could not verify
The container-status half of acceptance 5 (
ssh mlake docker ps). I have no shell on mlake. What I can say is that prod is at migration head 211 and serving, so the crash-loop is long over.Verdict: resolved. Not closing — that is m's.