refactor(core): Rename GiError to LoreError and add search infrastructure
Mechanical rename of GiError -> LoreError across the core module to match the project's rebranding from gitlab-inbox to gitlore/lore. Updates the error enum name, all From impls, and the Result type alias. Additionally introduces: - New error variants for embedding pipeline: OllamaUnavailable, OllamaModelNotFound, EmbeddingFailed, EmbeddingsNotBuilt. Each includes actionable suggestions (e.g., "ollama serve", "ollama pull nomic-embed-text") to guide users through recovery. - New error codes 14-16 for programmatic handling of Ollama failures. - Savepoint-based migration execution in db.rs: each migration now runs inside a SQLite SAVEPOINT so a failed migration rolls back cleanly without corrupting the schema_version tracking. Previously a partial migration could leave the database in an inconsistent state. - core::backoff module: exponential backoff with jitter utility for retry loops in the embedding pipeline and discussion queues. - core::project module: helper for resolving project IDs and paths from the local database, used by the document regenerator and search filters. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,7 @@ use tracing::{debug, error, info, warn};
|
||||
use uuid::Uuid;
|
||||
|
||||
use super::db::create_connection;
|
||||
use super::error::{GiError, Result};
|
||||
use super::error::{LoreError, Result};
|
||||
use super::time::{ms_to_iso, now_ms};
|
||||
|
||||
/// Maximum consecutive heartbeat failures before signaling error.
|
||||
@@ -116,7 +116,7 @@ impl AppLock {
|
||||
} else {
|
||||
// Lock held by another active process - rollback and return error
|
||||
drop(tx);
|
||||
return Err(GiError::DatabaseLocked {
|
||||
return Err(LoreError::DatabaseLocked {
|
||||
owner: existing_owner,
|
||||
started_at: ms_to_iso(acquired_at),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user