fix(telemetry): eliminate synthetic fallbacks in SSR summary and weather service #94

Merged
yuris merged 1 commit from fix/remove-synthetic-fallbacks into main 2026-10-15 00:04:45 +00:00
Owner

Summary

Eliminates silent synthetic fallbacks in server-side fire summary rendering and weather telemetry observation.

Closes #93

Principles applied

  • principle-subtract-before-you-add: Deleted 37 lines of hardcoded mock numbers and synthetic dry-season weather fallbacks rather than layering extra fallback wrappers.
  • principle-test-behavior-not-implementation: Added 10 unit test cases verifying error boundaries, caching behavior, and failure signaling without checking implementation internals.
  • principle-boundary-discipline: Isolated upstream API communication failure handling at the service boundary so API routes return standard HTTP 502 responses.
  • ponytail-review: Audited diff to ensure zero unnecessary dependencies, bespoke crates, or cosmetic compliance were introduced.

Impact

  • For the consumer: Eliminates false fire reports (10,334 fake hotspots) and imaginary smoke dispersion plumes when upstream government APIs or weather feeds experience transient outages.
  • For the maintainer: Clean failure modes with descriptive error logs and standard HTTP 502 Bad Gateway responses instead of hidden silent synthetic fallbacks.

Anti-Overengineering Audit (ponytail-review)

  • No bespoke tools or in-house crates added when standard upstream libraries exist.
  • No cosmetic compliance (e.g. importing a library just to call an unused helper or info command).
  • Code subtraction evaluated: unnecessary wrappers or files were deleted rather than preserved.

Verification proof

  • pnpm exec vp check: Passed cleanly with zero formatting or lint errors across 241 files.
  • pnpm test: 14 test suites and 84 unit tests passed in 572ms.
  • pnpm build: Next.js 16.4.0 Turbopack production build succeeded with all 12 routes generated cleanly.
## Summary Eliminates silent synthetic fallbacks in server-side fire summary rendering and weather telemetry observation. Closes #93 ### Principles applied - `principle-subtract-before-you-add`: Deleted 37 lines of hardcoded mock numbers and synthetic dry-season weather fallbacks rather than layering extra fallback wrappers. - `principle-test-behavior-not-implementation`: Added 10 unit test cases verifying error boundaries, caching behavior, and failure signaling without checking implementation internals. - `principle-boundary-discipline`: Isolated upstream API communication failure handling at the service boundary so API routes return standard HTTP 502 responses. - `ponytail-review`: Audited diff to ensure zero unnecessary dependencies, bespoke crates, or cosmetic compliance were introduced. ### Impact - **For the consumer:** Eliminates false fire reports (10,334 fake hotspots) and imaginary smoke dispersion plumes when upstream government APIs or weather feeds experience transient outages. - **For the maintainer:** Clean failure modes with descriptive error logs and standard HTTP 502 Bad Gateway responses instead of hidden silent synthetic fallbacks. ### Anti-Overengineering Audit (ponytail-review) - [x] No bespoke tools or in-house crates added when standard upstream libraries exist. - [x] No cosmetic compliance (e.g. importing a library just to call an unused helper or info command). - [x] Code subtraction evaluated: unnecessary wrappers or files were deleted rather than preserved. ### Verification proof - `pnpm exec vp check`: Passed cleanly with zero formatting or lint errors across 241 files. - `pnpm test`: 14 test suites and 84 unit tests passed in 572ms. - `pnpm build`: Next.js 16.4.0 Turbopack production build succeeded with all 12 routes generated cleanly.
fix(telemetry): eliminate synthetic fallbacks in SSR summary and weather service
All checks were successful
CI / Verify Quality & Build (pull_request) Successful in 1m51s
03eb268677
- Replace hardcoded 10,334 hotspots fallback in getSummaryData with empty zero-hotspot summary upon SiPongi upstream failure
- Remove synthetic dry-season weather fallback in fetchWeatherObservation to throw when Open-Meteo fails without cache
- Return HTTP 502 with structured diagnostic error payload in /api/weather
- Add regression test suites for weather service, weather API endpoint, and crawlable SEO summary component

Closes #93
yuris merged commit 7f47f6647e into main 2026-10-15 00:04:45 +00:00
yuris deleted branch fix/remove-synthetic-fallbacks 2026-10-15 00:04:45 +00:00
Sign in to join this conversation.
No reviewers
No labels
backend
frontend
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
yuris/titik-gambut-next!94
No description provided.