feat(api): cooperative challenges domain (#200) - #272
Merged
Conversation
Add a cooperative Challenges domain: Challenge + ChallengeParticipant + ChallengeParticipantHabit entities (no per-user ranking), CoopGoal (summed target over a window) and StreakTogether (strict all-must-log shared streak) types, create/join/leave/detail endpoints with FluentValidation, friend-invite auto-join + Crockford-base32 join code, and read-side shared-progress aggregation mirroring HabitMetricsCalculator. Completion + Mission Accomplished fire from a post-log seam (IChallengeProgressService); Team Player on join. Team Player / Mission Accomplished award via the conventional string ids passed to AchievementChecks.TryGrant, which no-op until #196 ships the definitions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
# Conflicts: # src/Orbit.Api/Extensions/ResultActionResultExtensions.cs # src/Orbit.Application/Common/ErrorCodes.cs # src/Orbit.Application/Common/ErrorMessages.cs # src/Orbit.Domain/Common/DomainConstants.cs # src/Orbit.Infrastructure/Persistence/OrbitDbContext.cs # src/Orbit.Infrastructure/Services/AgentCatalogService.Capabilities.cs # src/Orbit.Infrastructure/Services/DistributedRateLimitService.cs
…r/MissionAccomplished now #196 ships Co-Authored-By: Claude Opus 4.8 (1M context) <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.


Backend half of #200 (paired with the orbit-ui-mobile shared-types PR). No client UI (that's #204).
What
Challenge+ChallengeParticipantcooperative domain (no per-user ranking).coop_goal= target count + period (sum of contributing logs);streak_together= strict all-must-log shared streak. Each participant links own habit(s); join via friend-invite or join code (capped). create/join/leave/detail endpoints. MigrationAddChallenges. Read-side aggregation (habit-log hot path untouched).Validation
dotnet build0 errors; full suite green in implementation.Refs thomasluizon/orbit-ui-mobile#200. Migration is part of the serialized Phase-5 set.
🤖 Generated with Claude Code