Skip to content

feat(engine): propagate InitiatedByUserId through ranking and online strategies#239

Merged
noamarg merged 1 commit into
mainfrom
feature/noamarg/96/use-scheduling-initiator
May 12, 2026
Merged

feat(engine): propagate InitiatedByUserId through ranking and online strategies#239
noamarg merged 1 commit into
mainfrom
feature/noamarg/96/use-scheduling-initiator

Conversation

@noamarg
Copy link
Copy Markdown
Collaborator

@noamarg noamarg commented May 12, 2026

Summary

Threads InitiatedByUserId from incoming scheduling requests into every SchedulingResult the Engine emits, so RabbitMQ result messages can be attributed to the operator who triggered the run.

Changes

  • RankingAlgorithmStrategy: Success, error, empty-activity, missing-period, and catch paths include periodRequest.InitiatedByUserId.
  • OnlineMatchingStrategy: All returns include initiator from the constraint request; TryRescheduleAssignmentAsync extended with initiatedByUserId and wired from both activity and user constraint flows.

Testing

  • dotnet build Chronos.Engine
  • dotnet test Chronos.Tests.Engine (or full test run)

Risk / rollout

Low–medium. Touches many code paths in online matching; behavior for algorithms is unchanged aside from an extra field on the result DTO. Coordinate deployment: Engine should be deployed after or with MainApi publish that sets initiator on requests, otherwise results may still have null initiator until both sides align.

Files in this PR (only)

  • Chronos.Service/src/Chronos.Engine/Matching/RankingAlgorithmStrategy.cs
  • Chronos.Service/src/Chronos.Engine/Matching/OnlineMatchingStrategy.cs

@noamarg noamarg requested a review from ShalevKk May 12, 2026 09:13
@noamarg noamarg self-assigned this May 12, 2026
@noamarg noamarg added the enhancement New feature or request label May 12, 2026
@noamarg noamarg requested review from aaron-iz and removed request for ShalevKk May 12, 2026 09:14
@noamarg noamarg merged commit 902d476 into main May 12, 2026
1 check passed
@noamarg noamarg deleted the feature/noamarg/96/use-scheduling-initiator branch May 12, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants