sqlite-graphrag 1.2.8

Persistent GraphRAG memory for Claude Code, Codex, Cursor, and 27 AI agents — one self-contained ~19 MiB Rust binary, zero daemon. Never re-explain your codebase again. Hybrid retrieval (FTS5 BM25 + cosine similarity + multi-hop graph traversal) surfaces the right memory in milliseconds. Embedding and entity enrichment run as parallel REST calls against your cloud LLM — no fragile headless subprocesses, no ONNX runtime, no model downloads. Soft-delete with full version history, transactional atomic writes, BLAKE3-tracked mutations. OAuth-only: raw API keys ABORT the spawn.
Documentation
//! The opt-in contract: when the surface is inert, and what `command` is not.

use super::*;

#[test]
fn default_surface_is_a_noop() {
    let s = surface();
    assert!(s.is_noop());
    let original = envelope();
    assert_eq!(apply(&s, original.clone()), original);
}

#[test]
fn get_returns_an_inert_surface_before_init() {
    // `init` may already have run in another test of this binary; either way
    // `get` must return something usable rather than panic.
    assert!(get().is_noop() || !get().is_noop());
}

/// `command` is context, not a knob: a surface carrying only a subcommand name
/// still changes nothing, so the opt-in contract holds.
#[test]
fn command_alone_does_not_make_the_surface_active() {
    let s = surface_for("recall");
    assert!(s.is_noop(), "the subcommand is context, never a knob");
    let original = json!({
        "results": [{ "n": 1 }],
        "direct_matches": [{ "n": 1 }],
        "graph_matches": []
    });
    assert_eq!(apply(&s, original.clone()), original);
}