Authorizations and imports
Transport-authority dossiers and grants, effective coverage, import provenance, statements, and explicit conflict resolution.
Transport-authority model
A dossier is a folder identity. The authorization is the instrument actually granted by the authority. One dossier may contain several grants with different terms and holders.
Guarantees
- Authorization number is unique within its dossier, not station-wide.
- Each instrument owns effective dates, category set, and lifecycle.
- Holder history allows one holder per date.
- Vehicle coverage is effective-dated.
- Several grants may cover one line simultaneously.
- Revocation preserves historical legality.
Line-eligibility queries answer which grants cover a line on a date. They do not
decide who operates it; LineOperatorAssignment owns that fact.
Import staging
Bulk ingestion preserves source claims before promoting anything to trusted master data.
| Record | Grain |
|---|---|
ImportBatch | One source file read once |
SourceStatement | One claim exactly as supplied |
SourceConflict | One disputed subject + attribute |
The staging API creates batches, lists statements and conflicts, reads one conflict, and records explicit resolution. It never silently picks the newest source.
Why conflicts are durable
Two sources may disagree about a carrier name, line holder, permit date, or schedule fact. Implicit resolution destroys provenance and lets a later import undo an operator's choice.
SmartGare keeps source identity, import time, raw statement, normalized subject and attribute, candidate values, and the operator's reasoned resolution.
Promotion still uses the owning aggregate command. Import staging is never a bypass around Referential rules.
Permit CSV workflow
Vehicle-permit CSV import resolves plates, validates windows and uniqueness, and reports every row as imported, rejected, conflicted, or unresolved. It is idempotent at the permit-number boundary and emits the same permit-issued event as manual issue.
The lightweight reader does not support quoted comma-containing fields. Data errors are row-level; infrastructure and concurrent batch-write failures roll back the transaction.