Commit Graph

101 Commits

Author SHA1 Message Date
Per Stark 1e0dba72c8 chore: harden common errors, fastembed blocking, and ingest ownership
Run FastEmbed inference on spawn_blocking, propagate Surreal take
failures,
add AppError::internal and typed ingest/embedding parse errors, and take
owned file lists in ingestion payload construction.
2026-05-29 14:44:23 +02:00
Per Stark 4f02fcb853 chore: rename get_id to id, add doc comments, pre-allocate format_history 2026-05-27 18:06:16 +02:00
Per Stark 9ccf8dde25 chore: lowercase all error messages and add # Errors doc sections
- Fix err-lowercase-msg: normalize all #[error(...)] display strings to
  lowercase (AppError, FileError, ApiErr) and update affected tests
- Fix err-doc-errors: add # Errors sections to 25+ fallible public
  functions across db.rs, store.rs, embedding.rs, indexes.rs,
  ingestion_task.rs, and ingest_limits.rs
2026-05-27 14:59:48 +02:00
Per Stark e63498ecee chore: resolve remaining uninlined_format_args clippy warnings 2026-05-27 14:34:37 +02:00
Per Stark b03290abd5 chore: fix and reduce clippy allows in knowledge_entity.rs
- rm duplicate 'document' match arm (match_same_arms)
- .get(0) -> .first() (get_first)
- for entity in all_entities.iter() -> &all_entities (explicit_iter_loop)
- 2x error!("{}", err_msg) -> error!("{err_msg}") (uninlined_format_args)
- 2x test format!()/assert!() positional -> inlined (uninlined_format_args)
- removed 6 now-unnecessary allow attributes
2026-05-27 14:28:08 +02:00
Per Stark 81624850c0 chore: add must_use to 27 non-Result public functions
- constructors: KnowledgeEntity, TextChunk, Scratchpad, IngestionTask,
  Conversation, KnowledgeRelationship, Message, TextContent,
  KnowledgeEntityEmbedding, TextChunkEmbedding
- accessors: Theme::as_str, Theme::initial_theme, TaskState::as_str,
  TaskState::display_label, StorageManager::backend_kind,
  StorageManager::local_base_path, EmbeddingProvider::backend_label,
  EmbeddingProvider::dimension, EmbeddingProvider::model_code
- queries: TaskState::is_terminal, IngestionTask::can_retry,
  KnowledgeEntityType::variants, StorageManager::resolve_local_path,
  resolve_base_dir, IngestionTask::lease_duration
- helpers: Message::format_history
- builders: StorageManager::with_backend
2026-05-27 14:23:56 +02:00
Per Stark 99db54b2e7 fix: replace manual embedding serialization with serde_json
- replaced write!() loops with serde_json::to_string in 4 re-embedding methods
- standardized SQL building to use write!() with proper error propagation
- eliminates manual f32 vector string building (memory waste + loop risk)
2026-05-27 14:13:19 +02:00
Per Stark cd0d95abaa fix: revoke_api_key sets NONE, remove unused bind, lowercase error msgs
- fix bug where revoke_api_key set literal 'test_string_nullish' instead of NONE
- remove unused table_name bind in update_timezone
- lowercase ~16 error messages across 4 crates
2026-05-27 13:56:32 +02:00
Per Stark e2284b1e69 chore: removed anyhow from apperror for improved error handling 2026-05-27 13:33:02 +02:00
Per Stark 76fcdcd6ce chore: index slicing and lowercase errors 2026-05-27 12:41:26 +02:00
Per Stark cd0b0368a0 chore: tightening and removing super fn 2026-05-27 11:23:39 +02:00
Per Stark 056f116885 perf: avoid small own clones and intermediate Vec allocations
- Derive Copy on 6 small enums (MessageRole, TaskState, StorageKind, EmbeddingBackend, PdfIngestMode, KnowledgeEntityType)
- Change create_ingestion_payload files param from Vec<FileInfo> to &[FileInfo]
- Remove 5 intermediate Vec allocations (4 embedding serialization + 1 format_history) using write! loop
- Remove 7 unnecessary .clone() calls exposed by Copy derive
2026-05-27 10:28:08 +02:00
Per Stark 017d6c5ba9 chore: additional clippy fixes after rebasing 2026-05-27 07:37:18 +02:00
Per Stark d76f86f56f refactor: simplify and improve testing for initialization 2026-05-26 20:21:24 +02:00
Per Stark 5ce7a76c75 clippy: adhere to pedantic clippy, uniform test error handling 2026-05-26 20:21:13 +02:00
Per Stark e0068ebe26 chore: remove unused clap dep and fix test_session_table name
- Remove clap dependency from retrieval-pipeline (RetrievalStrategy
  already has FromStr/Display; evaluations uses clap directly)
- Rename session table from test_session_table to session
2026-05-26 20:14:29 +02:00
Per Stark 9affc0b05b refactor: extract serde helpers from stored_object! macro
Move FlexibleIdVisitor, deserialize_flexible_id, and four datetime serde helpers
from repeating inside every macro expansion into a shared
common/src/storage/types/serde_helpers.rs module.

14 macro invocations × 6 items = ~84 fewer redundant function definitions.
Fragile cross-module imports (file_info::deserialize_flexible_id etc.)
are updated to point to the canonical module.
2026-05-26 20:12:54 +02:00
Per Stark 87459e1189 test: minio to devenv, improved testing s3 and relationships 2026-02-15 08:52:56 +01:00
Per Stark 6c5297ec6e chore: dep updates & kv-mem separation to test feature
docker builder update
2026-02-15 08:51:48 +01:00
Per Stark 93ac56ebc7 feat: caching chat history & dto 2026-02-14 19:43:34 +01:00
Per Stark d1b3e9b23a fix: name harmonization of endpoints & ingestion security hardening 2026-02-13 22:36:00 +01:00
Per Stark 91f3ab231c fix: parameterize storage-layer queries and add injection tests 2026-02-12 21:42:46 +01:00
Per Stark 6d996f7775 fix: gracefully handle old users 2026-02-11 07:50:19 +01:00
Per Stark 599709c4cd fix: edge case when deleting content
nit
2026-01-18 18:45:21 +01:00
Per Stark 60087e10fb refactor: additional responsibilities to middleware, simplified handlers
fix
2026-01-17 21:07:25 +01:00
Per Stark a9a37b2468 feat: s3 storage backend 2026-01-16 23:38:47 +01:00
Per Stark 8e9978540e feat: add user theme preference
- Add theme field to User model (common)
- Create migration for theme field
- Add theme selection to Account Settings (html-router)
- Implement server-side theme rendering in base template
- Update JS for system/preference theme handling
- Remove header theme toggle for authenticated users
2026-01-16 13:54:07 +01:00
Per Stark 534d0f8c31 fix: allow for multiple templates directories 2026-01-12 21:25:12 +01:00
Per Stark 8664abdf01 release: 1.0.0
fix: cargo dist
2026-01-11 20:35:01 +01:00
Per Stark 07421fdb18 fix: schemafull and textcontent 2026-01-02 15:41:22 +01:00
Per Stark 589257e721 fix: migrating embeddings to new dimensions
changing order
2025-12-22 22:39:14 +01:00
Per Stark a4d6aa88fa fix: migrations
schemafull
2025-12-22 18:32:08 +01:00
Per Stark 86270de873 tidying stuff up, dto for search 2025-12-20 22:30:31 +01:00
Per Stark 90bac299a3 passed wide smoke check 2025-12-10 13:54:08 +01:00
Per Stark 032630c083 faster index creation 2025-12-09 21:32:23 +01:00
Per Stark 8121e04125 retrieval simplfied 2025-12-09 20:35:42 +01:00
Per Stark 6c458c97ce retrieval: hybrid search, linear fusion 2025-12-04 12:48:59 +01:00
Per Stark c60efb2af7 benchmarks: ready for hybrid revised 2025-12-03 11:38:07 +01:00
Per Stark 38cb2e5e24 fix: all tests now in sync 2025-11-29 18:59:08 +01:00
Per Stark 06344cc108 fix: index creation at init 2025-11-26 21:49:20 +01:00
Per Stark 05bdaac672 evals: v3, ebeddings at the side
additional indexes
2025-11-26 15:15:10 +01:00
Per Stark 97d35a8982 retrieval-pipeline: v0 2025-11-18 22:46:35 +01:00
Per Stark 73e709153a upsert relationship and creation 2025-11-18 21:18:09 +01:00
Per Stark 6f08429faa benchmarks: v1
Benchmarking ingestion, retrieval precision and performance
2025-11-18 11:50:15 +01:00
Per Stark 7f30c8ff6e Merge branch 'main' into development 2025-11-03 12:48:04 +01:00
Per Stark 3196e65172 fix: improved storage manager, prep for s3 2025-11-03 12:39:15 +01:00
Per Stark b0deabaf3f release: 0.2.6 2025-10-31 13:38:11 +01:00
Per Stark 1b7c24747a fix: in memory object store handler for testing 2025-10-27 17:03:03 +01:00
Per Stark 241ad9a089 fix: scratchpad tz aware datetime 2025-10-27 14:00:22 +01:00
Per Stark 72578296db feat: reranking with fastembed added 2025-10-27 13:05:10 +01:00