feat: Implement Dynamic Supply Chain Risk & Predictive Insurance #1590
Merged
omroy07 merged 1 commit intoomroy07:mainfrom Feb 20, 2026
Merged
Conversation
|
@SatyamPandey-07 is attempting to deploy a commit to the Om Roy's projects Team on Vercel. A member of the Team first needs to authorize it. |
Thanks for creating a PR for your Issue!
|
|
🎉 Congrats @SatyamPandey-07 on getting your PR merged! 🙌 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #1557
Key Features Implemented:
Real-Time Risk Orchestration (
RiskAdjustmentService
):
Implemented an "Actuarial Flux" engine that correlates live
WeatherData
and
SupplyBatch
telemetry with insurance premiums.
Recursive Sustainability Check: The system looks back at
SoilTest
history and
IrrigationZone
performance to grant "Sustainability Premium Discounts" (up to 25%) for healthy farming practices.
Dynamic Premium & Policy Lifecycle:
Created
DynamicPremiumLog
and
RiskFactorSnapshot
models to track how premiums evolve over time.
Policy Suspension: Implemented a "Dual-Lock" state where policies are automatically suspended if logistics telemetry (e.g., temperature anomalies during transit) indicates the produce is at high risk, protecting insurers from avoidable losses.
Weather-Driven Triggers:
Added
RiskTrigger
thresholds to the
Weather
module. When extreme conditions (heat/rainfall) are detected, the
WeatherService
automatically notifies the risk engine to recalculate premiums for affected farms in real-time.
Forensic Financial Auditing:
Enhanced
AuditLog
with is_financial and financial_impact fields to ensure every automated premium adjustment is strictly logged for financial compliance and transparency.
Predictive API & Background Orchestration:
Exposed /api/v1/insurance/policies//risk-visibility and /premium-audit endpoints for farmers and insurers to see the "why" behind premium changes.
Added a 6-hourly Celery task (tasks.insurance_risk_recalc) for systemic risk recalculation across all active policies.