de.inf.lg / cfi: Replik + Duplik sequenced wrong (before Klageerwiderung + same date) #95
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?
m's report (2026-05-25 15:12)
Live timeline render of the de.inf.lg / cfi proceeding currently shows:
Three issues:
m's correct sequence for de.inf.lg (ZPO Klage):
Each strictly after the previous; Replik anchors off Klageerwiderung (court-set period), Duplik anchors off Replik (court-set period).
What to do
paliad.deadline_rules— whattrigger_event_id,period_value,period_unitdoes each carry? Likely Replik + Duplik both point at Klageerhebung with the same court-set placeholder period.trigger_event_id= Klageerwiderung's submission_code, period = court-set placeholder (e.g. NULL with ais_court_set: trueflag if the schema has one, else NULL period with a label).trigger_event_id= Replik's submission_code, period = court-set placeholder.Files most likely touched
ls internal/db/migrations/ | tail)scripts/fix-de-inf-lg-sequencing/main.goif the catalog is seeded from code rather than migratedinternal/services/projection_service.goif the rendering bug is in projection logic, not the datafrontend/src/client/views/verfahrensablauf-core.tsif the column placement misorders court-set eventsHard rules
go build ./... && go test ./internal/... && cd frontend && bun run buildclean.mai/<worker>/de-inf-lg-replik-duplik-sequencing.Out of scope
rule→procedural_event(deferred per #93).Reporting
mai report completedwith branch + SHAs + before/after rendering on a sample de.inf.lg project + which migration / script approach was used + cross-reference comment on curie's audit (#94).Shipped on branch
mai/brunel/fixer-de-inf-lg-cfi@ f45ad50.Root cause:
de.inf.lg.replikandde.inf.lg.duplikboth hadparent_id = NULLwithduration_value = 4 weeks. The projection therefore anchored both off the proceeding's trigger date (Klageerhebung) and added 4 weeks → both rendered at the same calendar date AND before Klageerwiderung (Klage + 6w).Fix — migration 123 (
internal/db/migrations/123_de_inf_lg_replik_duplik_sequencing.up.sql):replik.parent_id→erwidg.idduplik.parent_id→replik.idis_court_set = true,legal_source = 'DE.ZPO.273'deadline_notescite §§ 273, 282 ZPO (court's case-management power + parties' duty to file timely)Applied to live youpc DB via Supabase MCP.
paliad.applied_migrationsbumped to version 123 (122 rows).Verified ordering for trigger 2026-05-25 Mon (the user-reported anchor):
Each row strictly later than the previous; Replik and Duplik no longer collide on the same date and no longer precede the Klageerwiderung.
Build hygiene:
go build ./...clean;go test ./internal/...all packages pass;bun run buildclean (2801 i18n keys, no scan warnings). No code changes — pure data migration.Cross-reference posted on curie's audit #94 (#94#issuecomment-9603) including one residual observation:
fristenrechner.Calculatedoes not propagater.IsCourtSet → d.IsCourtSetfor non-zero-duration rules, so the dashed court-set border doesn't render today for Klageerwiderung / Replik / Duplik. Filed as a §10 candidate; out of scope for #95.Awaiting maria's merge gate. NOT self-merged.
Re-pushed branch
mai/brunel/fixer-de-inf-lg-cfi@8c94dcc(force update after rebase onto main).Slot collision resolved: paliadin caught a crash-loop on paliad.de because my earlier in-process testing wrote
applied_migrations(version=123, name='de_inf_lg_replik_duplik_sequencing')while cronus's #77123_backupsmerged in parallel. Migrator bailed on the name mismatch. Paliadin DELETEd my stale applied_migrations row; container recovered with cronus's 123 applied cleanly.Changes:
123_…→124_de_inf_lg_replik_duplik_sequencing.{up,down}.sqlmig 124UPDATE paliad.deadline_rulesnow guarded byAND parent_id IS NULL(mig 095 convention) — re-apply against a DB that already carries the fix matches zero rows and no-opsIdempotency dry-run against live DB:
Both guards short-circuit. On next container boot the runner applies mig 124, the UPDATEs no-op cleanly, the runner inserts
applied_migrations(version=124, name='de_inf_lg_replik_duplik_sequencing'). No duplicate audit-log rows.Build hygiene:
go build ./...clean;go test ./internal/db/... ./internal/services/...pass;bun run buildclean (2824 i18n keys — picks up cronus's backup-mode keys from #77).NOT self-merged. Awaiting maria's merge gate.