Skip to main content

Module support_write_service

Module support_write_service 

Source
Expand description

The hand-authored support write path (user-owned; survives regen).

An SLA-clock ticketing engine + warranty claims. Posts NO GL and owns no money. The load-bearing logic is the SLA clock: an Issue binds an SLA at raise time, snapshots concrete response_by / resolution_by deadlines from the matching priority, can be PAUSED (the paused span is added back to the deadlines on resume), and on resolve is judged fulfilled iff it beat the (pause-adjusted) resolution deadline. The one outbound seam — escalate a ticket into a real backbone-project delivery Project — runs through ProjectPort (zero normal Cargo edge), idempotent per issue.

Tenancy: none, by design (ADR-0029). The module is tenant-agnostic — no tenant key on any write, no scope binding of its own. The COMPOSING service owns the posture: when it mounts these routes under an auth middleware that binds a row scope (e.g. with_org_request_scope), the database fence owns tenant isolation; a deployment that mounts them unfenced gets an unfenced module. Multi-statement transactions here relay an ambient scope onto the transaction when one is bound, and stay plain otherwise. The ONE exception is the escalation seam: the sibling port’s delivery-Project row still carries the sibling’s legacy owner-company key, sourced fail-closed from the ambient org scope.

Clock verbs take an explicit now: DateTime<Utc> so the deadline math is deterministic under test.

Structs§

NewIssue
NewSla
NewSlaPriority
NewWarrantyClaim
SupportWriteService

Enums§

SupportError