Skip to content

feat: implement scheduling service#33

Merged
MaximilianAnzinger merged 22 commits into
mainfrom
feature/implement-scheduling-service
Feb 27, 2026
Merged

feat: implement scheduling service#33
MaximilianAnzinger merged 22 commits into
mainfrom
feature/implement-scheduling-service

Conversation

@markstockhausen

Copy link
Copy Markdown
Contributor

Description

Implemented and optimized the Scheduling Service to utilize O(1) algorithms for the Coverage Pipeline and O(log n) for the Consensus Pipeline. Refactored database schema to support denormalized 'degree' counting for performance scaling.

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • 🎨 Style/formatting changes (no functional changes)
  • ♻️ Code refactoring (no functional changes)
  • ⚡ Performance improvements
  • 🔧 Configuration changes
  • 🧪 Test additions or modifications
  • 🚀 Deployment/DevOps changes

Changes Made

  • Server:

    • Implemented 'SchedulingService' with dual pipeline logic (Coverage + Consensus)
    • Created 'CompetencyRelationshipVote' entity and repository
    • Added 'degree' column to 'Competency' table (V7 migration) for O(1) lookup
    • Refactored 'CompetencyRelationshipService' to maintain degree counts on writes
    • Updated 'CompetencyRelationshipRepository' with optimized queries (NOT EXISTS)
    • Exposed 'SchedulingController' for task fetching and voting
  • Database:

    • V7 Migration: Added 'degree' column and index to 'competencies'
    • Reset schema to ensure clean slate for degree counting
  • Documentation:

    • Added 'scheduling_service_presentation.md' with detailed complexity analysis

Testing

Test Cases

  • Existing functionality still works
  • New functionality works as expected (Scheduling pipelines)
  • Edge cases handled appropriately (Concurrency, Cold Start)

Manual Testing

  • Tested in development environment (Docker + Spring Boot)
  • Verified degree counters increment correctly on manual relationship creation

@markstockhausen markstockhausen self-assigned this Feb 3, 2026
@github-actions github-actions Bot added enhancement New feature or request client-application 🎨 Client-side/UI changes labels Feb 3, 2026
@github-actions

github-actions Bot commented Feb 3, 2026

Copy link
Copy Markdown

🔍 Code Quality Report

📊 Code Statistics

🚨 Potential Issues

✅ No console statements found
⚠️ Found 'any' or 'unknown' types - consider using more specific types

@markstockhausen markstockhausen changed the title implement scheduling service feat: implement scheduling service Feb 3, 2026
@github-actions

github-actions Bot commented Feb 3, 2026

Copy link
Copy Markdown

🔍 Code Quality Report

📊 Code Statistics

🚨 Potential Issues

✅ No console statements found
⚠️ Found 'any' or 'unknown' types - consider using more specific types

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Implements a new backend scheduling/voting flow for competency relationship mapping, backed by new tables for aggregated vote counts + raw vote logs and a denormalized degree counter to prioritize low-connected competencies. Also includes minor frontend typography/style updates (Geist fonts, badge weight, subtle gradient tweak).

Changes:

  • Added Scheduling Service + Controller to fetch relationship tasks (coverage/consensus pipelines) and submit votes.
  • Introduced new scheduling/voting schema (relationships table w/ aggregated counters + vote log table) and a degree column on competencies with backfill/index.
  • Updated UI styling: switched default fonts to Geist, adjusted badge font weight, tweaked homepage gradient opacity.

Reviewed changes

Copilot reviewed 20 out of 22 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/pages/HomePage.tsx Minor gradient opacity tweak.
src/index.css Adds Geist font-face definitions and switches CSS variables/body font to Geist.
src/components/ui/badge.tsx Changes badge font weight from medium to semibold.
server/src/main/resources/db/migration/V7__add_competency_degree.sql Adds degree column + index and backfills from existing relationships.
server/src/main/resources/db/migration/V6__create_scheduling_tables.sql Creates new denormalized competency_relationships + vote log table with indexes/constraints.
server/src/main/resources/db/migration/V5__drop_old_relationships.sql Drops legacy relationships table/constraints.
server/src/main/resources/db/migration/V2__seed_sample_data.sql Removes seeding of legacy competency relationships.
server/src/main/java/de/tum/cit/memo/service/SchedulingService.java Core coverage/consensus scheduling logic and vote submission with entropy updates.
server/src/main/java/de/tum/cit/memo/service/CompetencyRelationshipService.java Refactors relationship creation to maintain denormalized degree counter and add find-or-create behavior.
server/src/main/java/de/tum/cit/memo/repository/CompetencyRepository.java Adds degree-based query + atomic degree increment method.
server/src/main/java/de/tum/cit/memo/repository/CompetencyRelationshipVoteRepository.java New repository for vote log access and existence checks.
server/src/main/java/de/tum/cit/memo/repository/CompetencyRelationshipRepository.java Refactors repository API and adds scheduling queries (entropy, batch relationship fetch, NOT EXISTS).
server/src/main/java/de/tum/cit/memo/entity/CompetencyRelationshipVote.java New JPA entity for per-user per-relationship vote log rows.
server/src/main/java/de/tum/cit/memo/entity/CompetencyRelationship.java Refactors entity to aggregated counters/entropy + timestamps (removes per-row relationship_type/user_id).
server/src/main/java/de/tum/cit/memo/entity/Competency.java Adds denormalized degree field.
server/src/main/java/de/tum/cit/memo/dto/VoteResponse.java New DTO for returning updated vote counts + entropy after voting.
server/src/main/java/de/tum/cit/memo/dto/VoteRequest.java New DTO for submitting a vote.
server/src/main/java/de/tum/cit/memo/dto/RelationshipTaskResponse.java New DTO for returning scheduled relationship tasks.
server/src/main/java/de/tum/cit/memo/controller/SchedulingController.java New REST endpoints for fetching next task and voting.
server/src/main/java/de/tum/cit/memo/controller/CompetencyRelationshipController.java Changes POST to upsert relationship + record a vote through SchedulingService.
public/fonts/GeistMono-Variable.woff2 Adds Geist Mono font asset for new typography.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread server/src/main/java/de/tum/cit/memo/service/SchedulingService.java Outdated
Comment thread server/src/main/java/de/tum/cit/memo/service/SchedulingService.java Outdated
Comment thread server/src/main/java/de/tum/cit/memo/controller/SchedulingController.java Outdated
Comment thread server/src/main/java/de/tum/cit/memo/service/CompetencyRelationshipService.java Outdated
Comment thread server/src/main/java/de/tum/cit/memo/service/SchedulingService.java Outdated
@ls1intum ls1intum deleted a comment from Copilot AI Feb 9, 2026
@ls1intum ls1intum deleted a comment from Copilot AI Feb 9, 2026
@ls1intum ls1intum deleted a comment from Copilot AI Feb 9, 2026
@github-actions

github-actions Bot commented Feb 9, 2026

Copy link
Copy Markdown

🔍 Code Quality Report

📊 Code Statistics

🚨 Potential Issues

✅ No console statements found
⚠️ Found 'any' or 'unknown' types - consider using more specific types

@github-actions

github-actions Bot commented Feb 9, 2026

Copy link
Copy Markdown

🔍 Code Quality Report

📊 Code Statistics

🚨 Potential Issues

✅ No console statements found
⚠️ Found 'any' or 'unknown' types - consider using more specific types

@github-actions github-actions Bot added the dependencies 📦 Dependency updates label Feb 9, 2026
@github-actions

Copy link
Copy Markdown

🔍 Code Quality Report

📊 Code Statistics

🚨 Potential Issues

✅ No console statements found
⚠️ Found 'any' or 'unknown' types - consider using more specific types

@github-actions

Copy link
Copy Markdown

🔍 Code Quality Report

📊 Code Statistics

🚨 Potential Issues

✅ No console statements found
⚠️ Found 'any' or 'unknown' types - consider using more specific types

@github-actions

Copy link
Copy Markdown

🔍 Code Quality Report

📊 Code Statistics

🚨 Potential Issues

✅ No console statements found
⚠️ Found 'any' or 'unknown' types - consider using more specific types

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 25 out of 28 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread server/src/main/java/de/tum/cit/memo/service/SchedulingService.java Outdated
Comment thread src/pages/SessionPage.tsx
Comment thread server/src/main/java/de/tum/cit/memo/controller/SchedulingController.java Outdated
Comment thread src/lib/api/session-helpers.ts
Comment thread server/src/main/java/de/tum/cit/memo/repository/CompetencyRepository.java Outdated
@ls1intum ls1intum deleted a comment from Copilot AI Feb 17, 2026
@ls1intum ls1intum deleted a comment from Copilot AI Feb 17, 2026
@ls1intum ls1intum deleted a comment from Copilot AI Feb 17, 2026
@ls1intum ls1intum deleted a comment from Copilot AI Feb 17, 2026
@github-actions

Copy link
Copy Markdown

🔍 Code Quality Report

📊 Code Statistics

🚨 Potential Issues

✅ No console statements found
⚠️ Found 'any' or 'unknown' types - consider using more specific types

@github-actions

Copy link
Copy Markdown

🔍 Code Quality Report

📊 Code Statistics

🚨 Potential Issues

✅ No console statements found
⚠️ Found 'any' or 'unknown' types - consider using more specific types

@github-actions

Copy link
Copy Markdown

🔍 Code Quality Report

📊 Code Statistics

🚨 Potential Issues

✅ No console statements found
⚠️ Found 'any' or 'unknown' types - consider using more specific types

@github-actions github-actions Bot added the configuration ⚙️ Configuration file changes label Feb 24, 2026
@github-actions

Copy link
Copy Markdown

🔍 Code Quality Report

📊 Code Statistics

🚨 Potential Issues

✅ No console statements found
⚠️ Found 'any' or 'unknown' types - consider using more specific types

@github-actions

Copy link
Copy Markdown

🔍 Code Quality Report

📊 Code Statistics

🚨 Potential Issues

✅ No console statements found
⚠️ Found 'any' or 'unknown' types - consider using more specific types

@github-actions

Copy link
Copy Markdown

🔍 Code Quality Report

📊 Code Statistics

🚨 Potential Issues

✅ No console statements found
⚠️ Found 'any' or 'unknown' types - consider using more specific types

Comment thread src/lib/api/scheduling.ts Outdated
Comment thread src/pages/SessionPage.tsx Outdated
@github-actions

Copy link
Copy Markdown

🔍 Code Quality Report

📊 Code Statistics

🚨 Potential Issues

✅ No console statements found
⚠️ Found 'any' or 'unknown' types - consider using more specific types

@github-actions

Copy link
Copy Markdown

🔍 Code Quality Report

📊 Code Statistics

🚨 Potential Issues

✅ No console statements found
⚠️ Found 'any' or 'unknown' types - consider using more specific types

@markstockhausen

Copy link
Copy Markdown
Contributor Author

@MaximilianAnzinger Ready to review

@MaximilianAnzinger
MaximilianAnzinger merged commit 8e0bafc into main Feb 27, 2026
8 checks passed
@MaximilianAnzinger
MaximilianAnzinger deleted the feature/implement-scheduling-service branch February 27, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client-application 🎨 Client-side/UI changes configuration ⚙️ Configuration file changes dependencies 📦 Dependency updates enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants