Skip to content

feat: add credit event dispute flow - #68

Open
tokenjunkielabs wants to merge 10 commits into
Zcorehub:mainfrom
tokenjunkielabs:main
Open

tokenjunkielabs wants to merge 10 commits into
Zcorehub:mainfrom
tokenjunkielabs:main

Conversation

@tokenjunkielabs

Copy link
Copy Markdown

Fixes #59

Implements the complete credit-event dispute lifecycle requested by the GrantFox OSS issue:

  • adds CreditEvent dispute/audit fields plus a Prisma migration;
  • adds admin-key protected dispute, reinstate, and per-wallet recalculate endpoints with Swagger docs;
  • excludes disputed events from persisted score recalculation and score-breakdown reads;
  • carries dispute state through the existing score-recalc CLI;
  • extends /admin with dispute/reinstate and recalculate controls;
  • adds the requested unit regression source for disputed-event recalculation.

The dispute action preserves the original event and its score impact as audit history; score changes are applied through the explicit wallet recalculation action. Reinstate clears dispute audit state and the same recalculation endpoint restores the event's impact.

No test command was run in this submission session.

@woahwhattheheck

Copy link
Copy Markdown

Current-head QA at 40a46ae753de8a1e0a45ca041cb08c62f06697ab: the PR carries the #59 acceptance surface across schema + migration, admin dispute/reinstate/recalculate routes with admin-key middleware and Swagger coverage, disputed-event exclusion in recalculation/breakdown logic, admin UI controls, and a focused disputed-event recalc regression. I did not run local tests. GitHub exposes no commit status contexts; workflow run 35543885220 is action_required rather than a test failure. Source unchanged in this review.

@woahwhattheheck woahwhattheheck left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current-head review at 40a46ae753de8a1e0a45ca041cb08c62f06697ab: the #59 acceptance surface is present across the existing carrier (dispute audit fields/migration, admin-key dispute/reinstate + wallet recalculation routes with Swagger coverage, disputed-event exclusion in recalculation/breakdown paths, CLI propagation, admin UI controls, and focused regression coverage). I did not find a bounded issue-specific source defect worth adding churn for. The hosted workflow is action_required with zero jobs, so this is not a CI-green claim; maintainer-triggered CI/review remains authoritative.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Credit event dispute flow for incorrect partner reports

2 participants