{"repo": "automataia/graphrag-rs", "files": {"CHANGELOG.md": {"a7222c1b9238b483380c9f6fd5fb164586293b0f": {"t": 1785595755.1670887, "n": 67220, "h": "8e4869b3d2667a60", "c": "# Changelog\n\nAll notable changes to GraphRAG-RS will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [Unreleased]\n\n### Security\n\n#### CI green: cargo-deny advisories/licenses + rustfmt (2026-05-31)\n- **Vulnerabilities patched via lockfile bumps:** `rand` 0.8.5→0.8.6 and 0.9.2→0.9.4\n (RUSTSEC-2026-0097 unsoundness), `bytes` 1.10.1→1.11.1 (RUSTSEC-2026-0007 integer overflow),\n `rustls-webpki` 0.103.7→0.103.13 (RUSTSEC-2026-0049/0098/0099/0104 — CRL + name-constraint\n vulns). All patch-level, non-breaking.\n- **`deny.toml` licenses:** added `BSL-1.0` (Boost) and `CDLA-Permissive-2.0` (Mozilla CA bundle\n via `webpki-roots`) to the allow-list — both permissive, were failing the licenses job.\n- **`deny.toml` advisory ignores (unfixable here, documented inline):** unmaintained transitive\n crates `proc-macro-error`, `bincode`, `json`, `number_prefix`, `paste`, `rustls-pemfile`;\n `lru` 0.12 unsoundness (RUSTSEC-2026-0002, pinned by ratatui 0.29, unreachable in our usage);\n and `time` DoS (RUSTSEC-2026-0009) — its fix (≥0.3.47) requires rustc 1.88, above our MSRV 1.85,\n so `time` is held at 0.3.44 and the advisory accepted (reachable only via untrusted RFC-2822\n parsing in the server, not core/cli). Revisit when MSRV moves to ≥1.88.\n- **Formatting:** ran `cargo fmt --all` over the workspace (71 files) to clear the long-standing\n `rustfmt` CI job. Mechanical, no behavior change.\n- **`--all-features` advisory/license coverage:** the `cargo-deny-action` defaults to\n `--all-features`, so CI also scans the optional `lancedb` tree (lance/datafusion/arrow). Patched\n `lz4_flex` 0.11.5→0.11.6 / 0.12.0→0.12.2 (RUSTSEC-2026-0041) and `tar` 0.4.44→0.4.46\n (RUSTSEC-2026-0067/0068); allowed `0BSD` (`mock_instant`). Added `[graph] all-features = true` to\n `deny.toml` so local `cargo deny check` sees the same graph as CI (prevents local≠CI drift).\n- **CI SIGILL fix:** set `RUSTFLAGS = \"-C target-cpu=x86-64-v2\"` in `ci.yml` to override the repo's\n `.cargo/config.toml` `-C target-cpu=native`. On GitHub's heterogeneous runners `native` can emit\n instructions the silicon traps (SIGILL crashing rustc/proc-macros, seen building `ollama-rs`).\n Verified the rustc invocation: an empty `CARGO_BUILD_RUSTFLAGS` is ignored and doesn't override\n the config flag — only a non-empty `RUSTFLAGS` (highest precedence) fully replaces it. Local dev\n keeps `target-cpu=native`; CI uses the portable `x86-64-v2` baseline.\n\n### Added\n\n#### Documentation site (2026-05-31)\n- mdBook documentation site under `book/`, deployed to GitHub Pages at\n `https://automataia.github.io/graphrag-rs/`. Curated, English-only, user-facing TOC\n (`book/src/SUMMARY.md`) covering getting-started, concepts, configuration, features, and per-crate\n guides. Internal dev reports and Italian guides are intentionally excluded.\n- Chapters are thin `{{#include}}` wrappers over the canonical sources (`HOW_IT_WORKS.md`, crate\n READMEs, curated `docs/*.md`) so there is a single source of truth and no content drift.\n Front-door pages (`introduction.md`, `getting-started/overview.md`, `quickstart.md`) are authored.\n- Mermaid diagrams render via the `mdbook-mermaid` preprocessor; built-in client-side search enabled.\n- API reference links out to [docs.rs/graphrag-core](https://docs.rs/graphrag-core) rather than\n self-hosting `cargo doc`.\n- New CI workflow `.github/workflows/docs.yml` builds the book (pinned `mdbook` 0.5.3 +\n `mdbook-mermaid` 0.17.0 prebuilt binaries) and deploys via `actions/deploy-pages`. The generated\n `book/book/` output is git-ignored. **Manual one-time step:** set repo Settings → Pages → Source =\n \"GitHub Actions\".\n- README: added a docs-site badge.\n- Translated to English the doc sources the site includes that still contained Italian:\n `docs/INCREMENTAL_UPDATES.md`, `docs/TUI_USAGE_GUIDE.md`, `docs/ENRICHMENT_USAGE_GUIDE.md`,\n `docs/SUMMARIZATION_CONFIG.md`, the `graphrag-cli/README.md` config table notes, and the\n Italian entries in this CHANGELOG. Fixed stale repo URLs (`anthropics/*` → `automataIA/graphrag-rs`)\n in the translated guides. The public site is now English-only end to end.\n- Stripped decorative/pictographic emoji (the 📚🚀📖 family) from the doc sources the site\n includes, fixing \"tofu\" boxes that appeared wherever the viewer's font lacked an emoji glyph\n (mdBook's default theme has no emoji-font fallback — a generic missing-glyph issue, not a bug).\n Preserved arrows (→), box-drawing/ASCII diagrams (━│▼█), and data symbols (✅❌★☆); converted\n rating ⭐→★ to keep ratings rendering. Keycap-numbered headings (`1.`/`2.`) replaced the\n `1️⃣` style.\n\n## [0.2.0] - 2026-05-31\n\n### Fixed\n\n- **`arrow` workspace dep**: added `default-features = false` to `arrow = \"57\"` in\n the workspace `Cargo.toml`. Previously, the `default-features = false` directive in\n `graphrag-core/Cargo.toml` was silently ignored by Cargo (build-time warning).\n- **`documentation` metadata for the `graphrag` crate**: added `documentation = \"https://docs.rs/graphrag\"`\n in `graphrag/Cargo.toml`, aligning the wrapper crate with `graphrag-core` and `graphrag-cli`.\n\n#### Code/architecture/product quality audit (2026-05-30)\n\n### Added\n\n- **CI/CD**: new workflow `.github/workflows/ci.yml`. The repo previously had no CI\n automation. **Blocking** jobs: `clippy --workspace --lib -D warnings`\n (now green, see below), `test -p graphrag-core --lib`, `cargo-deny`. The\n `fmt` job is **informational and non-blocking** (`continue-on-error`) until the repo is\n made `cargo fmt --all` clean (pre-existing repo-wide formatting debt).\n- **Security tooling**: `deny.toml` (advisories + permissive licenses + duplicate ban)\n and `SECURITY.md` (private disclosure policy via GitHub Security Advisories).\n- **Drift-guard tests** (`config/setconfig.rs`): `gliner_setconfig_default_matches_runtime`\n and `autosave_setconfig_default_matches_runtime` fail at build time if the serde\n leaf-struct defaults diverge from the canonical runtime ones, preventing \"5-point-sync\" drift.\n `OllamaConfig` is excluded on purpose (by-design divergence: offline-first runtime vs\n user-facing schema).\n- **Crate metadata**: `documentation` (docs.rs) and `readme` fields added to\n `graphrag-core` and `graphrag-cli` for publishing on crates.io.\n\n#### Documentation polish (2026-05-30)\n\n- **`graphrag/README.md`**: the wrapper meta-crate had no README (only `Cargo.toml`\n + `src`). Added: explains that it re-exports `graphrag-core` and provides the `graphrag`\n binary, with a binary quick-start + library usage and links to the core/root README.\n- **Module `//!` headers** added to the 10 `graphrag-core` modules that lacked them\n (previously starting with `use`/`pub mod`/`#[cfg]` or a `///` on the first submodule):\n `config`, `graph`, `generation`, `critic`, `retrieval`, `summarization`, `vector`,\n `entity`, `text`, `query`. Every module's rustdoc page now shows a description.\n Doc-comments only, no behavior change; `clippy -p graphrag-core -D warnings`\n stays green and `cargo doc` introduces no new warnings.\n\n#### PageRank: score normalization (dangling nodes) (2026-05-30)\n\n- **Bug fix**: `scores_to_entity_map` in [graph/pagerank.rs](graphrag-core/src/graph/pagerank.rs)\n now L1-normalizes the scores (sum = 1.0). *Dangling* nodes (no outgoing edges)\n lost rank mass on every iteration, leaving the sum < 1.0. Single fix point\n → covers all paths (dense/parallel/sparse). Unblocks 3 previously-failing tests:\n `test_pagerank_convergence`, `test_personalized_pagerank`,\n `test_precompute_global_pagerank` (visible only under the `pagerank` feature, activated\n by `--workspace` feature-unification).\n\n#### Swagger UI served at `/swagger` (2026-05-30)\n\n- **graphrag-server**: the Swagger UI was announced but not served (\"coming soon\").\n Now exposed at `/swagger` via **apistos**'s native support (`features = [\"swagger-ui\"]`,\n already enabled) — `apistos-swagger-ui` bundles the official Swagger UI assets, so\n no new dependency. Changed `.build(\"/openapi.json\")` →\n `.build_with(..., BuildConfig::default().with(SwaggerUIConfig::new(&\"/swagger\")))` in\n [main.rs](graphrag-server/src/main.rs). README updated (removed \"coming soon\").\n\n#### Clean clippy on examples/tests + green doctests (2026-05-30)\n\n- **Clippy examples/tests**: `cargo clippy --examples --tests -p graphrag-core -- -D warnings`\n is now green. Bulk via `cargo clippy --fix`; manual tail: `///!`→`//!` (embeddings demo),\n `.filter().next_back()`→`.rfind()`, `.clone()` on a double ref → `.iter().copied()`,\n ignored `let _ =` on `Result`, `std::slice::from_ref`, removal of unused vars.\n- **Doctest**: `cargo test --doc -p graphrag-core` → 47 pass / 0 fail / 17 ignored. 7\n illustrative, non-self-contained examples (require a live Ollama, an async runtime, or\n undefined setup variables — `core::ChunkingStrategy`, `build_relationship_hierarchy`,\n KV-cache Ollama, `pipeline_executor`, etc.) marked ```` ```ignore ````. The hero example\n still runs and is green.\n- **`clippy --fix` regression corrected**: `config/enhancements.rs:770` — `--fix` had removed\n `mut` from `let count`, seeing it as inactive under default features; restored `let mut count`\n with `#[allow(unused_mut)]` (the `count += 1`s are behind `#[cfg(feature = ...)]`).\n\n#### Stale examples/tests recompile (2026-05-30)\n\n- **Stale struct initializers**: added the missing temporal/causal fields (all `None`)\n to the `Entity` literals (`first_mentioned`, `last_mentioned`, `temporal_validity`) and\n `Relationship` literals (`embedding`, `temporal_type`, `temporal_range`, `causal_strength`) in\n the `llm_evaluation_demo`, `advanced_nlp_demo`, `hierarchical_graphrag_demo`,\n `workspace_demo`, `tom_sawyer_workspace` examples. They had fallen behind the evolution\n of `Entity`/`Relationship` in `core/mod.rs` (Phase 1.2) and broke `cargo build --examples`.\n- **`complete_zero_cost_graphrag_demo`**: `Config` literal closed with `..Default::default()`\n (it was missing `advanced_features`, `gliner`, `suppress_progress_bars`) and the `EntityConfig`\n literal completed with `use_atomic_facts: false` + `max_fact_tokens: 400`.\n- **Per-feature gating** (`graphrag-core` Cargo.toml): `hierarchical_graphrag_demo` now\n `required-features = [\"leiden\"]` (uses `LeidenConfig` / `detect_hierarchical_communities`,\n `#[cfg(feature = \"leiden\")]`) and the `incremental_integration` test `required-features =\n [\"incremental\"]` (it imported `graphrag_core::incremental`). So a default\n `cargo build/test --workspace` stays green without pulling in the optional features.\n- **`Chat discussion.html`**: added the standard `line-clamp:3` property alongside\n `-webkit-line-clamp` (CSS `vendorPrefix` linter).\n- Verification: `cargo build --examples --tests --workspace` → clean Finished; `cargo test\n -p graphrag-core --lib` → 365 pass / 0 fail. The 3 `pagerank` tests that fail under\n `--workspace` feature-unification are **pre-existing** (confirmed on a clean tree).\n\n### Changed\n\n- **Dependency dedup (anti-bloat)**: aligned two direct workspace dependencies\n to versions already present transitively, eliminating duplicate versions\n in `graphrag-cli`'s `-e normal` tree:\n - `strum` 0.25 → **0.26** (matches `ratatui 0.29`) — removes duplicate `strum` +\n `strum_macros`.\n - `itertools` 0.12 → **0.13** (matches `ratatui`/`unicode-truncate`).\n - Real duplicates in `graphrag-cli`'s normal tree dropped from 34 to 26. Verified that\n `graphrag-core` (the published crate) has only 4 unavoidable transitive duplicates\n (`getrandom` 0.2/0.3, `webpki-roots` 0.26/1.0, TLS stack). `rand` 0.8→0.9 NOT\n done (API-breaking, only deduplicated the unpublished server binary).\n\n### Fixed\n\n- **CLI crash at startup on all non-TUI subcommands** (`index`, `ask`, `bench`,\n `setup`, `validate`, …): `color_eyre::install()` was called twice —\n in `graphrag-cli/src/main.rs:10` and again inside `run()` at `lib.rs:197` — and\n the second install aborted with *\"could not set the provided `Theme`\n globally as another was already set\"*. Removed the duplicate `install()` from\n `main.rs`; now both binaries (`graphrag-cli` and the `graphrag` meta-crate,\n which doesn't install on its own) install exactly once via `run()`.\n Caught by running the e2e benchmarks (`bench`).\n- **MSRV corrected and verified**: `rust-version` changed from `1.75` (false, never\n tested) to **`1.85`**. The real floor is imposed by the direct dependency `jsonfixer`,\n which uses `edition = \"2024\"` (requires rustc ≥ 1.85). Build-verified on the 1.85\n toolchain for `graphrag-core` and `graphrag-cli`. New `msrv` CI job that builds on 1.85.\n Analysis method: floor from `cargo metadata` (max `rust_version` declared among the\n normal deps) + build verification on a single toolchain (no costly bisect).\n- **Lint debt zeroed (green workspace clippy)**: resolved 38 pre-existing clippy\n errors that surfaced under `cargo clippy --workspace --lib -- -D warnings` (Rust\n 1.95). Diagnosis: `graphrag-core` in isolation (default features) was already clean;\n the errors were in core's optional modules (`incremental`, `rograg`,\n `lightrag`, `embeddings/ollama`) activated by the cli/server features + 3 errors\n of `graphrag-cli`'s own. Idiomatic fixes (`to_vec()`, `iter_mut().enumerate()`,\n `if let Some`, `sort_by_key(Reverse(..))`, type aliases `NodeDeltaResult`/\n `EdgeDeltaResult`) and targeted, commented `#[allow]`s where a rename would break the\n serde API (`PendingUpdateType`) or for a private 10-argument helper.\n Not an interface break: the crates compile and link correctly.\n- **GLiNER default drift**: `default_gliner_entity_labels`/`default_gliner_relation_labels`\n in `config/setconfig.rs` were misaligned with the runtime `GlinerConfig::default()`\n (missing `\"concept\"` and `\"causes\"`). Now aligned with the canonical default (4 entity + 3\n relation labels). Not observable in the existing e2e configs (they set the labels\n explicitly); relevant only when GLiNER is enabled via TOML while omitting the labels.\n\n### Documentation\n\n- **Markdown doc consolidation (few but useful)**: reduced the ~55 tracked `.md` files to a\n keystone set. Deleted 39 files among process artifacts (`report.md`, `TODO.md`,\n `*_COMPLETE.md`, `*_SUMMARY.md`, `*_STATUS.md`, `MERGE_COMPLETE.md`,\n `IMPLEMENTATION_SUMMARY.md`) and satellite integration guides now covered by the keystones\n (`graphrag-core/{ADVANCED_FEATURES,OLLAMA_INTEGRATION,LEIDEN_INTEGRATION,LIGHTRAG_INTEGRATION,\n HIPPORAG_INTEGRATION,CROSS_ENCODER_INTEGRATION,ENTITY_EXTRACTION,EMBEDDINGS_CONFIG,\n PIPELINE_ARCHITECTURE,QUICKSTART,ENRICHMENT_IMPLEMENTATION,WORKSPACE_PERSISTENCE_SUMMARY}.md`,\n the `src/{embeddings/README,graph/TRAVERSAL_GUIDE}.md`, the entire series of non-README\n `graphrag-wasm/*.md` guides, `examples/MULTI_DOCUMENT_PIPELINE.md`). The surviving\n keystones: `README.md`, `HOW_IT_WORKS.md`, `CHANGELOG.md`, the 4 crate READMEs,\n `config/JSON5_CONFIG_GUIDE.md`. The `docs/` folder is git-ignored (local notes) and is\n not touched.\n- **Keystone staleness fixes**: MSRV badge/prerequisites `1.70` → **`1.85`** in the root README;\n removed references to the deleted `graphrag-leptos` crate (workspace layout now 5-crate\n + the `graphrag` meta-crate, dependency graph updated); \"Web UI\" section rewritten around the\n chat-shell. `HOW_IT_WORKS.md`: the WASM section now points to `graphrag-wasm` (no longer to the\n deleted `graphrag-leptos`).\n- **graphrag-wasm README rewritten**: the old 5-tab DaisyUI UI is replaced by the\n documentation of the 3-column Nordic-Minimal chat-shell (LeftRail/Stage/RightRail),\n off-main-thread inference, citations, IndexedDB persistence; removed the dead links to the\n deleted satellite guides.\n- **Internal links repointed**: all links to the deleted docs (in `README.md`,\n `HOW_IT_WORKS.md`, `graphrag-core/README.md`) now point to `HOW_IT_WORKS.md`,\n `config/JSON5_CONFIG_GUIDE.md`, `CHANGELOG.md`, or `docs.rs/graphrag-core`.\n\n### Removed\n\n- **Dead code**: removed `graphrag-server/src/main_axum_old.rs` (~31KB, orphan file\n with no references, neither a bin-target nor a module).\n- **Unused dependency**: removed `text_analysis = \"0.3\"` from `graphrag-core` and\n from `[workspace.dependencies]` (detected with `cargo machete`, verified: no\n use in the code — the only match was the string `\"context_analysis\"`). The other\n `cargo machete` reports (`getrandom`, `gline-rs`, `js-sys`, `web-sys`,\n `tower`, `text-splitter`) are verified **false positives** (wasm/api feature-enablers\n or crates whose lib name differs from the package name, like `gline-rs`→`gliner`) and\n kept.\n\n### Changed\n\n#### graphrag-wasm chat-shell rewrite (Nordic-Minimal) (2026-05-17)\n\n- **BREAKING:** the 5-tab daisyUI UI (`Build / Explore / Query / Hierarchy / Settings`) is\n replaced by a single 3-column chat shell that mirrors the\n [`Chat discussion.html`](Chat%20discussion.html) Nordic-Minimal mockup verbatim\n (palette, font stack `Newsreader / Geist / Geist Mono`, class names,\n citation/hover wiring).\n - New layout in [graphrag-wasm/src/main.rs](graphrag-wasm/src/main.rs):\n `LeftRail` (brand + sources + Flat/Hierarchy toggle + Build button),\n `Stage` (head with active source, thread of `Turn`s, composer), `RightRail`\n (subgraph SVG + pipeline rows + ministats + references). All real data:\n `documents` come from the existing IndexedDB signal, pipeline progress is\n driven by the existing `BuildStatus`/`BuildStage`, embeddings come from\n ONNX Runtime Web + `tokenizer.json`, retrieval from `VectorIndex::search`,\n answers from WebLLM (`Phi-3-mini` for synthesis, Qwen for extraction),\n citations are post-processed via `parse_answer_with_cites` and link to\n `