mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-06-21 18:51:13 +00:00
b0fffa6d42
Phase A baseline outputs from /autodev (Steps 1-5): - Problem & solution docs (_docs/00_problem, _docs/01_solution) - Codebase documentation (_docs/02_document) incl. architecture, module-layout, glossary, system-flows, baseline compliance scan - Test specs (blackbox, performance, resilience, security, resource, traceability matrix) - Test task decomposition (_docs/02_tasks/todo): AZ-285..AZ-290 - Testability refactor (_docs/04_refactoring/01-testability-refactoring): - TC-01 Move DownloadedTileInfoV2 + new ExistingTileInfo to Common.DTO - TC-02 Replace dead ISatelliteDownloader API with real signatures - TC-03 GoogleMapsDownloaderV2 implements ISatelliteDownloader - TC-04 TileService depends on ISatelliteDownloader (mockable) - TC-05 DI + endpoints use ISatelliteDownloader - Test runner scripts (scripts/run-tests.sh, run-performance-tests.sh) - Autodev state pointer (_docs/_autodev_state.md) Prepares the codebase for AZ-285..AZ-290 unit/integration test work. Co-authored-by: Cursor <cursoragent@cursor.com>
49 lines
3.3 KiB
Markdown
49 lines
3.3 KiB
Markdown
# Acceptance Criteria
|
|
|
|
## Tile Download
|
|
|
|
| # | Criterion | Measurable Value | Source |
|
|
|---|----------|-----------------|--------|
|
|
| T1 | Tiles are cached and not re-downloaded | 0 duplicate downloads for same (lat, lon, zoom, version) | Unique index idx_tiles_unique_location |
|
|
| T2 | Concurrent download limit is enforced | Max 4 simultaneous HTTP requests to Google Maps | ProcessingConfig.MaxConcurrentDownloads |
|
|
| T3 | Tile stored on disk with correct path | File exists at `./tiles/{zoom}/{x}/{y}.jpg` | TileService storage logic |
|
|
| T4 | Tile metadata persisted in database | TileEntity row created with all fields populated | TileRepository.InsertAsync |
|
|
|
|
## Region Processing
|
|
|
|
| # | Criterion | Measurable Value | Source |
|
|
|---|----------|-----------------|--------|
|
|
| R1 | Region transitions through correct states | pending → processing → completed (or failed) | RegionProcessingService state updates |
|
|
| R2 | CSV manifest generated on completion | File exists at `./ready/region_{id}_ready.csv` | RegionService.ProcessRegionAsync |
|
|
| R3 | Summary file generated on completion | File exists at `./ready/region_{id}_summary.txt` | RegionService.GenerateSummaryFileAsync |
|
|
| R4 | Stitched image generated when requested | File exists at `./ready/region_{id}_stitched.jpg` when stitch_tiles=true | RegionService.StitchTilesAsync |
|
|
| R5 | Stitched image has valid content | File size > 1024 bytes | Integration test assertion |
|
|
| R6 | Region processing is bounded | Max 20 concurrent regions | ProcessingConfig.MaxConcurrentRegions |
|
|
|
|
## Route Management
|
|
|
|
| # | Criterion | Measurable Value | Source |
|
|
|---|----------|-----------------|--------|
|
|
| RT1 | Points interpolated at correct interval | Intermediate points every ~200m along path | RouteService (InterpolatePoints) |
|
|
| RT2 | Point types correctly assigned | "original" for input waypoints, "intermediate" for generated | RoutePointEntity.PointType |
|
|
| RT3 | Total distance calculated | Haversine sum matches within acceptable precision | RouteService.CreateRoute |
|
|
| RT4 | Geofence filtering applied | Only points inside geofence rectangles generate regions | RouteService (point-in-rectangle check) |
|
|
| RT5 | ZIP archive within size limit | ≤ 50 MB | RouteProcessingService ZIP generation |
|
|
| RT6 | Route map stitched when maps requested | Stitched image > 1024 bytes when request_maps=true | Integration test assertion |
|
|
|
|
## API Behavior
|
|
|
|
| # | Criterion | Measurable Value | Source |
|
|
|---|----------|-----------------|--------|
|
|
| A1 | Region request returns immediately | HTTP 200 with region_id (async processing) | POST /api/satellite/request |
|
|
| A2 | Status endpoint reflects real state | Returns current status and file paths | GET /api/satellite/region/{id} |
|
|
| A3 | Route creation returns computed metadata | Response includes total_points, total_distance_meters | POST /api/satellite/route |
|
|
|
|
## System Reliability
|
|
|
|
| # | Criterion | Measurable Value | Source |
|
|
|---|----------|-----------------|--------|
|
|
| S1 | Database migrations run on startup | All numbered scripts executed in order | DatabaseMigrator.Migrate() |
|
|
| S2 | Queue rejects when full | Channel capacity = 1000, bounded wait | RegionRequestQueue (BoundedChannelOptions) |
|
|
| S3 | Failed regions marked as failed | Status = "failed" on unrecoverable error | RegionProcessingService error handling |
|