Skip to content

Risk score calculation job #6

Description

@Martins0152

Description
Implement POST /:id/risk-score, which calculates and persists a beneficiary's riskScore (0-100) using a defined, documented heuristic (not a black box).

Acceptance Criteria

  • The scoring logic is implemented as a pure, unit-testable function in src/services/ - not inline in the controller.
  • Document the exact factors used (e.g. KYC status, campaign assignment count, distribution history anomalies) in a code comment and in /docs.
  • Endpoint is restricted to ADMIN/ORGANIZATION.
  • Score is clamped to 0-100 and persisted on the Beneficiary record.
  • Unit tests cover at least 3 distinct input scenarios producing different scores.
  • Documented in openapi.yaml.

Suggested reward: $30-$40

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions