Verfahrensablauf: R.109.1/R.109.4 deadlines mis-anchored + duplicate Simultanübersetzung row (upc.inf.cfi) #135
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?
Repro
https://paliad.de/tools/verfahrensablauf?side=defendant — pick proceeding
upc.inf.cfi, any trigger date (e.g. SoC = 26.05.2026). The timeline renders three R.109-related events with dates that don't make legal sense:Bugs
Bug 1 — wrong anchor (most important)
R.109.1 and R.109.4 are defined as
timing='before'withparent_idpointing toupc.inf.cfi.oral(the oral hearing rule) — seeinternal/db/migrations/132_wave1_tier1_rule_additions.up.sql:340-394. So in the rule data, they're correctly modeled as "1 month / 2 weeks before the oral hearing".The rendered dates suggest the calc engine is anchoring them on the trigger date (SoC) instead of on the parent rule's computed date (oral hearing). Effect: R.109 deadlines end up in April 2026 (before the SoC of 26.05.2026), which is nonsensical — you can't file a translation request for an oral hearing before the lawsuit even exists.
Likely fix surface:
pkg/litigationplanner/engine.go(orinternal/services/fristenrechner.golegacy path) — the part that walksparent_idand computes the base fortiming='before'rules. For child-of-parent rules withtiming='before', the base should be the parent's computed date, not the trigger date.Bug 2 — duplicate Simultanübersetzung row
The same R.109.1 event renders twice with identical content (date, citation, description, ↔ beide Seiten indicator). Worker should determine:
SELECT * FROM paliad.deadline_rules WHERE submission_code = 'upc.inf.cfi.translation_request' AND is_active = true— should return 1 row, not 2.)primary_party='both'perspective and not deduping)?Given the rule's
primary_party='both', my guess is the renderer is emitting one row for the user's side AND a mirror row for the opponent side, but failing to merge them on thebothindicator. Compare with how otherprimary_party='both'rules (likeKlageerwiderungplaceholder) render — they should NOT duplicate.Bug 3 — chronological ordering
Klageerhebung (the trigger event itself) renders at the bottom of the list. Conceptually, the trigger should appear first (everything is downstream of it). After Bug 1 is fixed, this ordering issue resolves itself naturally because R.109 deadlines will move to after the oral hearing (i.e. far in the future, not before the SoC). But worth confirming the sort key is
date ASCnot something else.Worker scope
mcp__supabase__execute_sqlto confirm there's exactly one row forsubmission_code='upc.inf.cfi.translation_request'andupc.inf.cfi.interpreter_costwithlifecycle_state='published' AND is_active=true. Surface findings as a comment on this issue.pkg/litigationplanner/engine.go— find wheretiming='before'+parent_idis resolved, and verify whether the engine usesparent.computedDateor falls back totriggerDate. Add a unit test that reproduces the bug (synthetic rules + expected dates) before fixing.lookup_eventsprojection)?beforerule (translation_request) → grand-child rule (none here, but verify chains work).curltest that the repro URL now renders R.109.1 and R.109.4 after the oral hearing (upc.inf.cfi.oraldate), with no duplicates.Acceptance
upc.inf.cfishows Klageerhebung first, then the rest of the chain in chronological order, and the R.109 events render after the oral hearing.go test ./pkg/litigationplanner/... ./internal/services/fristenrechner_*_test.gogreen, including a new test locking thebefore-parentanchor behaviour.set_config('paliad.audit_reason',…)is appropriate).Anti-patterns to avoid
updated_atdoesn't exist onproceeding_types; verifydeadline_rulescolumns before any UPDATE).set_config('paliad.audit_reason',…)if you do end up UPDATEingdeadline_rules.