# Feature: Tracking Loss Recovery

## Description
Handles recovery when visual odometry loses tracking. Implements progressive search strategy through F11 and manages user input workflow when automatic recovery fails. Coordinates the transition to BLOCKED status and back to PROCESSING upon successful recovery.

## Component APIs Implemented
- `handle_tracking_loss(flight_id: str, frame_id: int) -> RecoveryStatus` - Initiates and manages tracking loss recovery
- `apply_user_fix(flight_id: str, fix_data: UserFixRequest) -> UserFixResult` - Applies user-provided GPS anchor

## External Dependencies
- **F11 Failure Recovery Coordinator**: 
  - `start_search()` - Initiates progressive search
  - `try_current_grid()` - Attempts matching on current tile grid
  - `expand_search_radius()` - Expands search area
  - `mark_found()` - Marks successful recovery
  - `create_user_input_request()` - Creates request for user intervention
  - `apply_user_anchor()` - Applies user-provided anchor
- **F15 SSE Event Streamer**: `send_user_input_request()` - Notifies client of required input

## Internal Methods
- `_run_progressive_search(flight_id: str, frame_id: int) -> Optional[RecoveryResult]` - Executes 1->25 tile progressive search
- `_request_user_input(flight_id: str, frame_id: int, request: UserInputRequest)` - Transitions to BLOCKED and notifies client
- `_validate_user_fix(fix_data: UserFixRequest) -> bool` - Validates user input data
- `_apply_fix_and_resume(flight_id: str, fix_data: UserFixRequest) -> UserFixResult` - Applies fix and resumes processing

## Unit Tests
- Test `handle_tracking_loss` starts progressive search via F11
- Test progressive search expands from 1 to 25 tiles
- Test successful recovery returns RecoveryStatus.FOUND
- Test failed recovery transitions status to BLOCKED
- Test `apply_user_fix` validates input coordinates
- Test `apply_user_fix` returns success on valid anchor
- Test `apply_user_fix` transitions status to PROCESSING on success
- Test `apply_user_fix` rejects fix when not in BLOCKED status

## Integration Tests
- Test full recovery flow: tracking loss -> progressive search -> found
- Test full blocked flow: tracking loss -> search fails -> user input -> resume
- Test SSE notification sent when user input required
- Test recovery integrates with F11 search grid expansion
- Test user fix properly anchors subsequent frame processing

