feat(daops): live DAOPS suppression and groundcheck edge API route #111

Merged
yuris merged 2 commits from feat/issue-62-daops-edge-api into main 2026-10-15 02:59:50 +00:00
Owner

Executed playbook: skill://poteto-mode/playbooks/feature.md

Principles applied

  • principle-model-the-domain: Encoded field suppression and groundcheck state in typed DaopsMission entities with strict status tiers (SEDANG_PEMADAMAM, PADAM_TERKENDALI, GROUNDCHECK).
  • principle-boundary-discipline: Parsed and normalized external SiPongi+ Daops monitoring responses at the boundary, guarding against malformed upstream types while keeping internal service logic pure.
  • principle-subtract-before-you-add: Reused in-memory SWR caching and lightweight GeoJSON responses without extra stateful stores.
  • principle-prove-it-works: Verified live fetcher with graceful fallback, proximity filtering, and SWR caching headers via automated test suite.
  • principle-test-behavior-not-implementation: Verified observable GeoJSON outputs, status filters, and cache response headers against literal values.

Impact

For the consumer: Surfaces real-time suppression activity, groundcheck progress, burned hectare estimates, and assigned Manggala Agni brigades on the map and detail drawers.
For the maintainer: Provides a resilient /api/daops edge endpoint with reliable fallback seed data and 5-minute SWR caching to protect against upstream outages.

Verification

  • Tested via vitest: 22 test files, 151 passing tests (pnpm test).
  • Code quality and formatting: pnpm exec vp check passed with zero errors across 263 files.
  • Production build: next build succeeded with /api/daops registered as a dynamic edge route.

Closes #62

Executed playbook: `skill://poteto-mode/playbooks/feature.md` ### Principles applied - principle-model-the-domain: Encoded field suppression and groundcheck state in typed DaopsMission entities with strict status tiers (`SEDANG_PEMADAMAM`, `PADAM_TERKENDALI`, `GROUNDCHECK`). - principle-boundary-discipline: Parsed and normalized external SiPongi+ Daops monitoring responses at the boundary, guarding against malformed upstream types while keeping internal service logic pure. - principle-subtract-before-you-add: Reused in-memory SWR caching and lightweight GeoJSON responses without extra stateful stores. - principle-prove-it-works: Verified live fetcher with graceful fallback, proximity filtering, and SWR caching headers via automated test suite. - principle-test-behavior-not-implementation: Verified observable GeoJSON outputs, status filters, and cache response headers against literal values. ### Impact For the consumer: Surfaces real-time suppression activity, groundcheck progress, burned hectare estimates, and assigned Manggala Agni brigades on the map and detail drawers. For the maintainer: Provides a resilient `/api/daops` edge endpoint with reliable fallback seed data and 5-minute SWR caching to protect against upstream outages. ### Verification - Tested via vitest: 22 test files, 151 passing tests (`pnpm test`). - Code quality and formatting: `pnpm exec vp check` passed with zero errors across 263 files. - Production build: `next build` succeeded with `/api/daops` registered as a dynamic edge route. Closes #62
yuris force-pushed feat/issue-62-daops-edge-api from d2cec5f57b
All checks were successful
CI / Verify Quality & Build (pull_request) Successful in 1m13s
to 397f152e9c
All checks were successful
CI / Verify Quality & Build (pull_request) Successful in 1m11s
2026-10-15 02:58:27 +00:00
Compare
yuris-bot approved these changes 2026-10-15 02:58:59 +00:00
yuris-bot left a comment

Code Review & Ponytail Audit Summary: Live DAOPS Suppression & Groundcheck Edge API

1. Mechanical Verification Gate (scripts/verify-pr.mjs)

  • Passed all checks: title conventional format, mandatory principles citations, impact framing, and anti-overengineering file path filters.

2. Ponytail Audit (Zero Bespoke Bloat)

  • Data Architecture: Reuses existing in-memory SWR caching pattern and lightweight GeoJSON formatting without external databases or stateful dependencies.
  • Resilience: Seed operational dataset (SEED_DAOPS_MISSIONS) provides instant zero-latency fallback whenever upstream SiPongi opsroom is unreachable or timing out.
  • Audit verdict: Lean already. Ship.

3. Subsystem Boundary & Discipline

  • Confined to backend and data domain (src/app/api/daops/**, src/lib/services/daops.ts, src/types/daops.ts). Zero frontend UI components touched.

4. Verification & Test Proofs

  • vp check: Passed 100% (265 files formatted, 0 warnings/lint errors in 105 files).
  • pnpm test: All 159 tests passed across 23 test suites, including full coverage of mission normalization, proximity radius filtering, SWR cache hits/misses, and upstream error fallback.
  • next build: Next.js Turbopack build succeeded with all static and dynamic endpoints generated.

5. Acceptance Criteria

  • Verified and checked off all acceptance criteria checkboxes on linked Issue #62.

Decision: APPROVED for squash merge into main.

### Code Review & Ponytail Audit Summary: Live DAOPS Suppression & Groundcheck Edge API #### 1. Mechanical Verification Gate (`scripts/verify-pr.mjs`) - Passed all checks: title conventional format, mandatory principles citations, impact framing, and anti-overengineering file path filters. #### 2. Ponytail Audit (Zero Bespoke Bloat) - **Data Architecture**: Reuses existing in-memory SWR caching pattern and lightweight GeoJSON formatting without external databases or stateful dependencies. - **Resilience**: Seed operational dataset (`SEED_DAOPS_MISSIONS`) provides instant zero-latency fallback whenever upstream SiPongi opsroom is unreachable or timing out. - **Audit verdict**: `Lean already. Ship.` #### 3. Subsystem Boundary & Discipline - Confined to backend and data domain (`src/app/api/daops/**`, `src/lib/services/daops.ts`, `src/types/daops.ts`). Zero frontend UI components touched. #### 4. Verification & Test Proofs - `vp check`: Passed 100% (265 files formatted, 0 warnings/lint errors in 105 files). - `pnpm test`: All 159 tests passed across 23 test suites, including full coverage of mission normalization, proximity radius filtering, SWR cache hits/misses, and upstream error fallback. - `next build`: Next.js Turbopack build succeeded with all static and dynamic endpoints generated. #### 5. Acceptance Criteria - Verified and checked off all acceptance criteria checkboxes on linked Issue #62. **Decision**: APPROVED for squash merge into `main`.
yuris merged commit 7c0ede06c5 into main 2026-10-15 02:59:50 +00:00
yuris deleted branch feat/issue-62-daops-edge-api 2026-10-15 02:59:51 +00:00
Sign in to join this conversation.
No reviewers
No labels
backend
frontend
No milestone
No project
No assignees
2 participants
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!111
No description provided.