# Spec Delta

## Purpose

Provide an Inventory review queue for damaged warehouse goods and explicit decisions to repair, release or scrap quarantined quantities.

## ADDED Requirements

### Requirement: Review queue and detail
Authenticated users SHALL read a paginated quarantine queue with part identity, reporter, reason, held/released/scrapped/remaining quantities and linked work orders. Filters SHALL include search, case status, work presence and report date range. ADMIN/SUPERVISOR SHALL access review actions.

#### Scenario: New damage hold
- **WHEN** Inventory records a damage hold
- **THEN** the case appears in the review queue with no automatic WO and the held goods remain unavailable

### Requirement: Manual repair decision
ADMIN/SUPERVISOR SHALL create a CORRECTIVE warehouse WO from a case with remaining held quantity, preserving the case link and reporter. The form SHALL prefill the target and original complaint. Public checkout SHALL remain unrelated to this process.

#### Scenario: Reviewer requests repair
- **WHEN** the reviewer confirms priority and work description without assigning a technician
- **THEN** one linked WO appears in Maintenance and the case shows its reference

### Requirement: Proposed active order limit
Subject to policy approval, one case SHALL have at most one OPEN or IN_PROGRESS WO at a time. Concurrent creation SHALL not bypass this limit. New work after terminal work SHALL require remaining held quantity and a new explicit decision.

#### Scenario: Two reviewers create work
- **WHEN** two distinct requests create work for the same case simultaneously
- **THEN** at most one active WO is created and the other request receives a conflict

### Requirement: Explicit disposition
Release and scrap SHALL use existing quantity, reason, authority and stock rules. Completion of a WO SHALL NOT automatically release or scrap all goods. Partial and mixed outcomes SHALL preserve the remaining quantity and history.

#### Scenario: Mixed outcome after repair
- **WHEN** three of five units are released and two scrapped
- **THEN** the case closes as CLOSED_MIXED and each decision has its own stock movement

### Requirement: Repair and disposition coordination
Subject to policy approval, disposition SHALL be blocked while a linked WO is IN_PROGRESS. After work ends, a reviewer SHALL explicitly dispose remaining goods. Starting a WO whose case has no remaining goods SHALL be rejected. Cancellation SHALL NOT release stock.

#### Scenario: Scrap races with repair start
- **WHEN** a reviewer scraps goods while a technician starts their WO
- **THEN** serialized decisions prevent an in-progress repair of an already closed case
