Skip to content

feat(api): 1:1 accountability buddies (#201) - #271

Merged
thomasluizon merged 4 commits into
mainfrom
issue-201
Jun 30, 2026
Merged

feat(api): 1:1 accountability buddies (#201)#271
thomasluizon merged 4 commits into
mainfrom
issue-201

Conversation

@thomasluizon

Copy link
Copy Markdown
Owner

Backend half of #201 (paired with the orbit-ui-mobile shared-types PR). No client UI (that's #205).

What

  • AccountabilityPair (1:1 between accepted friends, invite→accept), per-user habit join, moderated lightweight check-in ack that pushes the buddy, Daily|Weekly cadence, multi-pair up to a cap, either-party revoke. Migration AddAccountabilityBuddies.
  • Battle Buddy achievement granted to both participants on accept (resolves to fix(api): idempotent habit logging via partial unique index #196's now-merged definition).

Validation

dotnet build 0 errors; full suite green in implementation (Domain/App/Infra).

Refs thomasluizon/orbit-ui-mobile#201. Migration is part of the serialized Phase-5 set — rebase-and-rescaffold at merge if another lands first.

🤖 Generated with Claude Code

thomasluizon and others added 2 commits June 30, 2026 16:15
Adds a 1:1 accountability-buddy system on top of the #193 social
foundation: invite -> accept between two accepted friends, per-user
linked-habit joins, moderated check-ins that push the buddy, a
Daily/Weekly cadence, multiple pairs per user up to a cap, and
either-party revoke.

- Domain: AccountabilityPair / AccountabilityPairHabit /
  AccountabilityCheckIn entities + AccountabilityPairStatus /
  AccountabilityCadence enums + guards.
- Application: AccountabilityPairService, 6 commands + 2 queries,
  FluentValidation, no-N+1 pairs query.
- API: AccountabilityController (7 routes) + accountability-invites /
  accountability-checkins rate-limit policies.
- Persistence: AddAccountabilityBuddies migration (3 tables, unique
  (PairId,UserId,HabitId) and (PairId,UserId,Date) indexes).
- Battle Buddy award wired on pair-accept via the "battle_buddy"
  string id; no-ops until #196 ships the achievement definition.
- Registered the new controller actions in the agent catalog.
- Tests: domain entity guards + handler/validator/query unit tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
thomasluizon and others added 2 commits June 30, 2026 20:02
# Conflicts:
#	src/Orbit.Infrastructure/Services/AgentCatalogService.Capabilities.cs
…t BattleBuddy now #196 ships

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@thomasluizon
thomasluizon merged commit aed20aa into main Jun 30, 2026
1 check passed
@thomasluizon
thomasluizon deleted the issue-201 branch June 30, 2026 23:06
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant