Skip to content

Muesli: PR 10.2 - Performance services#1064

Open
fosterfarrell9 wants to merge 17 commits intomuesli/performance-foundationsfrom
muesli/performance-services
Open

Muesli: PR 10.2 - Performance services#1064
fosterfarrell9 wants to merge 17 commits intomuesli/performance-foundationsfrom
muesli/performance-services

Conversation

@fosterfarrell9
Copy link
Collaborator

This PR adds the Step 10.2 backend for Student Performance computation. It

  • introduces ComputationService to aggregate assessment points and materialize per-user performance records
  • adds Evaluator for rule-based performance checks
  • adds background jobs to update records and mark stale certifications
  • extends performance records with assessment count fields (total/reviewed/pending/exempt)

@fosterfarrell9 fosterfarrell9 changed the base branch from next to muesli/performance-foundations February 26, 2026 15:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements backend services for student performance computation in the Muesli integration. It introduces a computation service to aggregate assessment points, an evaluator for rule-based performance checks, and background jobs to update records and identify stale certifications.

Changes:

  • Adds ComputationService to compute and materialize student performance metrics per user
  • Adds Evaluator to evaluate performance records against rules (percentage/absolute points, achievements)
  • Adds two background jobs: PerformanceRecordUpdateJob for computing records and CertificationStaleCheckJob for detecting outdated certifications
  • Extends performance records with assessment count fields (total, reviewed, pending, exempt)
  • Adds .stale scope to Certification model to identify certifications older than their corresponding records

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
app/models/student_performance/computation_service.rb Service to aggregate points and assessment counts, materialize performance records via upsert
app/models/student_performance/evaluator.rb Evaluates performance records against rules, returns pass/fail proposals with details
app/workers/performance_record_update_job.rb Sidekiq job to compute records for one user or all lecture members
app/workers/certification_stale_check_job.rb Recomputes records and logs stale certifications
app/models/student_performance/certification.rb Adds .stale scope using SQL join to find certifications older than records
db/migrate/20260226000001_add_assessment_counts_to_performance_records.rb Adds four integer count fields to performance records table
db/schema.rb Schema version update reflecting new columns
spec/factories/student_performance_records.rb Updates factory with default values for new count fields
spec/models/student_performance/computation_service_spec.rb Comprehensive tests for aggregation, upserts, counts, exempt/pending logic
spec/models/student_performance/evaluator_spec.rb Tests for percentage/absolute/achievement rules, bulk evaluation
spec/workers/performance_record_update_job_spec.rb Tests for single-user and full-lecture computation
spec/workers/certification_stale_check_job_spec.rb Tests for staleness detection and logging
spec/models/student_performance/certification_spec.rb Tests for .stale scope edge cases

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.

2 participants