Overview
StreamForge Core needs a scoring module that takes ingested contribution events and produces a deterministic score for each contributor. This score will later feed into the reward calculation pipeline.
What needs to be done
- Create a
scoring module under src/
- Implement a
score_event function that accepts an Event struct and returns a numeric score
- Apply basic scoring rules:
pull_request event = 10 points
commit event = 5 points
review event = 3 points
- unknown event types = 0 points
- Implement a
aggregate_scores function that takes a list of events and returns total score per contributor
Acceptance Criteria
Pre-Submission Checklist
Notes
Scoring rules are intentionally simple for now. The goal is a clean, testable foundation that can be extended later with weighted scoring.
Overview
StreamForge Core needs a scoring module that takes ingested contribution events and produces a deterministic score for each contributor. This score will later feed into the reward calculation pipeline.
What needs to be done
scoringmodule undersrc/score_eventfunction that accepts anEventstruct and returns a numeric scorepull_requestevent = 10 pointscommitevent = 5 pointsreviewevent = 3 pointsaggregate_scoresfunction that takes a list of events and returns total score per contributorAcceptance Criteria
src/scoring.rsmodule exists and is wired intomain.rsscore_eventcorrectly returns points based on event typeaggregate_scorescorrectly totals scores per contributorPre-Submission Checklist
cargo buildlocally and it succeedscargo testlocally and all tests passcargo fmtto format my codecargo clippyand fixed all warningsNotes
Scoring rules are intentionally simple for now. The goal is a clean, testable foundation that can be extended later with weighted scoring.