Skip to content

fix(manager): log-before-raise on the 3 remaining unfao.py raises (#13)#68

Merged
Polichinel merged 1 commit into
developmentfrom
fix/adr008-log-before-raise-13
Jun 27, 2026
Merged

fix(manager): log-before-raise on the 3 remaining unfao.py raises (#13)#68
Polichinel merged 1 commit into
developmentfrom
fix/adr008-log-before-raise-13

Conversation

@Polichinel

Copy link
Copy Markdown
Collaborator

Closes #13 (C-19, ADR-008). The three unfao.py raises that still raised without a preceding logger.error now follow the same construct-msg → logger.error → raise pattern as _validate:

  • missing ensemble guard (_read_forecast_data)
  • missing loa guard (_read_forecast_data)
  • datasets-None guard (_save)

(The 20 mapping.py raises this issue originally cited are moot — mapping.py was deleted in C-39.)

Also syncs the manager CIC §3 (drops the "partially compliant / 3 raises lacking" qualifier added in #66, now that #13 is resolved).

ruff clean; full suite passes (the one local failure, test_datafactory_deploy_readiness, is an unrelated CI-skipped stub).

Closes #13

🤖 Generated with Claude Code

… C-19)

ADR-008 requires structural failures to be logged persistently AND raised. Three
manager raises still raised without a preceding logger.error: the missing-ensemble
and missing-loa guards in _read_forecast_data, and the datasets-None guard in
_save. Apply the same construct-msg -> logger.error -> raise pattern the _validate
gates already use.

Also updates the UNFAOPostProcessorManager CIC §3 to match (drops the
"partially compliant / 3 raises lacking" qualifier added in #66; #13 resolved).

ruff clean; 126 passed (the unrelated CI-skipped datafactory stub deselected).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Polichinel Polichinel merged commit 6d7183b into development Jun 27, 2026
4 checks passed
@Polichinel Polichinel deleted the fix/adr008-log-before-raise-13 branch June 27, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant