# Feature: Chunk Lifecycle Orchestration

## Description
Manages route chunk boundaries and creation during processing. Detects when new chunks should be created (tracking loss, sharp turns) and orchestrates chunk lifecycle through F12. Implements proactive chunk creation strategy where new chunks are created immediately on tracking loss rather than waiting for matching failures.

## Component APIs Implemented
- `get_active_chunk(flight_id: str) -> Optional[ChunkHandle]` - Returns current active chunk for the flight
- `create_new_chunk(flight_id: str, frame_id: int) -> ChunkHandle` - Creates new chunk starting at specified frame

## External Dependencies
- **F12 Route Chunk Manager**:
  - `get_active_chunk()` - Retrieves current chunk
  - `create_chunk()` - Creates new chunk
  - `add_frame_to_chunk()` - Adds processed frame to chunk

## Internal Methods
- `_detect_chunk_boundary(flight_id: str, frame_id: int, tracking_status: bool) -> bool` - Determines if chunk boundary detected
- `_should_create_chunk_on_tracking_loss(flight_id: str) -> bool` - Checks if proactive chunk creation needed
- `_create_chunk_on_tracking_loss(flight_id: str, frame_id: int) -> ChunkHandle` - Creates chunk proactively on tracking loss
- `_add_frame_to_active_chunk(flight_id: str, frame_id: int, frame_result: FrameResult)` - Adds frame to current chunk

## Unit Tests
- Test `get_active_chunk` returns current chunk handle
- Test `get_active_chunk` returns None when no active chunk
- Test `create_new_chunk` delegates to F12 and returns handle
- Test chunk boundary detection on tracking loss
- Test proactive chunk creation triggers on tracking loss
- Test `_add_frame_to_active_chunk` delegates to F12
- Test multiple chunks can exist for same flight

## Integration Tests
- Test chunk creation flow: tracking loss -> new chunk -> frames added
- Test chunk boundary detection integrates with VO tracking status
- Test chunk handles are properly propagated to F10 factor graph
- Test chunk lifecycle across multiple tracking loss events
- Test chunk state consistency between F02.2 and F12

