From 03ba1de2aad2e6fc2c6ebbbd6868c32df45c070d Mon Sep 17 00:00:00 2001 From: Polichinl Date: Sat, 27 Jun 2026 02:04:51 +0200 Subject: [PATCH] docs(cic): correct UNFAOPostProcessorManager ADR-008 + env-var claims (#17, C-19) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The manager CIC over-claimed two guarantees the code does not fully meet: - §3 "all structural failures are logged and raised (ADR-008)" -> qualified to "partially": _validate gates + the S0-S6 guards comply, but 3 raises in unfao.py (missing ensemble, missing loa, datasets-None in _save) still lack a preceding logger.error (C-19 / #13). - §4 "assumptions not met must cause failure" -> noted the known gap: Appwrite env vars are read via os.getenv() with no startup validation, so a missing var becomes None and is passed to AppwriteConfig unchecked (#11). Resolves the two remaining #17 discrepancies; the other four were mooted by the PriogridCountryMapper CIC deletion (C-39). Docs-only. Co-Authored-By: Claude Opus 4.8 --- docs/CICs/UNFAOPostProcessorManager.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/CICs/UNFAOPostProcessorManager.md b/docs/CICs/UNFAOPostProcessorManager.md index eb9c68c..b4d6b29 100644 --- a/docs/CICs/UNFAOPostProcessorManager.md +++ b/docs/CICs/UNFAOPostProcessorManager.md @@ -36,7 +36,7 @@ It is the single entrypoint for producing and delivering UN FAO-formatted predic - Guarantees that geographic metadata is added via `GaulLookupEnricher.enrich_dataframe_with_pg_info()` (a cell-id merge against the precomputed lookup) - Guarantees that required metadata columns are validated before upload - Guarantees that both historical and forecast datasets are uploaded to the UN FAO Appwrite bucket with correct metadata (name, loa, type, category) -- Guarantees that all structural failures are logged and raised (ADR-008) +- **Partially** logs-and-raises structural failures (ADR-008): the `_validate` gates and the S0–S6 delivery guards comply, but 3 raises in `unfao.py` (missing `ensemble`, missing `loa`, datasets-None in `_save`) still raise without a preceding `logger.error` — tracked by **C-19 / #13** --- @@ -49,7 +49,7 @@ It is the single entrypoint for producing and delivering UN FAO-formatted predic - Requires the Appwrite production forecasts bucket to contain at least one file with `category="forecast"` - Requires the precomputed GAUL lookup parquet to be present so `GaulLookupEnricher` can load it at construction -Assumptions that are not met **must cause failure**, not fallback behavior. +Assumptions that are not met **must cause failure**, not fallback behavior. **Known gap:** the Appwrite env vars are read via `os.getenv()` without a startup validation — a missing var yields `None`, which is passed to `AppwriteConfig` unchecked rather than failing loud at the boundary (tracked by **C-19-adjacent / #11**; a fail-loud env check is the cheap fix). ---