mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-06-26 07:51: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:
@@ -236,6 +236,15 @@ Parent-suite team may reorder steps 2–5 based on consumer priorities; step 1 (
|
||||
|
||||
Originally tracked as a separate cycle 8b because AZ-812 is a wire-format rename (mirror of AZ-794) rather than a validator add (mirror of AZ-796). After the /autodev Step 10 ordering decision above, cycle 8b folds into cycle 8 as step 1 of the execution order. Section retained for traceability — the cycle-8b table entry remains the authoritative spec marker for AZ-812.
|
||||
|
||||
### Step 9 cycle 9 (gRPC TileStream — AZ-1074 / AZ-1075)
|
||||
|
||||
| Task | Depends On | Points | Status |
|
||||
|------|-----------|--------|--------|
|
||||
| AZ-1074 gRPC TileStream Service | — | 5 | Todo |
|
||||
| AZ-1075 gRPC TileStream Integration Tests | AZ-1074 | 3 | Todo |
|
||||
|
||||
Execution order: AZ-1074 first (service + proto + unit/happy-path integration), then AZ-1075 (full blackbox suite). Origin: gps-denied-onboard consumer needs progressive tile delivery (blocks AZ-1076).
|
||||
|
||||
## Total Effort
|
||||
|
||||
Step 6: 6 tasks, 17 story points
|
||||
@@ -250,6 +259,7 @@ Step 9 cycle 6: 1 task scheduled (AZ-505 = 3 pts) — consumed from cycle-5 defe
|
||||
Step 9 cycle 7: 3 tasks adopted (AZ-794 = 3 pts rename, AZ-795 = epic with 5–8 pts shared-infra ship, AZ-796 = 3 pts first per-endpoint child) — total ~11–14 pts (over the 2–5 pts/cycle preference; AZ-795's shared-infra ship is the heavy item). Origin: gps-denied-onboard AZ-777 Phase 1 Jetson probe (2026-05-22). Sibling per-endpoint child tasks under AZ-795 to be added in future cycles as the parent-suite team enumerates the endpoint surface.
|
||||
Step 9 cycle 8: 5 tasks queued (AZ-812 = 3 pts Region DTO rename, AZ-808 = 3 pts region validator, AZ-809 = 5 pts route, AZ-810 = 5 pts UAV upload metadata, AZ-811 = 2 pts lat/lon GET) — total 18 pts across 4 per-endpoint AZ-795 children + 1 OSM-naming harmonization. Origin: cross-repo request from gps-denied-onboard agent (2026-05-22) for completeness of validation surface after AZ-795/796 landed, plus AZ-777 Phase 2 black-box probe surfacing the Region DTO as the lone OSM hold-out. Ordering: AZ-812 first (per /autodev Step 10 user decision), then AZ-808/809/810/811 (independent of each other modulo AZ-812). AZ-808 and AZ-809 specs amended 2026-05-22 post-probe to add `Id` non-zero-Guid rule + Route AC-10 input/output naming asymmetry advisory.
|
||||
Step 9 cycle 8b: folded into cycle 8 as step 1 (AZ-812). Section retained in dependency table for traceability.
|
||||
Step 9 cycle 9: 2 tasks created (AZ-1074 = 5 pts, AZ-1075 = 3 pts) — total 8 pts. gRPC TileStream for route-based progressive tile delivery.
|
||||
|
||||
## Coverage Verification
|
||||
|
||||
|
||||
@@ -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`.
|
||||
@@ -0,0 +1,31 @@
|
||||
# Batch Report
|
||||
|
||||
**Batch**: 1
|
||||
**Tasks**: AZ-1074, AZ-1075
|
||||
**Date**: 2026-06-25
|
||||
**Cycle**: 9
|
||||
|
||||
## Task Results
|
||||
|
||||
| Task | Status | Files Modified | Tests | AC Coverage | Issues |
|
||||
|------|--------|---------------|-------|-------------|--------|
|
||||
| AZ-1074 gRPC TileStream Service | Done | Service existed (275ee1b); added InvalidArgument RpcException + lat/lon validation | 12 unit + smoke integration pass | 4/4 | None |
|
||||
| AZ-1075 gRPC Integration Tests | Done | GrpcTestHelpers + RouteTileDeliveryGrpcTests + GrpcContracts project | smoke integration pass | 3/3 | None |
|
||||
|
||||
## Notes
|
||||
|
||||
- Core gRPC delivery (`DeliverRouteTiles`, orchestrator, proto) landed in commit `275ee1b` before cycle 9 Step 10; this batch adds validation hardening, shared `SatelliteProvider.GrpcContracts`, and blackbox integration coverage.
|
||||
- `SatelliteProvider.GrpcContracts` holds `tile_provision.proto` (GrpcServices=Both); Api + IntegrationTests reference it.
|
||||
- Integration-tests Dockerfile uses `linux/amd64` to avoid protoc segfault on arm64 Docker.
|
||||
- Integration-tests Dockerfile uses `linux/amd64` build + `aspnet:10.0` runtime (Grpc.AspNetCore dependency).
|
||||
- Smoke integration run passed (448 unit + full smoke subset including gRPC tests). Local port 5433 conflict avoided via compose override unpublishing host ports; dev TLS cert must include SAN `DNS:api` (regenerate via `scripts/run-tests.sh` if stale).
|
||||
|
||||
## AC Test Coverage: All covered
|
||||
|
||||
## Code Review Verdict: PASS_WITH_WARNINGS (see reviews/batch_01_cycle9_review.md)
|
||||
|
||||
## Auto-Fix Attempts: 0
|
||||
|
||||
## Stuck Agents: None
|
||||
|
||||
## Next Batch: All tasks complete
|
||||
@@ -0,0 +1,30 @@
|
||||
# Implementation Report — Cycle 9
|
||||
|
||||
**Cycle**: 9
|
||||
**Date**: 2026-06-25
|
||||
**Tasks shipped**: AZ-1074, AZ-1075 (batch 1)
|
||||
**Verdict**: PASS
|
||||
**Code Review Verdict**: PASS_WITH_WARNINGS
|
||||
|
||||
## Summary
|
||||
|
||||
Cycle 9 adds shared gRPC contracts, validation hardening for `DeliverRouteTiles`, and blackbox integration coverage for route tile streaming. Core delivery logic landed in commit `275ee1b`; this batch completes tests, proto project extraction, and InvalidArgument mapping.
|
||||
|
||||
## Batch
|
||||
|
||||
| Batch | Tasks | Verdict | Report | Review |
|
||||
|-------|-------|---------|--------|--------|
|
||||
| 01 | AZ-1074, AZ-1075 | PASS | `batch_01_cycle9_report.md` | `reviews/batch_01_cycle9_review.md` |
|
||||
|
||||
## Tests
|
||||
|
||||
- Unit: 448 passed (Docker SDK run via `scripts/run-tests.sh --smoke --skip-format`)
|
||||
- Integration smoke: passed including `RouteTileDeliveryGrpcTests` (manifest, invalid args, backpressure/SHA256, REST overlap)
|
||||
|
||||
## Key changes
|
||||
|
||||
- `SatelliteProvider.GrpcContracts/` — canonical `tile_provision.proto` (GrpcServices=Both)
|
||||
- `RouteTileDeliveryOrchestrator` — lat/lon range validation
|
||||
- `RouteTileDeliveryGrpcService` — RpcException InvalidArgument for bad input
|
||||
- `RouteTileDeliveryGrpcTests` + `GrpcTestHelpers` — integration coverage
|
||||
- Integration-tests Dockerfile — `linux/amd64` build, `aspnet:10.0` runtime
|
||||
@@ -0,0 +1,22 @@
|
||||
# Code Review — Batch 01 Cycle 9
|
||||
|
||||
**Tasks**: AZ-1074, AZ-1075
|
||||
**Verdict**: PASS_WITH_WARNINGS
|
||||
**Date**: 2026-06-25
|
||||
|
||||
## Findings
|
||||
|
||||
| Severity | Category | Location | Description | Suggestion |
|
||||
|----------|----------|----------|-------------|------------|
|
||||
| Low | Maintainability | SatelliteProvider.IntegrationTests/Dockerfile | `linux/amd64` platform pin required on arm64 hosts for protoc stability | Document in batch report / README troubleshooting |
|
||||
| Low | Style | RouteTileDeliveryOrchestrator.cs | InvalidArgument detail strings include `(Parameter 'job')` suffix from ArgumentException | Optional: strip parameter name for cleaner gRPC detail |
|
||||
|
||||
## Spec Compliance
|
||||
|
||||
- AZ-1074: DeliverRouteTiles streaming, validation, InvalidArgument mapping — satisfied (unit + integration).
|
||||
- AZ-1075: Happy path, invalid requests, backpressure/SHA256, REST vs gRPC overlap — satisfied (smoke integration run passed).
|
||||
|
||||
## Security
|
||||
|
||||
- No new auth bypass; gRPC inherits JWT from existing API setup.
|
||||
- No secrets in source.
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
## Current Step
|
||||
flow: existing-code
|
||||
step: 17
|
||||
name: Retrospective
|
||||
status: completed
|
||||
step: 11
|
||||
name: Run Tests
|
||||
status: pending
|
||||
sub_step:
|
||||
phase: 4
|
||||
name: lessons-log-updated
|
||||
detail: "Cycle-end retrospective produced: _docs/06_metrics/retro_2026-05-23_cycle8.md + _docs/06_metrics/structure_2026-05-23_cycle8.md + _docs/LESSONS.md (3 new lessons, trimmed to 15 ring-buffer entries). Cycle 8 closed. Next /autodev invocation = cycle 9 Step 0 (orchestrator reset)."
|
||||
phase: 1
|
||||
name: full-suite
|
||||
detail: "Step 10 complete; smoke passed, full suite pending"
|
||||
retry_count: 0
|
||||
cycle: 8
|
||||
cycle: 9
|
||||
tracker: jira
|
||||
auto_push: true
|
||||
|
||||
Reference in New Issue
Block a user