Skip to content

Feature/analyzer journal read service#63

Merged
asiniscalchi merged 2 commits into
mainfrom
feature/analyzer-journal-read-service
May 4, 2026
Merged

Feature/analyzer journal read service#63
asiniscalchi merged 2 commits into
mainfrom
feature/analyzer-journal-read-service

Conversation

@asiniscalchi

Copy link
Copy Markdown
Owner

No description provided.

asiniscalchi and others added 2 commits May 4, 2026 06:06
The upcoming analyzer service needs entry ids to expose them to LLM tools.
The /recent Telegram command caller is unchanged because format_entries is
generic over T: AsRef<JournalEntry>, which StoredJournalEntry implements.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Introduces src/journal/analyzer/ with:

- types: UserContext, AnalyzerError, JournalEntryView, request types,
  and MAX_RECENT_LIMIT / MAX_TEXT_SEARCH_LIMIT (50 each).
- JournalReadService trait + DefaultJournalReadService impl wrapping
  JournalRepository::fetch_recent, fetch_in_range, and search_text.

The service validates limits and date ranges before delegating to the
repository and never accepts a user_id from the caller — it always reads
the authenticated user from UserContext, matching the analyzer security
requirement that the LLM never supply user_id.

Semantic search is intentionally out of scope for this step; it requires
the embedding/embedder dependencies and will land separately.

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