Skip to content

refactor(quest-engine): unify batch and single review payout logic - #107

Open
syed-ghufran-hassan wants to merge 9 commits into
learnault:mainfrom
syed-ghufran-hassan:feat/batch-review-parity
Open

refactor(quest-engine): unify batch and single review payout logic#107
syed-ghufran-hassan wants to merge 9 commits into
learnault:mainfrom
syed-ghufran-hassan:feat/batch-review-parity

Conversation

@syed-ghufran-hassan

Copy link
Copy Markdown

Extract common approval flow into internal helper to ensure batch and
single review submissions use identical payout logic.

  • Add process_submission_approval helper containing all payout logic
  • Update review_submission to use the helper
  • Update batch_review_submissions to use the helper for each learner
  • Add comprehensive batch review tests covering:
    • Single and multiple learners with 120x multiplier
    • Mixed multipliers (120x + 100x)
    • Penalty multiplier (80x)
    • Failure cases (missing submission, unauthorized employer)
    • Event emission verification

This eliminates code duplication and ensures any future changes to
payout rules automatically apply to both review paths.

Depends on: [QuestEngine] Deliver uncapped staking multiplier payouts

Closes #88

@syed-ghufran-hassan

Copy link
Copy Markdown
Author

@Kaylahray is this all good to be merged?

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.

[QuestEngine] Make batch review payout logic match single review

1 participant