# GetShiftPlacement

## Overview

getShiftPlacement retrieves a single placement (ShiftPlacement) by id. It is the lookup behind shift-schedule-detail views and variance calculation, which need to resolve exactly which Assignment is staffing a slot.

## Business Rules

- Accepts a `shiftPlacementId` as input
- Returns the placement record: `shiftId`, `assignmentId`, `assignedAt`
- Returns the placement regardless of the parent Shift's current status (a CANCELLED shift may retain historical placements even though it accepts no new ones)

## Process Flow

```mermaid
flowchart TD
    A[Receive shiftPlacementId] --> B[Look up ShiftPlacement by id]
    B --> C{Found?}
    C -->|No| D[Return error: SHIFT_PLACEMENT_NOT_FOUND]
    C -->|Yes| E[Return placement record]
```

## External Dependencies

- [shiftSchedule::Shift](../model/Shift.md) — the slot being staffed
- [workforce::Assignment](../model/ShiftPlacement.md) — the placed Assignment (cross-module reference resolved via `assignmentId`)

## Error Scenarios

- **SHIFT_PLACEMENT_NOT_FOUND**: no ShiftPlacement exists for the given id

## Test Cases

- returns the ShiftPlacement for a given id
- returns shiftId, assignmentId, and assignedAt
- returns a placement for a shift that has since been cancelled
- throws SHIFT_PLACEMENT_NOT_FOUND for an unknown id
