Skip to content

armgit / xerj

Public Imported from GitHub
0

AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory and RAG. Elasticsearch-compatible API; Corpus Hub serves hundreds of reference memory corpora.

fix(ci): resolve the merge before it lands + hoist tree-sitter (#352)

xerj-org25bd17e2d38d
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f02b19270..336ed285b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -141,6 +141,28 @@ jobs:
working-directory: engine
run: cargo clippy --workspace --all-targets -- -D warnings
+ # #352: #327 (tree-sitter 0.25) and #317 (0.26) were each green on their own
+ # head, but tree-sitter declares `links = "tree-sitter"` so only one version
+ # may exist — the MERGE was a hard resolution failure that took out build,
+ # test, clippy and every release job at once, and stayed red long enough that
+ # ~every open PR inherited it. No gate caught it because each branch resolved
+ # its own head, never the merge. This resolves the merge in a few seconds, no
+ # compile: `actions/checkout` gives refs/pull/N/merge by default on a
+ # pull_request, so this runs against the merged tree. `--locked` also fails on
+ # Cargo.lock drift.
+ workspace-resolves:
+ name: Workspace resolves (links + lockfile)
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
+
+ - name: Install Rust
+ uses: dtolnay/rust-toolchain@032958afbdc797a9164d3bc0b56325c1308924a5 # 1.97.1
+
+ - name: cargo metadata (resolves the merge; fails on a links conflict or lock drift)
+ working-directory: engine
+ run: cargo metadata --locked --format-version 1 >/dev/null
+
# XERJ's security pitch is "no JVM, so none of the Log4Shell class of supply
# chain CVEs" — which is only worth anything if somebody is actually watching
# the 660-odd crates we do depend on. This job is that somebody. It was
diff --git a/engine/Cargo.toml b/engine/Cargo.toml
index 8b8733eaf..790045f1f 100644
--- a/engine/Cargo.toml
+++ b/engine/Cargo.toml
@@ -109,6 +109,13 @@ reqwest = { version = "0.12", default-features = false, features = ["json", "rus
tempfile = "3"
# Benchmarking
criterion = { version = "0.5", features = ["html_reports"] }
+# AST parsing. Only tree-sitter CORE is hoisted here: it declares
+# `links = "tree-sitter"`, so two crates pinning different core versions is a
+# hard resolution failure that takes out the whole workspace at once, not a
+# duplicate-dep warning (#352: #327 pinned 0.25, #317 moved to 0.26, and the
+# merge stopped resolving). One pin, one version. Per-crate grammar pins stay
+# local; the `workspace-resolves` CI gate catches any links crate that drifts.
+tree-sitter = "0.26"
[profile.release]
opt-level = 3
diff --git a/engine/crates/xerj-autoindex/Cargo.toml b/engine/crates/xerj-autoindex/Cargo.toml
index 49f5587d5..72f86a652 100644
--- a/engine/crates/xerj-autoindex/Cargo.toml
+++ b/engine/crates/xerj-autoindex/Cargo.toml
@@ -40,7 +40,7 @@ reqwest = { workspace = true, features = ["blocking"] }
# Core 0.26: forced by tree-sitter-perl 1.1.2, the only #295 grammar with a
# hard (`links`) core dep — same story as the c-sharp 0.24→0.25 bump. Every
# other grammar binds through tree-sitter-language and does not care.
-tree-sitter = "0.26"
+tree-sitter = { workspace = true }
tree-sitter-python = "0.23"
tree-sitter-c = "0.23"
tree-sitter-rust = "0.23"
diff --git a/engine/crates/xerj-engine/Cargo.toml b/engine/crates/xerj-engine/Cargo.toml
index e710362df..4dc9e3f38 100644
--- a/engine/crates/xerj-engine/Cargo.toml
+++ b/engine/crates/xerj-engine/Cargo.toml
@@ -54,7 +54,7 @@ rustc-hash = { workspace = true }
# (`xerj-autoindex/src/extract/code.rs`) — this module re-parses at RESPONSE
# time rather than depending on that crate (autoindex depends on the engine,
# not the other way around; a reverse dependency would be circular). ---
-tree-sitter = "0.26"
+tree-sitter = { workspace = true }
tree-sitter-python = "0.23"
tree-sitter-c = "0.23"
tree-sitter-rust = "0.23"