# Expected Results Report

## Tile Expected Results

| Input ID | Expected Result | Tolerance | Pass/Fail Criterion |
|----------|----------------|-----------|---------------------|
| TILE-01 | Tile downloaded and stored | — | HTTP 200; response has: zoomLevel=18, tileSizePixels=256, imageType="jpg", filePath non-empty |
| TILE-01 (reuse) | Same tile returned from cache | — | Second request returns same tile ID; no re-download |

## Region Expected Results

| Input ID | Expected Result | Tolerance | Pass/Fail Criterion |
|----------|----------------|-----------|---------------------|
| REG-01 | Region processes to completion | < 240s | status="completed"; csvFilePath non-empty; summaryFilePath non-empty |
| REG-02 | Region processes to completion | < 240s | status="completed"; csvFilePath non-empty; summaryFilePath non-empty |
| REG-03 | Region with stitching completes | < 240s | status="completed"; csvFilePath non-empty; summaryFilePath non-empty; stitched image file > 1024 bytes |
| REG-01 (tile count) | Tiles downloaded > 0 | — | tilesDownloaded + tilesReused > 0 |

## Route Expected Results

| Input ID | Expected Result | Tolerance | Pass/Fail Criterion |
|----------|----------------|-----------|---------------------|
| ROUTE-01 | Route created with interpolated points | — | totalPoints > 2; all intermediate point spacing ≤ 200m; original point count = 2 (first + last) |
| ROUTE-01 (retrieval) | Route retrievable by ID | — | GET /api/satellite/route/{id} returns same route with all points |
| ROUTE-02 | Route maps processed | < 180s | mapsReady=true; stitchedImagePath non-empty; csvFilePath non-empty; stitched image > 1024 bytes |
| ROUTE-03 | Route with ZIP created | < 180s | mapsReady=true; tilesZipPath non-empty; ZIP file > 1024 bytes; ZIP entry count = unique tile count from CSV; ZIP entries start with "tiles/" path prefix; ZIP has directory structure (≥5 path parts) |
| ROUTE-04 | Complex route maps processed | < 240s | mapsReady=true; uniqueTileCount ≥ 10; stitched image > 1024 bytes |
| ROUTE-05 | Route with geofences processed | < 240s | mapsReady=true; uniqueTileCount ≥ 10; stitched image > 1024 bytes; geofence regions created |
| ROUTE-06 | Extended route maps processed | < 360s | mapsReady=true; uniqueTileCount ≥ 20; stitched image > 1024 bytes |

## Point Interpolation Expected Results

| Input | Expected | Tolerance | Pass/Fail Criterion |
|-------|----------|-----------|---------------------|
| ROUTE-01 (2 points, ~1.2km apart) | Points interpolated every ~200m | spacing ≤ 200m | Every consecutive point pair has distance ≤ 200m; point_type for first = "original", intermediates = "intermediate", last = "original" |
| ROUTE-04 (10 points) | Original points: first + last = 2; intermediate points = 8 per pair | — | ValidatePointTypes(route, 1, 1, 8) — 1 first-original, 1 last-original, 8 intermediate |
| ROUTE-06 (20 points) | Original points: first + last = 2; intermediate points = 18 | — | ValidatePointTypes(route, 1, 1, 18) |

## API Behavior Expected Results

| Scenario | Expected | Pass/Fail Criterion |
|----------|----------|---------------------|
| Region request (POST) | Immediate response with pending status | HTTP 200; response.status = "pending" or "processing" |
| Region poll (GET) | Status transitions correctly | Eventually reaches "completed" or "failed" |
| Invalid route (< 2 points) | Rejected | HTTP 400 or validation error |
| Tile reuse | Same tile not re-downloaded | tilesReused > 0 when requesting overlapping regions |

## Timing Constraints

| Operation | Max Duration | Source |
|-----------|-------------|--------|
| Single tile download | 30s | HttpClient timeout |
| Region processing (200m, zoom 18) | 240s | Integration test poll limit |
| Route map processing (2 points) | 180s | Integration test poll limit |
| Route map processing (10 points) | 240s | Integration test poll limit |
| Route map processing (20 points) | 360s | Integration test poll limit |
| API readiness on startup | 60s | WaitForApiReady (30 retries × 2s) |
