Skip to content

Phase 0 — Stabilize PoC

Status: Closed 2026-04-15. See plan.md for the active phase.

Goal

Make the existing PoC (river flood, Greece, buildings, EAD, GeoJSON, control panel UI) production-ready before expanding scope. No new features — pure stabilization.

Definition of done

  • docker compose up starts all services and they reach ready
  • Demo script runs end-to-end against a fresh stack
  • CI is green
  • CLIMADA adapter is removed; the worker depends only on climate-lama-engine
  • climate-lama-engine is published to PyPI

All four conditions met at close.

PoC origin (pre-Phase 0)

Phase 0 stabilizes a PoC that was already functional. The PoC itself was built under six un-milestoned foundational issues, all closed before Phase 0 opened:

Issue Title
#8 chore: bootstrap Alembic migrations
#9 feat: add ORM models and initial migration for hazard, impact_function, job, result
#10 feat: add repositories for hazard, impact_function, job, result
#11 feat: JRC flood ETL pipeline and centroid assignment
#12 feat: implement compute_impact_lean Celery task
#13 feat: add API endpoints for hazards, impact functions, compute, jobs, results

The PoC was river flood / Greece / buildings / EAD / GeoJSON rendered in a React control panel. Phase 0 takes that as input and produces the production-ready vertical slice described below.

Outcome summary

  • CLIMADA runtime dependency removed from the backbone — only the engine's lean numpy/scipy core ships with worker images.
  • climate-lama-engine 0.1.0 published to PyPI. The backbone pins a released version; no sibling-repo editable install.
  • GitHub Actions: lint + test + coverage gate on every push; release workflow for engine PyPI publish. See .github/workflows/ci.yml.
  • Pre-commit hooks (ruff, ruff-format) standardised across the backbone.
  • Decision log migrated to ADR format under ../DECISIONS.md. ADR-001 through ADR-018 authored in Phase 0 (ADR-016 and ADR-017 refactored under #21 to reference climate-lama-engine).
  • Readiness probe wired against Postgres / Redis / MinIO; /health returns only when dependencies are live. Compose-level healthcheck blocks added for each backing service in docker-compose.yml.
  • End-to-end demo script scripts/demo.py exercises the full vertical slice: ingest → exposure → compute → result → GeoJSON.

GitHub issues

Engine (climate-lama-engine)

Issue Title
engine#1 Add GitHub Actions CI (lint, test, PyPI release)
engine#2 Add CLEAN_ROOM.md and CHANGELOG.md
backbone #7 Publish climate-lama-engine 0.1.0 to PyPI

Backbone (climate-lama)

Issue Title
#1 Formalize decision log into ADR format
#2 Add pre-commit hooks
#3 GitHub Actions CI/CD
#14 End-to-end integration tests
#15 Map HazardType enum to engine haz_type codes
#17 Rename ImpactResult.exposure_idexposure_dataset_id
#19 Remove CLIMADA adapter and full-worker dependency
#20 Remove tool.uv.sources local path
#21 Update ADRs 016–017 to reference climate-lama-engine
#22 Add readiness health check with dependency probing
#23 Create demo script for end-to-end walkthrough
#24 Update CLAUDE.md and project docs after CLIMADA removal
#36 Re-enable worker tests and raise coverage threshold (CI polish; unlabeled on GitHub but merged alongside Phase 0 close)

Carry-overs and loose ends

None — all Phase 0 issues closed. The CI-polish issue #36 landed as follow-up to the engine PyPI publish (#7) and local-path removal (#20); it is included in the table above because it closes out the Phase 0 DoD even though the Phase 0 -- Stabilize PoC milestone label was not applied on GitHub.

Retrospective audit (2026-04-18)

Post-phase cross-reference against actual closed work surfaced four items that would have fit Phase 0 scope but were never filed. All four were filed retrospectively and carried to later phases rather than reopening Phase 0:

Issue Target phase Title
#100 Phase 2 chore(ci): add mypy static type-checking to CI
#101 Phase 2 docs(adr): ADR for worker-side CLIMADA runtime removal
#102 Phase 3 docs(adr): dev secrets and config management strategy
#103 Phase 3 docs: integration-test troubleshooting runbook for scripts/demo.py

Verification

  • gh issue list --repo CortoMaltese3/climate-lama --milestone "Phase 0 -- Stabilize PoC" --state all returns the 13 milestoned issues above (every one Closed). #36 was relabeled to the Phase 0 milestone during the 2026-04-18 audit.
  • Every issue listed is Closed.