Skip to content

11. Open Questions and Risks

Unanswered architecture questions

Question Status
Are unused tables (collections, index_jobs, model_cache) planned features or leftovers? Unknown
Is tool calling intentionally deferred or abandoned? Unknown (stubs Confirmed)
Do GitHub Pages responses include COOP/COEP? Unknown
Should remote embedding engine ever be implemented? Unknown (type only)
Provenance/license of gemma-4-e2b.js / lfm2_5.js? Unknown from this pass

Missing or unclear implementation details

  • Whether LLM libraries spawn their own workers (not owned by this repo)
  • Exact caching behavior of downloaded weights across engines
  • Manual QA checklist outside the repository
  • Behavior when project embedding model changes with existing chunks (no forced reindex evidenced)

Risks

Area Risk Priority
Security XSS via unsanitized Markdown HTML High
Reliability No automated tests; retrieval regressions easy High
Scalability Vector sequential scan without ANN Medium (grows with corpus)
Operability Pages headers / SharedArrayBuffer may fail in prod Medium
Data Backup omits original file store Medium
Correctness Chunk UI “Characters” vs token math Medium
Correctness Default preference ids vs catalog Low–Medium
Product OCR required flag without OCR path Low
Maintainability Dead tool-calling and unused schema Low

Testing and documentation gaps

  • No unit/integration/e2e suite
  • CI does not run lint as a separate gate
  • README strong on features; little operator runbook for WebGPU failures
  • No ADR explaining hybrid OR rewrite or engine matrix

Product / UX assumptions

  • Users have enough RAM/GPU for local models
  • English FTS ('english') is acceptable for the target corpus
  • Privacy-sensitive users accept CDN weight downloads
  • Single-browser-profile use (no multi-user device sharing story)

Questions for the authors

  1. Should changing embedding_model_id trigger mandatory reindex or be blocked after first document?
  2. Will tool calling return, or should stubs be removed?
  3. Should backup include browser-rag-files?
  4. Are production isolation headers configured in the Pages/custom domain setup?
  5. Is the chunk size label meant to say tokens, or should chunking switch to characters?

Practical next steps

  1. Add unit tests for reciprocalRankFusion and chunkText
  2. Sanitize or replace dangerouslySetInnerHTML Markdown rendering
  3. Fix preference default ids to match LLM_MODELS
  4. Align settings labels with token-based chunking
  5. Document or configure COOP/COEP for GitHub Pages
  6. Extend export/import to cover the file IDB store
  7. Either enforce embedding lock in updateProject or auto-reindex
  8. Drop or implement unused schema tables and tool stubs