Skip to content

Feature/issue 10 alert delivery worker#57

Closed
Presmanes3 wants to merge 19 commits into
Climate-Vision:developfrom
Presmanes3:feature/issue-10-alert-delivery-worker
Closed

Feature/issue 10 alert delivery worker#57
Presmanes3 wants to merge 19 commits into
Climate-Vision:developfrom
Presmanes3:feature/issue-10-alert-delivery-worker

Conversation

@Presmanes3
Copy link
Copy Markdown

Summary

  • Implements alert delivery worker with SMTP (email) and webhook channels
  • Retry logic: up to 3 attempts with exponential backoff (60 s, 120 s)
  • Triggered via FastAPI BackgroundTasks on alert creation
  • New endpoint GET /api/organizations/{org_id}/alerts/pending for monitoring
  • Delivery status (delivered/failed/pending) queryable via API
  • No external queue needed — runs entirely within FastAPI

Commits

Commit Message
7492304 Add: SMTP environment variables to .env.example
89d61b2 Add: alert delivery helper functions in db.py
d70356d Add: alert delivery worker with SMTP, webhook and retry logic
69757a7 Add: GET /alerts/pending endpoint and BackgroundTasks integration
bab0cbb Test: alert delivery worker and pending endpoint

Closes #10

femi23 and others added 18 commits April 15, 2026 20:53
… flag, add config health validation

- Add cv_dev development key bypass for local testing
- Require X-API-Key on all mutation endpoints (POST predict, orgs, alerts, subscriptions)
- Surface is_synthetic at root of inference response for frontend demo banners
- Expand /api/health to validate config alignment (bands vs in_channels, classes vs num_classes)
- Add FastAPI test client fixture
- Create CI workflow for Python (flake8, pytest) and frontend (npm build)
- Bootstrap tests/ directory structure
- Parametrize UNet init for all 3 analysis types (4ch/2cl, 4ch/3cl, 3ch/3cl)
- Validate forward pass output shapes
- Add Siamese change detection forward shape test
- Link to 6 active good-first-issue and help-wanted issues
- Add claim workflow for new contributors
- Include time estimates and skill-building map
- ../components/map/ -> ../components/Map/
- Fixes vite build failure on Linux (case-sensitive filesystem)
- Fixes pip install failure for gdal and rasterio on Ubuntu runners
- Adds libgdal-dev, gdal-bin, libgl1-mesa-glx
- gdal Python package requires exact system GDAL version matching
- rasterio covers all GDAL functionality we actually use
- Simplify CI system deps to libgl1 only (for opencv runtime)
- Fixes ModuleNotFoundError: No module named 'climatevision'
- pip install -e . registers src/ as an importable package
- ForestDataset with DataLoader support
- Training/validation augmentation pipelines
- Synthetic tile generation for demo/fallback mode
- Add DONE/PENDING task list for April 2026 sprint
- Include actual .github/workflows/ci.yml code in role doc
- Update local CI check commands to match current workflow
@Presmanes3 Presmanes3 requested a review from Goldokpa as a code owner May 16, 2026 12:48
@Oshgig
Copy link
Copy Markdown
Collaborator

Oshgig commented May 16, 2026

Thank you @Presmanes3 this is solid work and the commit table in the description is a nice touch. Unfortunately we received another implementation of the same feature (#62) that targets main directly and takes a slightly more robust architectural approach (lifespan task vs BackgroundTasks). Rather than maintain two competing implementations I'm closing this one in favour of #62.

Your contribution here especially the retry logic and the structured commit breakdown genuinely helped shape what the final implementation needed to cover. Please don't be discouraged; the work was good and I'd encourage you to pick up another open issue.

@Oshgig Oshgig closed this May 16, 2026
@Presmanes3
Copy link
Copy Markdown
Author

Thank you @Presmanes3 this is solid work and the commit table in the description is a nice touch. Unfortunately we received another implementation of the same feature (#62) that targets main directly and takes a slightly more robust architectural approach (lifespan task vs BackgroundTasks). Rather than maintain two competing implementations I'm closing this one in favour of #62.

Your contribution here especially the retry logic and the structured commit breakdown genuinely helped shape what the final implementation needed to cover. Please don't be discouraged; the work was good and I'd encourage you to pick up another open issue.

Hi @Oshgig No problem! Thank you for the feedback.

Could you please review #58 #59 #60 #61 ? I think the proyect is quite monolithic and will have some problems in the long term. I would love to keep contributing and would like to know if you are open to some refactoring... Thank you!

@Presmanes3 Presmanes3 deleted the feature/issue-10-alert-delivery-worker branch May 17, 2026 10:34
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.

5 participants