Skip to main content

Module incident

Module incident 

Source
Expand description

Daycare incident disposition rules that preserve pet-safety review gates.

§Operator-summary

This module supports the daycare incident-disposition queue that decides whether an event remains a staff note, requires owner-message review, needs manager review, or suspends group play pending review. It can reduce labor by converting the reported severity into an explicit restriction and review gate that daycare eligibility must honor.

It must not automate live customer notice, group-play reinstatement, manager approval, medical/legal conclusions, or incident closure. Authoritative facts remain the original incident report, classified severity, affected pet, required gate, and later reviewer decision. Review gates protect pets, customers, and staff by requiring customer-message approval before owner notice and manager approval before clearing manager-review or group-play-suspension outcomes.

use domain::{daycare, entities, policy};
use uuid::Uuid;

let pet_id = entities::PetId(Uuid::nil());
let disposition = daycare::incident::Classifier
    .classify(pet_id, daycare::incident::Severity::SuspendGroupPlay);

assert_eq!(disposition.required_gate(), Some(policy::ReviewGate::ManagerApproval));
assert_eq!(
    disposition.restriction(),
    daycare::incident::Restriction::SuspendedPendingManagerReview { pet_id },
);

Structs§

Classifier
Deterministic classifier that maps incident severity to restrictions and review gates.
Disposition
Classified incident outcome carrying restriction and review-gate evidence.

Enums§

Policy
Daycare incident handling policy that determines notes, customer notice, and group-play suspension.
Restriction
Operational restriction created by a daycare incident disposition.
Severity
Severity classification supplied to the incident classifier.