Skip to content

[LLM] Generate and package seed database asset with dictionary and compaction - #15

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

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

Conversation

@menny

@menny menny commented Oct 17, 2026

Copy link
Copy Markdown
Member

Description

This PR implements seed database generation and packaging for the Android application assets directory:

  1. Foundational Starter Dictionary:

    • Added data/seeds/dictionary_seed.json containing ~175 foundational words covering all curated lessons, false cognate targets, cognate rule examples, and core Spanish function words.
    • Implemented DictionarySeedProcessor to load and ingest structured dictionary seeds.
  2. Preprocessor Enhancements:

    • Added resolveFile in Main.kt to resolve paths against BUILD_WORKING_DIRECTORY when invoked via bazel run.
    • Added DatabaseOptimizer.optimize() running SQLite ANALYZE and VACUUM after preprocessor ingestion to produce a compact, read-optimized database.
  3. Packaged Database Asset:

    • Generated and packaged app/src/main/assets/databases/seed.db (114KB) containing all 4 seed tables and indexes.
    • Configured //app:seed_db_asset filegroup in app/BUILD.bazel.
  4. Integration Verification:

    • Added PackagedSeedAssetTest in //core/data validating that the packaged asset can be opened and queried by all SQLite repositories (dictionary, false_cognates, curated_lessons, cognate_rules).
    • Ran all formatting, Detekt linting, and 16 unit/integration tests successfully.

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