Skip to content

feat(scoring): add central reward rule-book (#88) - #397

Open
lucky-pluton wants to merge 1 commit into
vicharanashala:mainfrom
lucky-pluton:fix/88-scoring-rule-book
Open

lucky-pluton wants to merge 1 commit into
vicharanashala:mainfrom
lucky-pluton:fix/88-scoring-rule-book

Conversation

@lucky-pluton

Copy link
Copy Markdown
Contributor

Closes #88 — Part of the #87 scoring-ledger epic.

TL;DR

Consolidates reward/point rules scattered across server and client into a single pure, unit-testable rule-book (\server/lib/scoring.js).

Changes

  • Add \server/lib/scoring.js: pure functions for quiz rewards, review completion, topic badges, collection completions, transfer wins, daily check-ins, and hint unlocks.
  • Add \server/tests/scoring.test.js: comprehensive vitest tests for all rule-book calculations and immutability guarantees.

Verification


  • pm test\ in \server/: all tests passed.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

✅ Parikshak — all automated checks pass

This is Parikshak, an automated, comment-only check — it never closes or approves a PR. A human reviewer still makes the final call. See CONTRIBUTING.md for the full contribution rules.

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scoring: add a central reward rule-book (server/lib/scoring.js)

1 participant