# ListCalculatedBlocksByWorkDate

## Overview

Lists the `CalculatedTimeBlock`s for a given Assignment on a single workday, paginated. This is the primary way to inspect "what did calculation produce for this worker on this day" — the categorized (regular/overtime/late-night/holiday) breakdown of a day's derived time.

## Business Rules

- Filters by `assignmentId` and `workDate` (exact day match, not a range)
- Returns only the current calculation for that Assignment/workDate; a discarded/re-derived prior set is not returned (CalculatedTimeBlock is a re-derivable projection, never a source of truth)
- Results are paginated
- `minutes` on each returned block is a non-negative integer

## Process Flow

```mermaid
flowchart TD
    A[Caller supplies assignmentId + workDate + pagination params] --> B{Valid assignmentId and workDate?}
    B -- No --> C[Return INVALID_QUERY_PARAMS]
    B -- Yes --> D[Look up current CalculatedTimeBlocks for assignmentId + workDate]
    D --> E[Return paginated page of blocks]
```

## External Dependencies

- [time-tracking::CalculatedTimeBlock](../model/CalculatedTimeBlock.md) model — entity being queried

## Error Scenarios

- **INVALID_QUERY_PARAMS**: a required query parameter is missing or malformed
- **INVALID_PAGINATION_CURSOR**: supplied pagination cursor is not valid for this query

## Test Cases

- returns CalculatedTimeBlocks for the given Assignment and workDate
- returns an empty page when no calculated blocks exist for the Assignment/workDate
- returns paginated results across multiple pages when the day has many blocks
- each returned block has an integer minutes value
- returns INVALID_QUERY_PARAMS when workDate is malformed
- returns INVALID_QUERY_PARAMS when assignmentId is missing
