Project

General

Profile

Actions

User Story #949

open

EPIC #930: CS Trust Score

Feature #947: Trust Governance & Penalty Management

Backend User Story – Trust Governance & Penalty Management

Added by Islam Mansoori about 1 month ago.

Status:
To Do
Priority:
low
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

As a Platform Administrator, I want to manage governance actions against members who violate ConnectSouq policies so that the Trust Score ecosystem remains fair, transparent, and trustworthy.


Business Background

The Trust Governance module ensures the integrity of the CS Trust Score by enforcing platform policies. Administrators must be able to issue warnings, deduct Trust Score points, remove Trust Tokens, suspend accounts, or terminate memberships based on verified policy violations. Every governance action must be fully auditable and automatically reflected in the member's Trust Score and Trust Level. The Trust Framework identifies governance violations such as false opportunities, fake accounts, spam, fraud, Trust Token manipulation, misrepresentation, policy bypassing, harassment, and false complaints.


Functional Requirements

The system shall allow authorized administrators to:

  • Issue governance warnings.
  • Deduct Trust Score points.
  • Remove Trust Tokens.
  • Suspend member accounts.
  • Reinstate suspended accounts.
  • Terminate member accounts.
  • Record governance reasons.
  • Trigger Trust Score recalculation.
  • Notify affected members.
  • Maintain complete audit history.

Business Rules

  1. Only users with Governance Administrator permission can perform governance actions.
  2. Every governance action must include a mandatory reason.
  3. Trust Score deductions automatically trigger Trust Score and Trust Level recalculation.
  4. Suspended members are excluded from Leaderboards and community rankings.
  5. Governance actions cannot be permanently deleted; only archived for audit purposes.
  6. Every governance action must generate a notification to the affected member.
  7. All governance actions must be recorded in the audit log.

Database Changes

Table: Governance_Action

Field
GovernanceId
MemberId
ActionType
ViolationType
Description
TrustScoreDeduction
TrustTokensRemoved
Status
ActionDate
CreatedBy

Table: Governance_Audit

Field
AuditId
GovernanceId
AdministratorId
PreviousTrustScore
UpdatedTrustScore
PreviousTrustLevel
UpdatedTrustLevel
Timestamp

Table: Governance_Master

Field
ViolationId
ViolationName
DefaultPenalty
IsActive

API Endpoints

GET /api/governance/member/{memberId}

Retrieve governance history for a member.


POST /api/governance/action

Create a governance action.


PUT /api/governance/reinstate/{memberId}

Reinstate a suspended member.


GET /api/governance/violations

Retrieve configured violation types.


Validation Rules

  • Administrator authentication is mandatory.
  • Governance reason is required.
  • Member must exist.
  • Duplicate active suspensions are not permitted.
  • Trust Score cannot fall below the configured minimum threshold.

Notifications

The system shall notify the affected member when:

  • A warning is issued.
  • Trust Score is deducted.
  • Trust Tokens are removed.
  • Account is suspended.
  • Account is reinstated.
  • Account is terminated.

Audit Logs

Capture:

  • Governance ID
  • Administrator ID
  • Member ID
  • Violation type
  • Previous Trust Score
  • Updated Trust Score
  • Previous Trust Level
  • Updated Trust Level
  • Action performed
  • Date and time
  • IP Address

Acceptance Criteria

Scenario 1 – Issue Warning

Given

A verified policy violation exists.

When

An authorized administrator issues a warning.

Then

  • Warning is recorded.
  • Member is notified.
  • Audit log is created.

Scenario 2 – Deduct Trust Score

Given

A governance action requires a Trust Score deduction.

When

The administrator confirms the action.

Then

  • Trust Score is reduced.
  • Trust Level is recalculated if required.
  • Leaderboard position is updated.
  • Audit history is recorded.
  • Member receives a notification.

Scenario 3 – Suspend Member

Given

A serious policy violation has been verified.

When

The administrator suspends the member.

Then

  • Member account status changes to Suspended.
  • Member is excluded from Leaderboards.
  • Restricted platform features become inaccessible.
  • Notification is sent.
  • Audit trail is created.

Scenario 4 – Reinstate Member

Given

The suspension period has ended or the administrator approves reinstatement.

When

The administrator reinstates the account.

Then

  • Member status changes to Active.
  • Access is restored according to role and subscription.
  • Leaderboard eligibility is restored after Trust Score recalculation.
  • Audit history is updated.

In Scope (MVP)

  • Governance violation management
  • Warning management
  • Trust Score deductions
  • Trust Token removal
  • Account suspension and reinstatement
  • Governance history
  • Notifications
  • Trust Score recalculation
  • Audit logging

Out of Scope

  • Appeal and review workflow
  • AI-based fraud detection
  • Automatic policy enforcement
  • Community moderation
  • External legal case management
  • Machine learning risk scoring

Definition of Done

  • Governance APIs implemented.
  • Administrator governance interface integrated.
  • Trust Score recalculation validated.
  • Notification workflows completed.
  • Audit logging verified.
  • Unit, integration, and security testing passed.
  • Product Owner approval obtained.

✅ MVP Completion Summary – CSI (CS Trust Score)

Feature Status
Trust Score Dashboard ✅ Completed
Trust Score Calculation Engine ✅ Completed
Trust Token Management ✅ Completed
Trust Levels & Badges ✅ Completed
Trust Leaderboard ✅ Completed
Trust Governance & Penalty Management ✅ Completed

No data to display

Actions

Also available in: Atom PDF