Skip to navigation

Inspection lifecycle

Container statuses, defect grading, AI decisions, and manual review.
View as Markdown

Each physical container is one inspection record, identified by its ISO 6346 container number (for example MSCU1234566). Edge endpoints address containers by this number. Dashboard endpoints address them by the record id, or by number through GET /v1/containers/by-number/{containerNumber}.

Container statuses

APPROVE REJECT or HOLD IDENTIFIED VALIDATED INSPECTING ANALYZED CLEARED RELEASED FLAGGED UNDER_REVIEW HELD
StatusMeaning
IDENTIFIEDOCR read and validated the container number.
VALIDATEDA cargo manifest is attached and validated.
INSPECTINGA scan is in progress.
ANALYZEDA finalized defect scan has been graded and an AI decision recorded.
FLAGGEDSet automatically only when a dangerous-goods scan reports a HIGH or EXTREME threat.
UNDER_REVIEWEscalated for supervisor review.
CLEAREDApproved, either by the AI decision or by a reviewer.
HELDA reviewer rejected or held the container.
RELEASEDReleased from the inspection point.

Defects never set FLAGGED on their own. A defect scan records an AI decision of FLAGGED_DEFECT, and a person decides what happens next through escalation and manual review.

Defect grading

Edge devices send raw detections only: class_name, confidence, and box. The API maps every detection class to a product defect class and severity using the container-defect-taxonomy-v1 taxonomy. Any severity the device sends is ignored.

Defect classReport labelSeverityExample detector classes
CRACKCrack / structural breachCRITICALcrack, hole, puncture, structural_damage
DENTDentHIGHdent, minor_dent
RUST_CORROSIONRust / corrosionHIGHrust, severe_rust, corrosion
DOOR_DAMAGEDoor damageHIGHdoor_damage, door_broken, door_dent
SEAL_BROKENSeal brokenHIGHseal_broken, broken_seal, seal_damage
NO_DEFECTNo defectLOWno_defect, normal, clear
DIAGNOSTIC_UNSUPPORTEDDiagnostic / unsupported defect labelLOWAny class not listed above

Only reportable detections count toward the defect summary. NO_DEFECT and unsupported classes are stored for diagnostics but are not treated as defects.

Structural integrity

The defect scan’s structuralIntegrity is derived from the reportable detections:

ValueRule
COMPROMISEDAt least one CRITICAL detection
ACCEPTABLEAt least one HIGH detection and no CRITICAL detections
GOODNo CRITICAL or HIGH detections
UNKNOWNNot computed; appears on scans uploaded manually through the dashboard

AI decision

Every finalized edge defect scan records an aiDecision on the container:

aiDecision.statusWhen
CLEAREDNo reportable defects were detected
FLAGGED_DEFECTOne or more reportable defects were detected; the decision includes reasons and recommendations

Dashboard statistics also group other flag reasons: FLAGGED_ILLEGAL, FLAGGED_MISMATCH, and FLAGGED_MULTIPLE. Category scans compare detected cargo with the attached manifest when one exists.

Manual review

People make the final call on flagged containers.

1

Escalate

Any signed-in user can escalate a container with POST /v1/containers/{id}/escalate. The container moves to UNDER_REVIEW, and supervisors are notified in the app and by email.

2

Work the queue

Supervisors and admins list pending work with GET /v1/escalations.

3

Decide

A supervisor or admin submits PUT /v1/containers/{id}/manual-review with a decision of APPROVE, REJECT, or HOLD and optional notes. APPROVE moves the container to CLEARED; REJECT and HOLD move it to HELD. The AI decision is marked as manually overridden.

Every review and escalation is written to the audit log, which admins can read at GET /v1/admin/audit-log.