feat(api): Sentinel-2 STAC search service and scene resolver edge route #129
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/sentinel-stac-scene-api"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Executed playbook:
skill://poteto-mode/playbooks/feature.mdPrinciples applied
SentinelSceneMetadata,SwirBandUrls,SatellitePlatform,SentinelSceneQueryOptions,SceneResolverResponse) insrc/types/satellite.ts.fetchwith AbortSignal timeouts without adding heavy external geospatial SDKs or STAC client wrappers.id,datetime,cloudCover,platform,visualUrl,swirUrls, and HTTP caching headers) across sunny and degraded network conditions.Impact
For the consumer: Enables real-time optical and Short-Wave Infrared (SWIR) satellite scene resolution for active hotspot fires, revealing burn fronts through smoke haze with seamless Landsat fallback.
For the maintainer: Lightweight, self-contained Next.js Edge route (
/api/satellite/scene) and STAC client library insrc/lib/services/sentinel.tswith comprehensive unit tests and zero external service credentials required.Verification
pnpm test: 46 test files, 318 passing tests (sentinel.test.tspassed 7/7,route.test.tspassed 8/8).pnpm exec tsc --noEmit: 0 TypeScript compiler errors.pnpm exec vp check: 0 formatting or linting errors across 319 files.Closes #69
Code Review & CI Gate Failure: Sentinel-2 STAC Search Service
1. Turbopack / Next.js 16.4 Build Error
Forgejo Actions CI and local
next buildfailed with:2. Required Fix
src/app/api/satellite/scene/route.ts, removeexport const runtime = "edge";.cacheComponentsenabled, segment-levelruntime = "edge"is incompatible and rejected by Turbopack during production build.src/app/api/*).origin/main(atd876fb5), runpnpm test && pnpm build, and push the update tofeat/sentinel-stac-scene-api.8814319018b91b2ba0baCode Review & Ponytail Audit Summary: Sentinel-2 STAC Search Service & Scene Resolver API
1. Mechanical Verification Gate (
scripts/verify-pr.mjs)Closes #69.2. Subsystem Boundary & Discipline
src/types/satellite.ts,src/lib/services/sentinel.ts,src/app/api/satellite/scene/route.ts, and unit test suites.3. Ponytail Audit & Implementation Quality
cacheComponentsarchitecture. PurefetchSTAC queries without bloated external SDKs.SentinelSceneMetadata,SwirBandUrls,SatellitePlatform,SentinelSceneQueryOptions,SceneResolverResponse).4. Verification Gates
vp check: All 321 files correctly formatted, 0 warnings or lint errors.pnpm test: All 324 tests passed across 47 test files.next build: Turbopack production build succeeded cleanly across all 15 routes.5. Acceptance Criteria
Decision: APPROVED for squash merge into
main.