mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-06-26 07:21:13 +00:00
[AZ-1074] [AZ-1075] gRPC tile stream tests and shared proto
Extract tile_provision.proto into GrpcContracts, add integration tests and validation hardening for DeliverRouteTiles streaming. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
# 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.
|
||||
@@ -0,0 +1,54 @@
|
||||
# gRPC TileStream Blackbox Integration Tests
|
||||
|
||||
**Task**: AZ-1075_grpc_tile_stream_integration_tests
|
||||
**Name**: gRPC TileStream Integration Tests
|
||||
**Description**: Blackbox tests for the gRPC tile stream against a running service container.
|
||||
**Complexity**: 3 points
|
||||
**Dependencies**: AZ-1074
|
||||
**Component**: SatelliteProvider.IntegrationTests
|
||||
**Tracker**: AZ-1075
|
||||
**Epic**: AZ-284
|
||||
|
||||
## Problem
|
||||
|
||||
AZ-284 blackbox suite covers HTTP API only. The new gRPC tile stream has no automated coverage.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Integration tests exercise `StreamTiles` end-to-end in `docker-compose.tests.yml`.
|
||||
- Failure cases assert correct gRPC status codes.
|
||||
- Metadata consistency with REST route endpoint verified for same route.
|
||||
|
||||
## Scope
|
||||
|
||||
### Included
|
||||
- Fixture: API + Postgres via existing docker-compose.
|
||||
- Happy path: route → tiles → stream complete.
|
||||
- Failure cases: empty route, invalid coordinates, zoom out of range.
|
||||
- Cross-check with `GET /api/satellite/route/{id}` metadata.
|
||||
|
||||
### Excluded
|
||||
- Consumer-side tests (gps-denied-onboard AZ-1076).
|
||||
- Performance/load testing.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
**AC-1: Pipeline green**
|
||||
Given docker-compose test run
|
||||
When gRPC happy-path test executes
|
||||
Then it passes with full verbosity (`-v`, no quiet mode).
|
||||
|
||||
**AC-2: Failure status codes**
|
||||
Given each invalid request variant
|
||||
When the gRPC client calls `StreamTiles`
|
||||
Then the expected gRPC status code is returned.
|
||||
|
||||
**AC-3: REST consistency**
|
||||
Given the same route submitted via REST and gRPC
|
||||
When both complete
|
||||
Then tile metadata is consistent.
|
||||
|
||||
## Constraints
|
||||
|
||||
- Depends on AZ-1074 landing first.
|
||||
- Follow existing integration test patterns in `SatelliteProvider.IntegrationTests`.
|
||||
Reference in New Issue
Block a user