02-Dec-2025 — Deployment, Member-admin and 1 more areas: 4 fixes #90
build 384 — commit cb94316
The deployment was timing out because the server waited for MongoDB to connect before starting to listen on port 5001. This caused Fly.io health checks to fail during the 30-second MongoDB connection timeout.
deployment: Further refinements to improve fly.io deployment reliability (#90)
- increase timeouts to handle cold start delays
- Increase MongoDB connection timeout from 5s to 30s to handle replica set discovery during Fly.io cold starts
- Add 600s (10 minute) wait-timeout to flyctl deploy to prevent premature deployment failures
- Addresses issue where deployments succeeded but GitHub Actions timed out after 5 minutes
- run migrations asynchronously after server starts
- Move server.listen() before migration execution to ensure health checks pass immediately during fly.io deployments.
- Migrations now run in background with proper error handling, allowing the server to respond to health checks within the 60s grace period while migrations complete.
member-admin: align lifecycle handling and brevo sync
- Lifecycle handling: added MemberTerm enum (life/annual), ingested from bulk loads, schemas updated; life/payment-pending/newly-loaded members avoid expiry actions; Member Admin list shows “Lifetime” and modal expiry is disabled/readonly for life members.
- UX persistence: Member Admin search/sort now persisted via kebab-cased query params (search, sort, sort-order) and local storage; lifetime display and date-picker null handling improved.
- Deletion audit: manual member delete now records a deleted-member document (aligning with bulk delete).
- Bulk load/back-end: member bulk-load date map aggregation typed and tested; member status/term captured from Ramblers feed; date map endpoint typed.
- Brevo integration: always log errors; surface contact creation failures; fallback to batch update on duplicate ext_id; contact matching honors extId; checkbox label fixed.
agm-stats: exclude cancelled and deleted walks from leader counts in local mode
The issue: Walk leader counts only matched confirmed walks, but detail tables showed all non-cancelled, non-deleted walks. This caused discrepancies (e.g., Amanda G showing 2 walks in count but 5 in detail, then 6 after first fix). The fix: For local mode, change confirmedStatusMatch to exclude both 'cancelled' and 'deleted' status, matching the logic in classifyLocalWalk (line 823-829) which filters out cancelled walks from morning/evening classifications. This ensures leader walkCount matches the walks shown in detail tables.