Skip to content

[LLM] Implement user state database access layer and repositories - #14

Open
menny wants to merge 1 commit into
seed-data-layerfrom
user-data-layer
Open

menny wants to merge 1 commit into
seed-data-layerfrom
user-data-layer

Conversation

@menny

@menny menny commented Oct 17, 2026

Copy link
Copy Markdown
Member

Summary of Changes

  • Implemented pure-JVM SQLite repository interfaces and implementations for user state tables defined in docs/DATA.md:
    • UserWordStateRepository (SqliteUserWordStateRepository) for tracking vocabulary progress (NEW, LEARNING, MASTERED), encounters, vault starred words with saved context sentences, batch status resolution, and status queries.
    • UserCustomTextRepository (SqliteUserCustomTextRepository) for storing, updating, listing, and deleting imported user reading texts and AI-simplified versions.
    • UserDatabase for managing the mutable user SQLite connection and table/index creation.
    • CalqueWordLookupProvider composite implementation uniting DictionaryRepository, FalseCognatesRepository, and UserWordStateRepository into the WordLookupProvider interface required by ReaderEnricher.
  • Added unit tests for:
    • User database table and index creation.
    • User word state encounters, vault starring, status updates, and batch lookups with NEW default.
    • Custom texts insertion (auto-generated ID), update, order-by-timestamp listing, and deletion.
    • Composite CalqueWordLookupProvider integration with ReaderEnricher text token enrichment.
  • Verified 0 errors across format, format.check, lint, and test gates.

Adds pure-JVM SQLite repository interfaces and implementations for user state tables (user_word_state and user_custom_texts) in //core/data, implements the composite CalqueWordLookupProvider bridging seed and user data with ReaderEnricher, and adds comprehensive unit tests.
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