Statement of Claim has no rule mapped (Auto resolves to event name only, no legal source) #99
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:20)
Root cause hypothesis
When Type = Statement of Claim is picked and Rule = Auto, the resolved-rule display should show the canonical legal source (e.g.
UPC RoP R.13for UPC CFI SoC). Instead it just shows the event name — meaning either:paliad.deadline_rulesrow for SoC has an empty / NULLlegal_sourcefield.What to do
paliad.deadline_rules WHERE submission_code LIKE '%soc%' OR name ILIKE '%statement of claim%'(or however SoC is identified in the catalog). Confirm whether the rule row exists AND has legal_source populated.internal/services/deadline_service.go(or wherever Auto resolution happens). Maybe the event_type slug doesn't match between the Type picker and the Rule row.Statement of Claim · UPC RoP R.13(or similar canonical chip).Files most likely touched
internal/db/migrations/12X_fix_soc_rule.up.sql(or one-off SQL via supabase MCP if it's just a data correction)internal/services/deadline_service.go(if logic bug)internal/services/event_service.go(if event_type → rule mapping is here)Hard rules
go build ./... && go test ./internal/... && cd frontend && bun run buildclean.mai/<worker>/soc-rule-mapping.Out of scope
Reporting
mai report completedwith branch + SHAs + diagnosed root cause + UX path showing Auto resolves to a canonical legal source for SoC.Folded into Wave 0 on branch
mai/brunel/wave0-tier0-deadline-fixes@05f7ea2(single migration 127 alongside the 13 Tier 0 audit fixes from m/paliad#94).Root cause:
upc.inf.cfi.socrow carriesrule_code = NULLandlegal_source = NULL. The Type=Statement-of-Claim / Rule=Auto resolution therefore renders the event name without a citation, and the deadline-search result card has no legal-source link.Fix — migration 127 (
internal/db/migrations/127_wave0_tier0_deadline_fixes.up.sql):UPC RoP R.13 defines the Statement of Claim; R.13(1) lists the required contents. The SoC carries no statutory deadline (duration=0, parent_id=NULL — it is the originating filing that anchors the proceeding's trigger date), so only the citation metadata is backfilled. Duration / anchor / party untouched.
Guard
rule_code IS NULL AND legal_source IS NULLmakes re-apply a no-op once the fix has landed.Applied to live DB via Supabase MCP with audit_reason set; verified post-fix shape:
Frontend display via existing
FormatLegalSourceDisplayhelper:UPC.RoP.13.1→UPC RoP R.13(1)✓BuildLegalSourceURL→https://youpc.org/laws#UPCRoP.013NOT self-merged. Awaiting maria's merge gate.