mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-06-21 10:11:13 +00:00
[AZ-812] Region API: rename Latitude/Longitude → Lat/Lon (OSM convention)
Mirror of AZ-794 (inventory z/x/y rename). RequestRegionRequest.cs renames C#
props Latitude→Lat / Longitude→Lon and adds [JsonPropertyName("lat"/"lon")] so
the wire format is unambiguous under the AZ-795 strict-parsing stack
(UnmappedMemberHandling.Disallow → legacy {"latitude":..,"longitude":..} now
returns HTTP 400 instead of silently coercing).
Updates all in-repo consumers: API handler (Program.cs), integration tests
(Models.cs, RegionTests.cs, IdempotentPostTests.cs, SecurityTests.cs), the
performance harness (run-performance-tests.sh PT-03/04/05/07), and module
docs (common_dtos.md, api_program.md; system-flows.md F2 already used
lat/lon). New RegionFieldRenameTests.cs covers AC-4 both directions (new
format → 200, legacy format → 400). Smoke green; no regressions.
region-request.md contract doc not bumped here — AZ-808 publishes v1.0.0
directly with the post-rename names per AZ-812 coordination clause.
Batch 01 of cycle 8. PASS_WITH_WARNINGS (one Low DRY finding for follow-up
test-helper consolidation; details in
_docs/03_implementation/reviews/batch_01_cycle8_review.md).
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -197,7 +197,7 @@ fi
|
||||
echo ""
|
||||
echo "PT-03: Region Processing 200m / zoom 18 (threshold: 60000ms)"
|
||||
PT03_ID=$(uuidgen | tr '[:upper:]' '[:lower:]')
|
||||
PT03_BODY="{\"id\":\"$PT03_ID\",\"latitude\":47.461747,\"longitude\":37.647063,\"sizeMeters\":200,\"zoomLevel\":18,\"stitchTiles\":false}"
|
||||
PT03_BODY="{\"id\":\"$PT03_ID\",\"lat\":47.461747,\"lon\":37.647063,\"sizeMeters\":200,\"zoomLevel\":18,\"stitchTiles\":false}"
|
||||
START=$(date +%s%N)
|
||||
HTTP_CODE=$(curl "${CURL_OPTS[@]}" -s -o /dev/null -w "%{http_code}" -X POST -H "Content-Type: application/json" -H "$AUTH_HEADER" -d "$PT03_BODY" "$API_URL/api/satellite/request")
|
||||
if [[ "$HTTP_CODE" == "200" || "$HTTP_CODE" == "202" ]]; then
|
||||
@@ -218,7 +218,7 @@ fi
|
||||
echo ""
|
||||
echo "PT-04: Region Processing 500m / zoom 18 + stitch (threshold: 120000ms)"
|
||||
PT04_ID=$(uuidgen | tr '[:upper:]' '[:lower:]')
|
||||
PT04_BODY="{\"id\":\"$PT04_ID\",\"latitude\":47.461747,\"longitude\":37.647063,\"sizeMeters\":500,\"zoomLevel\":18,\"stitchTiles\":true}"
|
||||
PT04_BODY="{\"id\":\"$PT04_ID\",\"lat\":47.461747,\"lon\":37.647063,\"sizeMeters\":500,\"zoomLevel\":18,\"stitchTiles\":true}"
|
||||
START=$(date +%s%N)
|
||||
HTTP_CODE=$(curl "${CURL_OPTS[@]}" -s -o /dev/null -w "%{http_code}" -X POST -H "Content-Type: application/json" -H "$AUTH_HEADER" -d "$PT04_BODY" "$API_URL/api/satellite/request")
|
||||
if [[ "$HTTP_CODE" == "200" || "$HTTP_CODE" == "202" ]]; then
|
||||
@@ -245,7 +245,7 @@ for i in 1 2 3 4 5; do
|
||||
PT05_IDS+=("$rid")
|
||||
LAT=$(awk "BEGIN { printf \"%.6f\", 47.461747 + 0.001 * $i }")
|
||||
LON=$(awk "BEGIN { printf \"%.6f\", 37.647063 + 0.001 * $i }")
|
||||
BODY="{\"id\":\"$rid\",\"latitude\":$LAT,\"longitude\":$LON,\"sizeMeters\":200,\"zoomLevel\":18,\"stitchTiles\":false}"
|
||||
BODY="{\"id\":\"$rid\",\"lat\":$LAT,\"lon\":$LON,\"sizeMeters\":200,\"zoomLevel\":18,\"stitchTiles\":false}"
|
||||
HTTP_CODE=$(curl "${CURL_OPTS[@]}" -s -o /dev/null -w "%{http_code}" -X POST -H "Content-Type: application/json" -H "$AUTH_HEADER" -d "$BODY" "$API_URL/api/satellite/request")
|
||||
if [[ "$HTTP_CODE" != "200" && "$HTTP_CODE" != "202" ]]; then
|
||||
echo " ✗ PT-05: enqueue $i HTTP $HTTP_CODE (expected 200/202)"
|
||||
@@ -303,7 +303,7 @@ for ((i=0; i<PERF_REPEAT_COUNT; i++)); do
|
||||
rid=$(uuidgen | tr '[:upper:]' '[:lower:]')
|
||||
lat=$(awk -v base="$PT07_BASE_LAT" -v idx="$i" 'BEGIN { printf "%.6f", base + 0.002 * idx }')
|
||||
lon=$(awk -v base="$PT07_BASE_LON" -v idx="$i" 'BEGIN { printf "%.6f", base + 0.002 * idx }')
|
||||
body="{\"id\":\"$rid\",\"latitude\":$lat,\"longitude\":$lon,\"sizeMeters\":200,\"zoomLevel\":18,\"stitchTiles\":false}"
|
||||
body="{\"id\":\"$rid\",\"lat\":$lat,\"lon\":$lon,\"sizeMeters\":200,\"zoomLevel\":18,\"stitchTiles\":false}"
|
||||
start=$(date +%s%N)
|
||||
code=$(curl "${CURL_OPTS[@]}" -s -o /dev/null -w "%{http_code}" -X POST -H "Content-Type: application/json" -H "$AUTH_HEADER" -d "$body" "$API_URL/api/satellite/request")
|
||||
if [[ "$code" != "200" && "$code" != "202" ]]; then
|
||||
@@ -327,7 +327,7 @@ for ((i=0; i<PERF_REPEAT_COUNT; i++)); do
|
||||
rid=$(uuidgen | tr '[:upper:]' '[:lower:]')
|
||||
lat=$(awk -v base="$PT07_BASE_LAT" -v idx="$i" 'BEGIN { printf "%.6f", base + 0.002 * idx }')
|
||||
lon=$(awk -v base="$PT07_BASE_LON" -v idx="$i" 'BEGIN { printf "%.6f", base + 0.002 * idx }')
|
||||
body="{\"id\":\"$rid\",\"latitude\":$lat,\"longitude\":$lon,\"sizeMeters\":200,\"zoomLevel\":18,\"stitchTiles\":false}"
|
||||
body="{\"id\":\"$rid\",\"lat\":$lat,\"lon\":$lon,\"sizeMeters\":200,\"zoomLevel\":18,\"stitchTiles\":false}"
|
||||
start=$(date +%s%N)
|
||||
code=$(curl "${CURL_OPTS[@]}" -s -o /dev/null -w "%{http_code}" -X POST -H "Content-Type: application/json" -H "$AUTH_HEADER" -d "$body" "$API_URL/api/satellite/request")
|
||||
if [[ "$code" != "200" && "$code" != "202" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user