Matter intake now starts with the right role vocabulary
Each supported default matter type is linked to the client-side participant labels that lawyers expect to choose during intake. The seed is firm-scoped and safe to run repeatedly.
Shipped mappings
| Default matter type | Client-side options, in order |
|---|---|
| Domestic Arbitration | Claimant, Respondent |
| Writ Petition | Petitioner, Respondent |
| Criminal Complaint/Appeal | Complainant, Accused, Appellant, Respondent |
| Civil Suit | Plaintiff, Defendant |
Catalog boundary: the shipped defaults do not contain a SEBI / NFRA regulatory matter type. Story-2789 does not invent one or misclassify it as a commercial dispute, so the regulatory Complainant / Noticee pair remains unlinked.
How provisioning stays complete
FirmService.seed_firm_defaults creates participant labels, creates matter types, then resolves both sets of firm-owned IDs and inserts the links. Existing primary-key rows are skipped, so retries create no duplicates. Archived catalog rows remain intentional catalog entries; deleted rows never resolve.
The participant-label defaults gain Complainant, Accused, Noticee, and Plaintiff. The first is required by the requested criminal mapping and was also absent on main.
Existing firms and rollback
Migration 0204_seed_matter_type_participant_labels follows revision c7e9a2d4f6b8. It fills missing required labels, resolves catalog IDs per firm, and inserts mappings with is_client_side_option = true. Its downgrade removes the exact seeded mapping pairs while retaining independently addressable participant-label catalog data.
Acceptance evidence
| Idempotency | The integration seed runs twice for one firm and yields one row per mapping. |
|---|---|
| Firm scope | Two firms resolve distinct catalog IDs and receive the same ten logical mappings. |
| Migration | Upgrade, downgrade, re-upgrade, and Alembic drift checks cover the data revision. |
| API contract | make openapi verifies this seed-only change creates no contract drift. |
Scope
This Story seeds catalog links only. It adds no matter type, route, DTO, deploy workflow, cloud capability, or compatibility path.
Governing issue: pramaan-spec#2789.