Feature/team building service - #23
Merged
Merged
Conversation
StaffMatchingService greedily assigns the best-matching candidate to each LLM-proposed role (ranked by skill coverage, case-insensitive). TeamBuildingHostedService consumes SkillRequirementsResult messages, calls the matcher, and persists the Team, TeamMembership, and Recommendation records in a dedicated scope per message. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
StaffMatchingService tests verify skill ranking, one-assignment-per-user, pool exhaustion, and case-insensitive skill name matching. TeamBuildingHostedService tests push a SkillRequirementsResult through the real in-process TestMessageChannel and assert DB rows for Team, Memberships, and Recommendation. ApiFactory now exposes TestMessageChannel for SkillRequirementsResult so hosted-service tests can enqueue messages. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implements the inbound path of the LLM recommendation flow (PR 3 of issue #8).
StaffMatchingServicewhich ranks candidates against LLM-proposed roles by skill coverage. Matching is greedy (best available user per role, in order), case-insensitive, and assigns each user at most onceTeamBuildingHostedService(BackgroundService) which consumesSkillRequirementsResultmessages fromIMessageChannel<SkillRequirementsResult>, callsStaffMatchingService, then persists aTeam,TeamMembershiprecords, and aRecommendationaudit record in a dedicated scope per messageRoleAssignmentmodel record used as the output of the matching algorithmTestMessageChannel<T>— an in-processChannel<T>-backed implementation used in integration tests, withWaitForIdleAsyncto safely drain in-flight messages between testsApiFactoryto exposeTestMessageChannel<SkillRequirementsResult>so hosted-service tests can enqueue messages and assert DB stateLinked issues