[AZ-372] Apply dotnet format whitespace cleanup; archive batch 22
ci/woodpecker/push/01-test Pipeline was successful
ci/woodpecker/push/02-build-push Pipeline was successful

Pure whitespace-only cleanup uncovered by the new format gate from the
previous commit. Verified via `git diff -w --stat`: only 4 files differ
when whitespace is ignored, and those differ only by the BOM byte.

Cleanup kinds applied across 22 source files:
- BOM removal (MapConfig.cs, SatTile.cs, GeoUtils.cs,
  IntegrationTests/Program.cs)
- CRLF -> LF (IntegrationTests/Program.cs)
- Trailing whitespace on blank lines (Common, Api, DataAccess,
  IntegrationTests, Services.RegionProcessing,
  Services.TileDownloader)
- Final newline added (RoutePoint.cs, GeoPoint.cs, others)

After this commit `dotnet format whitespace SatelliteProvider.sln
--verify-no-changes` exits 0; AC-1 is enforceable from `scripts/
run-tests.sh` going forward.

Also lands the batch 22 report, code-review report
(PASS_WITH_WARNINGS, 2 Low findings — both deferred per spec),
dependency-table status update (AZ-372 -> Done (In Testing)), task
archive (todo/ -> done/), and autodev state update.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-05-11 04:43:08 +03:00
parent 68359350fc
commit 534ab41b8e
28 changed files with 519 additions and 279 deletions
@@ -27,7 +27,7 @@ public class RegionProcessingService : BackgroundService
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
_logger.LogInformation("Region Processing Service started with {MaxConcurrent} parallel workers",
_logger.LogInformation("Region Processing Service started with {MaxConcurrent} parallel workers",
_processingConfig.MaxConcurrentRegions);
var workers = new List<Task>();
@@ -55,7 +55,7 @@ public class RegionProcessingService : BackgroundService
try
{
var request = await _queue.DequeueAsync(stoppingToken);
if (request != null)
{
await _regionService.ProcessRegionAsync(request.Id, stoppingToken);
@@ -24,7 +24,7 @@ public class RegionService : IRegionService
private readonly ILogger<RegionService> _logger;
public RegionService(
IRegionRepository regionRepository,
IRegionRepository regionRepository,
IRegionRequestQueue queue,
ITileService tileService,
IOptions<StorageConfig> storageConfig,
@@ -117,11 +117,11 @@ public class RegionService : IRegionService
try
{
var processingStartTime = DateTime.UtcNow;
var tilesBeforeDownload = await _tileService.GetTilesByRegionAsync(
region.Latitude,
region.Longitude,
region.SizeMeters,
region.Latitude,
region.Longitude,
region.SizeMeters,
region.ZoomLevel);
var existingTileIds = new HashSet<Guid>(tilesBeforeDownload.Select(t => t.Id));
@@ -143,13 +143,13 @@ public class RegionService : IRegionService
string? stitchedImagePath = null;
await GenerateCsvFileAsync(csvPath, tiles, linkedCts.Token);
if (region.StitchTiles)
{
stitchedImagePath = Path.Combine(readyDir, $"region_{id}_stitched.jpg");
await StitchTilesAsync(tiles, region.Latitude, region.Longitude, region.ZoomLevel, stitchedImagePath, linkedCts.Token);
}
await GenerateSummaryFileAsync(summaryPath, id, region, tiles, tilesDownloaded, tilesReused, stitchedImagePath, processingStartTime, linkedCts.Token, errorMessage);
region.Status = RegionStatus.Completed;
@@ -175,8 +175,8 @@ public class RegionService : IRegionService
}
private async Task HandleProcessingFailureAsync(
Guid id,
RegionEntity region,
Guid id,
RegionEntity region,
DateTime startTime,
List<TileMetadata>? tiles,
int tilesDownloaded,
@@ -185,7 +185,7 @@ public class RegionService : IRegionService
{
region.Status = RegionStatus.Failed;
region.UpdatedAt = DateTime.UtcNow;
try
{
var readyDir = _storageConfig.ReadyDirectory;
@@ -195,14 +195,14 @@ public class RegionService : IRegionService
region.SummaryFilePath = summaryPath;
await GenerateSummaryFileAsync(
summaryPath,
id,
region,
tiles ?? new List<TileMetadata>(),
tilesDownloaded,
tilesReused,
summaryPath,
id,
region,
tiles ?? new List<TileMetadata>(),
tilesDownloaded,
tilesReused,
null,
startTime,
startTime,
CancellationToken.None,
errorMessage);
}
@@ -215,9 +215,9 @@ public class RegionService : IRegionService
}
private async Task<string> StitchTilesAsync(
List<TileMetadata> tiles,
double centerLatitude,
double centerLongitude,
List<TileMetadata> tiles,
double centerLatitude,
double centerLongitude,
int zoomLevel,
string outputPath,
CancellationToken cancellationToken)
@@ -291,8 +291,8 @@ public class RegionService : IRegionService
}
private async Task GenerateSummaryFileAsync(
string filePath,
Guid regionId,
string filePath,
Guid regionId,
RegionEntity region,
List<TileMetadata> tiles,
int tilesDownloaded,
@@ -314,21 +314,21 @@ public class RegionService : IRegionService
summary.AppendLine($"Zoom Level: {region.ZoomLevel}");
summary.AppendLine($"Status: {region.Status.ToString().ToLowerInvariant()}");
summary.AppendLine();
if (!string.IsNullOrEmpty(errorMessage))
{
summary.AppendLine("ERROR:");
summary.AppendLine(errorMessage);
summary.AppendLine();
}
summary.AppendLine("Processing Statistics:");
summary.AppendLine($"- Tiles Downloaded: {tilesDownloaded}");
summary.AppendLine($"- Tiles Reused from Cache: {tilesReused}");
summary.AppendLine($"- Total Tiles: {tiles.Count}");
summary.AppendLine($"- Processing Time: {processingTime:F2} seconds");
summary.AppendLine($"- Started: {startTime:yyyy-MM-dd HH:mm:ss} UTC");
if (region.Status == RegionStatus.Completed)
{
summary.AppendLine($"- Completed: {endTime:yyyy-MM-dd HH:mm:ss} UTC");
@@ -337,21 +337,21 @@ public class RegionService : IRegionService
{
summary.AppendLine($"- Failed: {endTime:yyyy-MM-dd HH:mm:ss} UTC");
}
summary.AppendLine();
summary.AppendLine("Files Created:");
if (tiles.Count > 0)
{
summary.AppendLine($"- CSV: {Path.GetFileName(filePath).Replace("_summary.txt", "_ready.csv")}");
}
if (!string.IsNullOrEmpty(stitchedImagePath))
{
summary.AppendLine($"- Stitched Image: {Path.GetFileName(stitchedImagePath)}");
summary.AppendLine($"- Stitched Image Path: {stitchedImagePath}");
}
summary.AppendLine($"- Summary: {Path.GetFileName(filePath)}");
await File.WriteAllTextAsync(filePath, summary.ToString(), cancellationToken);