KSvend Claude Happy commited on
Commit ·
152957b
1
Parent(s): 2044c62
docs: add NDVI batch debugging as pre-requisite in spec
Browse filesGenerated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
docs/superpowers/specs/2026-04-01-batch-sar-buildup-water-design.md
CHANGED
|
@@ -152,9 +152,25 @@ For each indicator, add a test mirroring the existing NDVI batch test pattern:
|
|
| 152 |
|
| 153 |
Use `rasterio.MemoryFile` to create synthetic GeoTIFFs for test fixtures, matching each indicator's expected band layout (interleaved VV/VH for SAR, single-index bands for buildup/water).
|
| 154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 155 |
## Out of Scope
|
| 156 |
|
| 157 |
-
- Debugging why NDVI batch currently returns placeholder results (likely CDSE auth — tracked separately)
|
| 158 |
- Changes to graph builders in `openeo_client.py`
|
| 159 |
- Changes to worker orchestration or polling logic
|
| 160 |
- New shared abstractions or base class methods
|
|
|
|
| 152 |
|
| 153 |
Use `rasterio.MemoryFile` to create synthetic GeoTIFFs for test fixtures, matching each indicator's expected band layout (interleaved VV/VH for SAR, single-index bands for buildup/water).
|
| 154 |
|
| 155 |
+
## Pre-requisite: Debug NDVI Batch
|
| 156 |
+
|
| 157 |
+
NDVI batch currently returns placeholder results despite having `uses_batch = True`. This must be fixed before adding batch to the other three indicators — otherwise we'd be replicating a broken pattern.
|
| 158 |
+
|
| 159 |
+
**Debugging steps**:
|
| 160 |
+
1. Add targeted logging to the worker's batch phases: log the exact exception when `submit_batch()` fails, log job statuses during polling, log download errors during harvest
|
| 161 |
+
2. Test CDSE connection locally — verify `get_connection()` succeeds with the configured `OPENEO_CLIENT_ID` / `OPENEO_CLIENT_SECRET`
|
| 162 |
+
3. If auth works, submit a minimal batch job manually and track it through submit → poll → download
|
| 163 |
+
4. Fix whatever is broken (auth config, connection handling, download path issues, etc.)
|
| 164 |
+
5. Verify NDVI produces `data_source="satellite"` results end-to-end before proceeding
|
| 165 |
+
|
| 166 |
+
**Possible root causes** (ordered by likelihood):
|
| 167 |
+
- CDSE credentials not set or invalid on HF Spaces (memory note: "CDSE creds added, untested")
|
| 168 |
+
- `get_connection()` falls through to browser-based OIDC which fails non-interactively
|
| 169 |
+
- Batch jobs submit but error on CDSE side (graph too large, quota exceeded)
|
| 170 |
+
- Download paths not found after `download_results()` (the `_find_tif` issue)
|
| 171 |
+
|
| 172 |
## Out of Scope
|
| 173 |
|
|
|
|
| 174 |
- Changes to graph builders in `openeo_client.py`
|
| 175 |
- Changes to worker orchestration or polling logic
|
| 176 |
- New shared abstractions or base class methods
|