Expand description
Use cases for SyndicResponse + SLA escalation (Story 3.7 — FR32 INV-23).
Three operations exposed to handlers:
SyndicResponseUseCases::respond — a syndic posts a response to a ticket.
The caller (handler) MUST already have enforced the syndic / superadmin
role check. The use case:
- checks the target ticket exists (else
AppError::NotFound); - mints a
SyndicResponse(entity-level validation); - persists it (append-only — repo MUST NOT
UPDATE); - if the response is posted BEFORE the ticket’s
sla_due_at, marks the ticket as escalated (idempotent) to pre-empt the future cron escalation. This is the SLA-satisfied path: the SLA window is “consumed” by a timely response.
SyndicResponseUseCases::list_for_ticket — read-only listing for the
ticket detail view.
SyndicResponseUseCases::escalate_overdue — cron entry point. Returns
the list of ticket ids that were just escalated by this pass. Idempotent
across calls.