Skip to content

Add ReviewReadService and extract shared validation helpers#64

Merged
asiniscalchi merged 1 commit into
mainfrom
feature/analyzer-review-read-service
May 4, 2026
Merged

Add ReviewReadService and extract shared validation helpers#64
asiniscalchi merged 1 commit into
mainfrom
feature/analyzer-review-read-service

Conversation

@asiniscalchi

Copy link
Copy Markdown
Owner

Introduces the analyzer review service:

  • DailyReviewView (review_date, review_text, created_at) and WeeklyReviewView (week_start, computed week_end, review_text, created_at). Plumbing fields like model and prompt_version are intentionally hidden from the analyzer surface.
  • GetReviewsRequest with required from_date and to_date_exclusive.
  • ReviewReadService trait and DefaultReviewReadService impl wrapping DailyReviewRepository::fetch_completed_in_range and the matching weekly method. Returned reviews are guaranteed completed and non-empty by the underlying queries.

Extracts validate_limit / validate_optional_range / validate_range into a shared validation submodule so journal.rs and review.rs share the same input rules.

Introduces the analyzer review service:

- DailyReviewView (review_date, review_text, created_at) and
  WeeklyReviewView (week_start, computed week_end, review_text, created_at).
  Plumbing fields like model and prompt_version are intentionally hidden
  from the analyzer surface.
- GetReviewsRequest with required from_date and to_date_exclusive.
- ReviewReadService trait and DefaultReviewReadService impl wrapping
  DailyReviewRepository::fetch_completed_in_range and the matching weekly
  method. Returned reviews are guaranteed completed and non-empty by the
  underlying queries.

Extracts validate_limit / validate_optional_range / validate_range into a
shared validation submodule so journal.rs and review.rs share the same
input rules.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@asiniscalchi asiniscalchi merged commit bf01c32 into main May 4, 2026
2 checks passed
@asiniscalchi asiniscalchi deleted the feature/analyzer-review-read-service branch May 4, 2026 06:15
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