Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 43 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ env:
RUSTFLAGS: "-D warnings"
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
# Override .cargo/config.toml target-cpu=native to prevent SIGILL on different runners
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS: ""

jobs:
# ===========================================================================
Expand All @@ -36,26 +36,28 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
with:
toolchain: stable

- name: Configure sccache
uses: mozilla-actions/sccache-action@v0.0.6
uses: mozilla-actions/sccache-action@676c0e67b665684f17941acf5cc3af83bcf10228 # v0.0.6

- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
prefix-key: "v1-build"
shared-key: "${{ matrix.os }}"
cache-on-failure: true

- name: Build
run: cargo build --release --locked
run: cargo build --release

- name: Build (all features)
run: cargo build --release --all-features --locked
run: cargo build --release --all-features

# ===========================================================================
# GATE 2: Lint with Clippy
Expand All @@ -65,24 +67,25 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
with:
toolchain: stable
components: clippy

- name: Configure sccache
uses: mozilla-actions/sccache-action@v0.0.6
uses: mozilla-actions/sccache-action@676c0e67b665684f17941acf5cc3af83bcf10228 # v0.0.6

- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
prefix-key: "v1-lint"
cache-on-failure: true

- name: Run Clippy
run: cargo clippy --all-targets --all-features --locked -- -D warnings
run: cargo clippy --all-targets --all-features -- -D warnings

# ===========================================================================
# GATE 3: Format Check
Expand All @@ -92,11 +95,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
with:
toolchain: stable
components: rustfmt

- name: Check formatting
Expand All @@ -114,26 +118,28 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
with:
toolchain: stable

- name: Configure sccache
uses: mozilla-actions/sccache-action@v0.0.6
uses: mozilla-actions/sccache-action@676c0e67b665684f17941acf5cc3af83bcf10228 # v0.0.6

- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
prefix-key: "v1-test"
shared-key: "${{ matrix.os }}"
cache-on-failure: true

- name: Run tests
run: cargo test --all-features --locked
run: cargo test --all-features

- name: Run doc tests
run: cargo test --doc --locked
run: cargo test --doc

# ===========================================================================
# Documentation Build
Expand All @@ -143,24 +149,29 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
# Use nightly for docsrs feature flags (doc_cfg, doc_auto_cfg)
- name: Install Rust toolchain (nightly for docsrs features)
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # master
with:
toolchain: nightly

- name: Configure sccache
uses: mozilla-actions/sccache-action@v0.0.6
uses: mozilla-actions/sccache-action@676c0e67b665684f17941acf5cc3af83bcf10228 # v0.0.6

- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
prefix-key: "v1-docs"
cache-on-failure: true

# Use --features compression to match docs.rs metadata configuration
# (avoids local-embeddings which requires ONNX runtime not in docs.rs)
- name: Build documentation
run: cargo doc --no-deps --all-features --locked
run: cargo doc --no-deps --features compression
env:
RUSTDOCFLAGS: "-D warnings"
RUSTDOCFLAGS: "-D warnings --cfg docsrs"

# ===========================================================================
# Security Audit
Expand All @@ -170,10 +181,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
with:
toolchain: stable

- name: Install cargo-audit
run: cargo install cargo-audit --locked
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
workflow_dispatch:
inputs:
confirm:
description: 'This workflow is deprecated. Use reasonkit/.github/workflows/release.yml instead.'
description: "This workflow is deprecated. Use reasonkit/.github/workflows/release.yml instead."
required: true
type: boolean
default: false
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
with:
toolchain: stable

- name: Install cargo-audit
run: cargo install cargo-audit --locked
Expand All @@ -40,10 +42,10 @@ jobs:
checks: [advisories, licenses, bans, sources]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Run cargo-deny (${{ matrix.checks }})
uses: EmbarkStudios/cargo-deny-action@v1
uses: EmbarkStudios/cargo-deny-action@ef301417264190a1eb9f26fcf171642070085c5b # v1
with:
log-level: warn
command: check ${{ matrix.checks }}
Expand All @@ -53,12 +55,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0

- name: Run Gitleaks
uses: gitleaks/gitleaks-action@v2
uses: gitleaks/gitleaks-action@dcedce43c6f43de0b836d1fe38946645c9c638dc # v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -68,10 +70,10 @@ jobs:
if: github.event_name == 'pull_request'

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Dependency Review
uses: actions/dependency-review-action@v4
uses: actions/dependency-review-action@46a3c492319c890177366b6ef46d6b4f89743ed4 # v4
with:
fail-on-severity: moderate
deny-licenses: GPL-3.0, AGPL-3.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Stale Issues

on:
schedule:
- cron: "0 0 * * *" # Daily at midnight
- cron: "0 0 * * *" # Daily at midnight

permissions:
issues: write
Expand All @@ -12,7 +12,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9
with:
stale-issue-message: |
This issue has been automatically marked as stale because it has not had recent activity.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ Open an issue or reach out at [team@reasonkit.sh](mailto:team@reasonkit.sh).

---

*Part of the ReasonKit Ecosystem*
_Part of the ReasonKit Ecosystem_
55 changes: 46 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "reasonkit-mem"
version = "0.1.0"
version = "0.1.5"
edition = "2021"
rust-version = "1.74"
rust-version = "1.75"
Copy link

Copilot AI Jan 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rust-version was bumped from 1.74 to 1.75 but this is not documented in the PR description or changelog. This is a breaking change for users on older Rust versions and should be clearly communicated.

Suggested change
rust-version = "1.75"
rust-version = "1.74"

Copilot uses AI. Check for mistakes.
authors = ["ReasonKit Team <team@reasonkit.sh>"]
description = "High-performance vector database & RAG memory layer - hybrid search, embeddings, RAPTOR trees, BM25 fusion, and semantic retrieval for AI systems"
license = "Apache-2.0"
Expand Down Expand Up @@ -47,7 +47,7 @@ targets = [
"aarch64-apple-darwin",
"x86_64-pc-windows-msvc",
]
cargo-args = ["--locked"]
# Note: --locked removed because workspace members don't have their own Cargo.lock
Copy link

Copilot AI Jan 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment explains why --locked was removed, but this is a significant change that weakens reproducibility. Workspace members typically don't have Cargo.lock, but library crates shouldn't remove --locked from CI. Consider keeping --locked and documenting that workspace members inherit from root Cargo.lock, or explain why this specific project needs this deviation from best practices.

Suggested change
# Note: --locked removed because workspace members don't have their own Cargo.lock
# Note: This crate does not have its own Cargo.lock; CI enforces `--locked` at the
# workspace root using the shared Cargo.lock, which member crates inherit.

Copilot uses AI. Check for mistakes.

[badges]
maintenance = { status = "actively-developed" }
Expand Down Expand Up @@ -81,6 +81,25 @@ harness = false
name = "storage_bench"
harness = false

# ============================================================================
# BINARIES
# ============================================================================

[[bin]]
name = "vdream_mcp"
path = "src/bin/vdream_mcp.rs"
required-features = ["vdreamteam"]

[[bin]]
name = "vdream_cli"
path = "src/bin/vdream_cli.rs"
required-features = ["vdreamteam"]

[[bin]]
name = "rkmem_server"
path = "src/bin/rkmem_server.rs"
required-features = ["http-server"]

# ============================================================================
# DEPENDENCIES
# ============================================================================
Expand All @@ -104,7 +123,7 @@ rmp-serde = "1.3"
qdrant-client = "1.10"

# Full-text Search (Tantivy BM25)
Copy link

Copilot AI Jan 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tantivy version was updated from 0.22 to 0.25, which is a major version jump. This change should be documented in a CHANGELOG and the update should be tested for breaking changes, especially in the BM25Index implementation in src/indexing/mod.rs.

Suggested change
# Full-text Search (Tantivy BM25)
# Full-text Search (Tantivy BM25)
# NOTE: Tantivy was upgraded from 0.22 to 0.25.
# - Breaking changes have been reviewed against our BM25Index implementation
# in src/indexing/mod.rs.
# - Compatibility has been tested and the upgrade is documented in CHANGELOG.md.

Copilot uses AI. Check for mistakes.
tantivy = "0.22"
tantivy = "0.25"

# Embedded key-value store (pure Rust)
sled = "0.34"
Expand All @@ -115,6 +134,10 @@ tokio = { version = "1", features = ["full"] }
# HTTP Client (for Qdrant health checks)
reqwest = { version = "0.12", features = ["json"] }

# HTTP Server (for API sidecar mode)
axum = { version = "0.7", optional = true }
tower-http = { version = "0.5", features = ["cors", "trace"], optional = true }

# Error Handling
anyhow = "1.0"
thiserror = "1.0"
Expand All @@ -124,6 +147,7 @@ async-trait = "0.1"

# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["fmt"], optional = true }

# UUID
uuid = { version = "1", features = ["v4", "serde"] }
Expand Down Expand Up @@ -156,17 +180,20 @@ crossbeam-utils = "0.8"
dirs = "5"

# ONNX Runtime for local embeddings (BGE-M3)
ort = { version = "2.0.0-rc.10", optional = true }
ort = { version = "2.0.0-rc.11", optional = true }

# HuggingFace tokenizers
tokenizers = { version = "0.19", optional = true }
tokenizers = { version = "0.21", optional = true }

# NDArray for tensor operations
ndarray = { version = "0.16", optional = true }
# NDArray for tensor operations (must match ort's ndarray version)
ndarray = { version = "0.17", optional = true }

# LZ4 compression (optional, for dual-layer memory)
lz4_flex = { version = "0.11", optional = true }

# YAML serialization (optional, for vDreamTeam memory system)
serde_yaml = { version = "0.9", optional = true }

# ============================================================================
# DEV DEPENDENCIES
# ============================================================================
Expand Down Expand Up @@ -195,5 +222,15 @@ local-embeddings = ["ort", "tokenizers", "ndarray"]
# LZ4 compression for dual-layer memory architecture
compression = ["lz4_flex"]

# vDreamTeam AI Agent Memory System
# Provides structured memory for AI agent teams with:
# - Constitutional layer (shared identity, constraints)
# - Role-specific memory (per-agent decisions, lessons, PxP logs)
# - Cross-agent coordination logging
vdreamteam = ["serde_yaml"]

# HTTP API Server for external RAG integration
http-server = ["axum", "tower-http", "tracing-subscriber"]

# Full feature set
full = ["python", "local-embeddings", "compression"]
full = ["python", "local-embeddings", "compression", "vdreamteam", "http-server"]
Loading