Skip to content

v0.10.0

Choose a tag to compare

@ohdearquant ohdearquant released this 08 Oct 01:46
· 1085 commits to main since this release
8b0bb2a

khive v0.10.0

Minor release with source-breaking changes for out-of-tree Rust consumers of khive-runtime, khive-retrieval and the channel crates; each is listed under Upgrading with its replacement. One behaviour change reaches deployments directly: fresh inbound email now lands in the channel:email mailbox.

The headline is that khive no longer truncates embedding input silently: write paths report when the embedder bounded their input. The release also adds disk-capacity admission for every writable database, the channel node protocol with verified delivery receipts, labelled fusion in retrieval, bounded event pages in brain, and a large batch of performance work across memory, knowledge, git, code ingest and the vector index.

Upgrading from 0.9.0

  • KhiveRuntime::embed_document_with_model is removed; use embed_document_with_model_outcome. KhiveRuntime::create_entity, update_entity and update_note are no longer public; use create_entity_with_embedding_report, update_entity_with_embedding_report and update_note_with_embedding_report. The crate-root create_notes_atomic re-export is dropped; create_notes_atomic_with_report keeps the same all-or-none write and adds the aggregate report (#3667).
  • Legacy write methods that returned Ok(record) when the embedder bounded their input now return an error carrying committed=true, the committed record_id and the truncation report, with retryable=false. The record is stored complete, so reconcile by record_id instead of retrying. Affected: create_entity_with_attachments, create_note, create_note_with_embedding_content, create_note_with_decay, create_note_with_decay_for_embedding_model and update_entity_if_unchanged; each has a ..._and_report or ..._with_embedding_report counterpart that returns the record and the report together. Input within the embedder limit behaves as before (#3667).
  • embed_document, embed_document_batch_with_model and embed_document_batch return an error when any input is bounded; the ..._outcome and ..._outcomes variants return the bounded vectors with their byte counts (#3667).
  • khive-channel-node::ReceiptRejection now aliases khive_channel::ReceiptRejectionReason. Local PinUnavailable and SourceUnavailable failures surface as ReceiptVerification::Unhandled(ReceiptReadFailure), so poll and status callers keep the receipt cursor and retry, and submission-side read failures are transient transport errors (#4055).
  • SendOutcome::RecipientStored and RecipientQuarantined carry VerifiedRecipientReceipt instead of DeliveryReceipt; verify with VerifiedRecipientReceipt::verify and read the payload through receipt(). VerifiedRecipientReceipt and ReceiptVerificationError move from khive_runtime::comm_transport to khive_channel (#4055).
  • Fresh, uncorrelated inbound email now lands in the channel:email mailbox when KHIVE_EMAIL_DEFAULT_ACTOR is unset. A deployment reading new mail from local either configures a channel:email serving actor with [actor].mailbox_readers, or sets KHIVE_EMAIL_DEFAULT_ACTOR=local to keep the old routing. Replies still route to the original sender (#3571).
  • khive-retrieval no longer compiles khive-hnsw, khive-bm25 or khive-db by default. The re-exported HNSW and BM25 types (HnswIndex, HnswConfig, Bm25Index, Bm25Config and the rest) sit behind the new hnsw and bm25 features; checkpoint implies hnsw (#3968).
  • KhiveRuntime::hybrid_search_with_strategy, khive_retrieval::hybrid::dual_index (DualIndexRouter, DualIndexConfig, DualIndexStrategy), khive_retrieval::metrics, khive_retrieval::query_ir and the persist feature (persist, replay and weights modules) are removed. All of them came back unchanged in 0.11.0 (#4042, #4087, #4269, #4379, #4402).

Embedding truncation is disclosed

  • Writes that embed text report when the embedder bounded their input, including the legacy runtime wrappers, keyed task retries and memory.remember, which keeps its visibility token and reports the truncation computed for a keyed replay (#3667, #3851).
  • Embedding text provenance is stored beside each vector, so a later reader can tell which text produced it (#3485).

Disk capacity and storage safety

  • Every writable database open carries a resolved disk-reserve policy, and SQLite write admission reserves free space first; typed capacity errors and volume admission primitives report a refusal by its cause (#3423, #4299, #4339).
  • Writes and migrations are admitted under a volume lease, and the WAL ceiling is validated and reported before it is enforced (#3669, #4380).
  • Database files carry a durable owner identity, standalone databases pin their identity across hardlink aliases, and claimed stores are created with private permissions (#3608, #3815, #4230).
  • Namespace moves carry pack-created tables, partitioned vectors and single-target sections with their subjects, route edges by relation, and count only grants still in force (#4049, #4087, #4102, #4126).

Channels and comm

  • The node protocol core, an authenticated HTTPS node client, and verified sender receipts on delivery pages; verified recipient deliveries commit atomically (#3506, #3768, #3814, #4055).
  • Credential providers and receipt sealing in the runtime (#4198).
  • Local message file attachments, an acknowledgement journal, and sender-local transport status (#3818, #3971, #3975).
  • Inbound email fixes: recipient admission resolved at boot, quarantined mail ingested without duplicate rows, non-ASCII sender names preserved, and IMAP dedup keys scoped to the account (#3424, #3660, #4254, #4280).
  • Held outbox rows no longer starve delivery, and due rows are selected before the page limit (#3391, #3574).

Retrieval and memory

  • Labelled reciprocal rank fusion, scored labelled arms under any fusion strategy, and bounded ranked prefixes; the text and vector stages of a search run together (#4054, #4095).
  • Memory search goes through a warm ANN bridge with bounded delta checkpoints, and session recall visibility is provable (#3549, #3582, #3646).
  • Visibility receipts are sealed and replay provenance is persisted (#4324).
  • Recall fixes: score floors apply to the final MMR ranks, RRF uses the configured constant, rerank scores stay normalized, and equal-score candidates order by id (#3376, #4043, #4095, #4402).
  • Knowledge search can rerank from stored document vectors, and a section can declare its type with a heading marker (#3610, #4102).

New verbs and options

  • brain.event_page: bounded compound event pages (#4324).
  • kg: the owns and located_in relations, base endpoint rows for organization, location and competition, and live entity counts by type in stats (#3651, #3693, #4229, #4274).
  • gtd and the message and link verbs accept common parameter aliases (to, content, note) (#4095, #4106).
  • session store statistics and vacuum (#3623).
  • kkernel reindex repairs the indexes of one named record, and a read-only report lists ownerless blob rows (#3428, #4209).
  • git repairs duplicate issue and PR notes under merged anchors (#4280).
  • kkernel can build without the agent, telemetry and web packs (#4089).
  • New khive-fs crate: shared descriptor-relative filesystem operations (#4041).
  • Demand-started daemons retire when quiescent (#3731).

Performance

  • Memory: recall batches the supersedes lookup, coalesces fresh-tail writes before vector joins, and avoids repeated prefix and body scans; ANN maintenance runs off the lock (#3812, #3871, #3987, #4102).
  • Knowledge: compose runs its blend vector query once for all kinds and batches atom reads (#3755, #4007).
  • Database: reader permits are awaited without holding a thread, the periodic WAL checkpoint runs on a blocking thread, entity lists by namespace and type are indexed, and filtered list pages stream without a count (#4055, #4117, #4126, #4280).
  • Git and code ingest: checkout blobs are read through one batch reader, commit and project lookups are indexed, and ingest batches its pending writes and unresolved specifiers (#3474, #3757, #3759, #4041).
  • Vector index: search and graph construction reuse scratch buffers, and checkpoint segments are memory-mapped instead of read whole (#3809, #3820, #4042, #4055).
  • Note search hydrates candidates in one batch and bounds ID hydration and snippets before reading content (#3569, #3986).

Fixes

  • Query: GQL and SPARQL refuse binding-name collisions, digit-leading edge bindings, non-finite literals and hop bounds on literal properties; SPARQL integers keep their precision (#4402, #4414).
  • Knowledge: malformed status filters and out-of-range offsets are refused, non-canonical atom id spellings resolve, and atom deletes run in one chunked transaction (#3794, #3797, #4437).
  • Schedule: monthly repeats keep their day, unadvanceable recurrences fail closed, and schedule.agenda gains an exclusive continuation (#3436, #3563, #4054, #4379).
  • Runtime: post-commit indexing failures are reported instead of dropped, unknown write-destination config fields are refused, and a failed audit write is classified by its cause (#3392, #4149, #4274, #4372).
  • Daemon: connections are capped, recall ledger tasks are bounded, and supervisor markers are scoped to their socket (#4095, #4250).
  • kg deletes acknowledge the resolved UUIDs, and message reads respect the caller's mailbox (#3763, #4414).

Design records

  • ADR-144 Amendment 2: sealed visibility receipts and legacy keyed replay (#3653).
  • ADR-105 Appendix A v2 and sender receipts on the node poll page (#3785, #3854).
  • ADR-197 (proposed): the owns relation (#4239).
  • ADR-189 Amendment 3: pack-created tables and authorization state in namespace moves (#4087).
  • ADR-079 Amendment 4: a shared ANN lifecycle host (#3972).
  • ADR-085 Amendments 13 to 16: code-map routing, fallback owners and unchanged-file reuse (#3697, #3844, #3847, #4014).

Internal

  • 156 behaviour-preserving refactors split large handler and storage modules into submodules and share helpers across packs (#3162 through #4437).
  • 82 test and 11 CI changes, including constrained-device capacity acceptance on Linux and per-fixture volume-lock namespaces (#4429, #4437).