Skip to content

v0.11.0

Choose a tag to compare

@ohdearquant ohdearquant released this 09 Oct 02:43
· 978 commits to main since this release
a2bbe96

khive v0.11.0

Minor release. Three changes to public Rust types break source compatibility for code that names them directly; they are listed first, with the one-line fix for each. Serialized filters from 0.10.0 still deserialize, and the events socket stays compatible.

The headline is that the retrieval surfaces removed in 0.10.0 are back, storage gains typed filters and row accessors that packs can build on, khive-fs gains descriptor-relative file operations, and eight verbs now refuse malformed input instead of silently ignoring it.

Upgrading from 0.10.0

  • khive_vamana::VisitedSet (also khive_vamana::graph::VisitedSet) is now a re-export of khive_types::vector::VisitedSet, the visited-node tracker shared with the HNSW index. The path still resolves but names a different type, so code that implemented a trait for the old type adjusts to the shared one (#4580).
  • StorageError::WriterTaskTerminated and WireWriterTaskFailure::TaskTerminated gain a field, sqlite_full_codes: Option<(i32, i32)>. A pattern that names either variant needs .., and a literal can use the new StorageError::writer_task_terminated(request_state) constructor. On the events socket the field is omitted when it is None (#4612).
  • EntityFilter gains property_equalities and tombstones, and EventFilter gains outcome and payload_equalities. A struct literal that lists every field ends with ..Default::default(); the new fields default to the old behaviour, live rows only with no outcome or JSON restriction (#4607).

Retrieval surfaces restored

  • KhiveRuntime::hybrid_search_with_strategy, khive_retrieval::hybrid::dual_index, khive_retrieval::query_ir, khive_retrieval::metrics and the persist feature (persist, replay and weights modules) are back, unchanged from 0.9.x, as the base for the ordered-peer-engine work. Code that migrated away from them in 0.10.0 keeps working (#4629).

Verbs that now refuse bad input

  • Entity updates distinguish an omitted description from an explicit null: omission keeps the stored value, null clears it, and an empty string stays a value. Canonical and atomic updates refuse salience or decay_factor on an entity or edge target instead of ignoring it, before any other field is applied (#4580).
  • Bulk link validates every entry, including a repeat of an earlier source, target and relation. In atomic mode an invalid repeat refuses the batch; with atomic=false it is reported in errors, and a failed entry no longer blocks a later valid entry for the same edge (#4571).
  • exec.tree_put rejects a delete that is not a boolean and publishes nothing; before, the string "true" counted as not deleting (#4571).
  • A task update that sets due with both due_timezone and timezone validates both names, and a malformed one refuses the update (#4571).
  • schedule.schedule checks the entity_kind and note_kind of a scheduled create by the same rule create applies, before any schedule is written (#4571).
  • git.digest refuses a non-string project and writes nothing, where it used to ignore it and run against an automatically chosen project (#4571).
  • comm.thread refuses an after cursor that is not a message (#4571).
  • knowledge.upsert_atoms treats an atom as a domain mirror only for an exact type:domain tag, not for any tag containing that text (#4571).

Storage building blocks

  • EntityFilter::property_eq and EventFilter::payload_eq match stored JSON by a $.field[.subfield] path, EventFilter::outcome matches one outcome, and include_tombstones / tombstoned_only select deleted entities. StorageBackend::list_namespaces lists the namespaces holding records of one kind (#4607).
  • SqlRow gains typed accessors (uuid, opt_uuid, f64, opt_f64, text_or_none, i64_or_none) that return a typed error for a missing column or a wrong type (#4580).
  • SqlReader::count runs a count statement and returns a checked u64; existing implementors need no change (#4580).
  • SqlStatement::new builds a statement without a diagnostic label, and labelled sets one (#4612).
  • khive_db::env reads environment variables with typed parsing and defaults (env_parse_or, env_flag, cached_env_flag); the pool settings use it with unchanged parsing (#4607).

Filesystem primitives (Unix)

  • fd_relative::open_file_at opens one writable entry under a held directory with an explicit creation policy; it refuses a final symlink, . and .., and never truncates (#4571).
  • fd_relative::unlink_at and rename_at remove or rename entries under held directories without following symlinks (#4607).
  • directory_walk::open_dir_nofollow and opened_file::open_regular_file_nofollow refuse a final symlink, and the latter refuses a FIFO without waiting on it; read_link_at is now public (#4580).
  • fd_relative::FileIdentity reports the device and inode of an open file or of an entry under a held directory (#4612).

Vectors

  • khive_types::vector adds explicit f32 byte codecs: little-endian (encode_f32_le, decode_f32_le) and host order as sqlite-vec stores it (encode_f32_native, decode_f32_native). VamanaIndex::to_bytes now writes little-endian vectors on every target; the bytes are unchanged on little-endian hosts (#4621).

Fixes

  • When SQLite reports a full disk and the failure retires the writer task, the error now carries sqlite_disk_full with the SQLite result codes, where it reported a generic writer_task_terminated (#4612).
  • kkernel reindex walks entities and notes with a stable cursor, so a record written during the run is visited once and a soft delete at a batch boundary no longer stops the pass (#4596).
  • kkernel kg validate exits with status 2 for a malformed or YAML rules file, as ADR-034 specifies, keeping status 1 for rule violations (#4571).
  • code.ingest of a folder reached through a path ending in .. names the project after the folder it resolves to, so both spellings agree (#4621).
  • Errors from opening the database backend begin with backend main: (#4571).

Performance

  • The kkernel git annotation repair preview reads commit notes and project links in batches of up to 900 SHAs instead of two queries per SHA; 2,000 SHAs take six reads (#4995).

Design records

  • ADR-031 Amendment 5 (Proposed): ordered peer engines and explicit retrieval strategies (#4638).
  • ADR-051 Amendment 3 (Proposed): knowledge retrieval under ordered peer engines (#4978).
  • ADR-042 Amendment 1 (Proposed): a provenance event for the weighted-feature rerank path (#4984).

Internal

  • 65 behaviour-preserving changes move repeated code onto shared helpers (row decoding, UUID resolution, environment parsing, ANN registry and watcher setup, timestamp formatting) and move inline unit tests into sibling modules (#4571, #4576, #4580, #4596, #4607, #4612, #4621, #4627, #4995).
  • Coverage merging skips unreadable profiles up to a floor instead of failing the job (#4599).