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.

Merge pull request #313 from probelabs/contrib/cluster-state-format1-fence

xerj-orgaa142d6772a0
diff --cc CHANGELOG.md
index 0a161b3ae,70cea4988..9fe369d5d
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -53,9 -50,33 +53,34 @@@ reach into nested checkouts) are fixed
### Fixed
+ - **A binary that does not understand `cluster_state.json` now fails closed
+ before activating storage.** The previous loader accepted future and
+ partially-understood shapes, dropped fields it did not know, and could later
+ rewrite the reduced document over the original. Boot now accepts only the
+ complete shipped format-1 envelope, including duplicate-key and nested-shape
+ checks. A rejected document leaves liveness at 200 and readiness at 503, but
+ opens no user index, Console system index, WAL, segment, or durable audit
+ sink; Console bootstrap and storage background jobs remain disabled until a
+ supported restart. After the existing request-size, authentication, and
+ authorization gates, HTTP storage access returns the stable
+ `cluster_state_unavailable` 503; authenticated gRPC calls return
+ `UNAVAILABLE`. Existing 401/403/body-limit precedence is unchanged. Client
+ responses give the category and recovery action without a local path or
+ persisted object names; the server log carries the detailed classification
+ and path for the operator. The original bytes and any legacy staging file
+ stay in place, and a blocked boot creates no salvage copy. Format-1 rewrites
+ retain the existing
+ same-directory temp-file fsync and atomic rename; parent-directory sync is a
+ best-effort attempt whose errors are ignored, so this change does not claim
+ strict namespace durability across power loss. Data-directory creation,
+ `node.lock` acquisition/PID diagnostics, and the server's earlier
+ credential/TLS preparation retain their existing behavior; the no-open/no-
+ replay claim begins at the cluster-state classification and covers storage
+ stores, not those process-bootstrap files.
+
- **`PUT /{index}/_settings {"index.lifecycle.name": null}` actually detaches
- the index, and the detach survives a restart** (#282, ported from #262). The
+ the index, and the detach survives a restart** (#282, ported from #262;
+ regression-tested in [#290](https://github.com/xerj-org/xerj/pull/290)). The
null previously fell through a string-only settings reader, so the operator
got `200 acknowledged` while the index stayed attached — to a policy whose
delete phase then destroyed it. A detach now removes the execution cursor,