# gRPC TileStream Service for Route-Based Tile Delivery

**Task**: AZ-1074_grpc_tile_stream_service
**Name**: gRPC TileStream Service
**Description**: Add gRPC streaming endpoint that delivers route tiles as they become available.
**Complexity**: 5 points
**Dependencies**: RouteService, tile storage, Google Maps downloader
**Component**: SatelliteProvider.Api
**Tracker**: AZ-1074
**Epic**: AZ-115

## Problem

Consumers (gps-denied-onboard) can poll REST `POST /api/satellite/route` until `mapsReady`. No streaming transport exists for progressive tile delivery.

## Outcome

- gRPC `StreamTiles(RouteTileRequest) returns (stream TileChunk)` alongside existing REST.
- Reuses `RouteService` and tile download pipeline.
- Proto contract checked into repo.

## Scope

### Included
- `satellite_provider.proto` with route waypoints, region size, zoom, optional geofences.
- Stream messages: tile id, lat/lon, zoom, image bytes or path + checksum, status, terminal summary.
- ASP.NET Core gRPC host on configurable port.
- Happy-path + invalid-request integration test in `SatelliteProvider.IntegrationTests`.

### Excluded
- Mission cache package assembly (COG/manifest/FAISS).
- Removing or changing REST endpoints.
- Imagery source migration off Google Maps.

## Acceptance Criteria

**AC-1: Happy path streams tiles**
Given a valid 2-point route
When a client calls `StreamTiles`
Then at least one `TileChunk` arrives before `StreamComplete`.

**AC-2: Cache reuse**
Given tiles already in DB cache
When the stream runs
Then cached tiles are served without redundant Google Maps download.

**AC-3: Invalid route rejected**
Given zero waypoints or out-of-range coordinates
When the client calls `StreamTiles`
Then gRPC returns `INVALID_ARGUMENT` with details.

**AC-4: Backpressure safe**
Given a slow consumer
When tiles stream
Then tile bytes are not corrupted.

## Constraints

- gRPC is additive; REST remains supported.
- Blocks gps-denied-onboard AZ-1076 consumer.
