Version: 1.0
Status: ✅ Complete
Created: 2026-03-01
Integration Summary
PM-24 is PM-internal only — it does not introduce cross-core dependencies. All batch operations consume existing PM entities (charges, claims, eligibility checks) and write to the newpm_batch_jobs audit table.
Integration Points
Data Flow
Database Entities
pm_batch_jobs— Audit/progress tracking (no DELETE policy)pm_module_settings.batch_size_max— Max items per batch (default 200)pm_module_settings.batch_async_threshold— Async threshold (default 50)
Security
- RLS via
pm_has_org_access()(SELECT, INSERT, UPDATE with WITH CHECK) organization_idimmutability trigger- FORCE ROW LEVEL SECURITY enabled
- Error messages sanitized before persisting to
pm_batch_jobs.errors
Deferred
- Edge function async execution for large batches
- Real-time progress via Supabase Realtime subscriptions
- Scheduled/cron batch operations