Skip to main content

Crate fathomdb_engine

Crate fathomdb_engine 

Source

Re-exports§

pub use lifecycle::Subscription;

Modules§

lifecycle
Lifecycle observability data types.

Structs§

CheckIntegrityOpts
Doctor check-integrity invocation flags. quick and round_trip are accepted in 0.6.0 but treated as default; only full activates PRAGMA integrity_check. Per dev/design/recovery.md § Doctor-only flags.
CorruptionDetail
Stable corruption-on-open detail carried by EngineOpenError::Corruption.
CounterSnapshot
Snapshot of engine-internal counters returned by Engine::counters.
DumpProfileReport
Result of Engine::dump_profile. Mirrors the open-time embedder posture + the per-kind vector configuration registered in _fathomdb_vector_kinds.
DumpRowCountsReport
Result of Engine::dump_row_counts. Canonical tables only; projection / FTS / vec0 shadow tables are excluded. Order matches fathomdb_schema::CANONICAL_TABLES.
DumpSchemaReport
Result of Engine::dump_schema. user_version is the PRAGMA user_version sentinel. Canonical tables appear first per fathomdb_schema::CANONICAL_TABLES, then remaining non-sqlite_* tables alphabetically. Indexes follow the same alphabetical rule.
Engine
ExciseReport
Phase 9 Pack B excise report (AC-028a/b/c). Counts are post-excise totals; projections_invalidated reports the shadow-row invalidation total (FTS5 + vec0 + projection terminal) for the excised source.
Finding
Single doctor finding record. Stable report-shape per AC-043c. The code and doc_anchor strings are stable dispatch keys owned by dev/design/recovery.md § Code-to-operator-action cross-reference.
IntegrityReport
Three-section integrity report. AC-043a pins exactly these three keys.
MeanRecomputeReport
0.7.2 PR-2b — result of Engine::recompute_mean (the manual doctor recompute-mean path) and of the shared in-transaction recompute core. drift_cos_before is the cosine between the freshly derived corpus mean and the previously-pinned mean (1.0 when nothing was pinned yet, i.e. a first pin). mean_was_pinned distinguishes a refresh of an existing mean from an initial pin. See dev/design/embedder.md §0.3.
OpenReport
OpenedEngine
RebuildReport
Structured result of a rebuild operation. rows_invalidated is the total shadow-state rows truncated before re-derivation; rows_rebuilt is the count of rows the synchronous rebuild loop re-materialised (asynchronous re-enqueue work performed by the projection scheduler is not counted here). projection_cursor_after is the post-rebuild value of the projection cursor.
RecoveryHint
Recovery dispatch surface attached to a corruption detail.
SafeExportArtifact
Result of a successful Engine::safe_export call. The returned manifest_sha256 equals the SHA-256 of the export file bytes (per AC-039a) and matches the sha256 field written into the manifest JSON.
SchemaObject
Single table or index entry emitted by Engine::dump_schema.
SearchResult
SoftFallback
Soft-fallback signal carried on hybrid search results.
TableRowCount
Single canonical-table row count emitted by Engine::dump_row_counts.
TraceEvent
Single canonical-row tracing record. table is one of "canonical_nodes" or "canonical_edges".
TraceReport
Phase 9 Pack B trace report (AC-042). One event per canonical row attributable to the requested source_id, ordered by write_cursor ascending.
TruncateWalReport
Result of Engine::truncate_wal. Carries the three counters returned by PRAGMA wal_checkpoint(TRUNCATE): busy, log_frames, checkpointed_frames.
VerifyEmbedderReport
Result of Engine::verify_embedder. stored_identity is the name:revision pair persisted in _fathomdb_embedder_profiles; supplied_identity echoes the operator’s input verbatim.
WriteReceipt

Enums§

CorruptionKind
Open-path corruption category.
CorruptionLocator
Locator pointing at the corrupted region of the database file.
EmbedderChoice
Caller-facing selector for the embedder used by an opened engine (dev/design/embedder.md §0).
EngineError
EngineOpenError
OpenStage
Engine.open stage at which corruption was detected.
PreparedWrite
Batch input shape for Engine::write.
RebuildKind
Which shadow-state surface a RebuildReport describes. Projections covers the full FTS5 + vec0 + projection-terminal rebuild emitted by Engine::rebuild_projections. Vec0 covers the vec0-only path emitted by Engine::rebuild_vec0.
Section
One section of an IntegrityReport. Either every check in the section was clean, or one or more typed Findings describe the detected issue. Per AC-043b.
SoftFallbackBranch
Which retrieval branch could not contribute to a hybrid search.
TruncateWalStatus
Typed outcome of Engine::truncate_wal. Done matches SQLite’s busy = 0 return from PRAGMA wal_checkpoint(TRUNCATE); any other value surfaces as Busy.
VerifyEmbedderStatus
Typed outcome of Engine::verify_embedder. Mismatches do not raise EngineError; the operator workflow needs to see the stored vs. supplied pair to decide on next action.

Constants§

MEAN_VEC_PIN_THRESHOLD
EU-5a2 — number of documents required before the workspace’s _fathomdb_embedder_profiles.mean_vec is pinned for the default profile. Per dev/design/embedder.md §0.3 (compute-once-on-first- ingest lifecycle). Public-visible so the EU-5a2 machinery test can assert the value.
SEARCH_RERANK_LIMIT
0.7.2 PR-2bc S1 fix-1 — production phase-2 rerank LIMIT for engine search. This is the original hardcoded LIMIT 10; it is the default and the floor for search_limit_override (a test seam may RAISE it but never shrink it below this). There is NO env-var override on the hot path.
TOP_K_BIT_CANDIDATES