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.

docs(air-gapped): make no per-signal claim at all — the final gate measured mine wrong too

xerj-org0f33154b1ce7
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 34ae63701..b7f1b4fc3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -954,8 +954,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
`term` on an analysed field in a serving path.
Two things this change does **not** do. It does not touch the other half of
- #423 (which consolidated #362, closed `not_planned` for that reason) — `case_insensitive` accepted and silently dropped on
- `prefix`/`wildcard` — so the issue's headline symptom survives:
+ #423, which consolidated #362 (closed `not_planned` for that reason) — `case_insensitive` accepted and silently dropped on
+ `prefix`/`wildcard`, the term/prefix case-folding split #362 reported:
`{"term":{"title":"TestSegmentReader.java"}}` still answers `1` while
`{"prefix":{"title":"TestSeg"}}` answers `0`. And it is not the narrower fix
the issue thread proposed (dropping the lowercase retry the shortcut did on a
diff --git a/docs/recipes/air-gapped-deployment.md b/docs/recipes/air-gapped-deployment.md
index 77f191d1b..6b77b2907 100644
--- a/docs/recipes/air-gapped-deployment.md
+++ b/docs/recipes/air-gapped-deployment.md
@@ -115,15 +115,15 @@ written into `STAGE` in the enclave block below, because that one is spelled out
rather than derived.
The extracted tree is removed by the `trap` after the `cd` on a clean exit —
-success, `set -e`, and a failed digest. An **interrupted** run is the case to
-be careful about: whether the trap gets to finish depends on how the interrupt
-arrives, and a `SIGKILL`, an OOM kill, power loss, or a `SIGTERM` delivered to
-the whole process group (which is how `timeout`, a CI runner and systemd send
-it, killing `rm -rf` alongside the shell) can all leave a *half-extracted,
-digest-unverified* tree behind. So do not rely on the trap to decide safety:
-only the archive and its `.sha256` should cross the airgap, and **if the block
-did not print its `staged …` line, treat the staging directory as unverified
-and look before transferring.**
+success, `set -e`, and a failed digest. An **interrupted** run may or may
+not leave the tree behind: whether the trap runs to completion depends on
+how and when the interrupt lands, and the honest summary is that you cannot
+tell from the outside. So do not use the trap to decide safety. The rule
+that always holds: only the archive and its `.sha256` should cross the
+airgap, and **if the block did not print its `staged …` line, treat the
+staging directory as unverified — delete it, or inspect it, before
+transferring anything.** The trap is a convenience for the normal exits,
+not a guarantee across interrupts.
Three earlier versions of this paragraph were wrong, and each is worth knowing
because two of them are about where the trap sits and the third is about how
@@ -143,16 +143,15 @@ this was measured:
the tree went; with `OUT=stagedir` it survived all four cases.
- The third claimed an `EXIT` trap "does not run on `SIGTERM` or `SIGHUP`, so a
- dropped session leaves the tree". Also false, and the interesting part is how:
- the measurement behind it signalled the wrapping `bash script.sh` process
- instead of the forked subshell that actually owns the trap, so the trap was
- never asked to run. Signal the subshell alone and the trap runs; signal the
- whole process group and `rm -rf` is killed with it. That the answer depends on
- the delivery is exactly why the recipe does not lean on the trap for safety and
- keys on the `staged …` line instead. Several of this page's earlier wrong
- sentences trace to a harness that signalled the wrong process — a good reason
- to trust the printed line over any claim about what the trap does under
- signals.
+ dropped session leaves the tree". That was measured wrong, but so were two
+ attempts to correct it: whether the trap runs on an interrupt turned out to
+ depend on details the measurements kept getting different answers on —
+ which process was signalled, and whether a controlling terminal was
+ attached. The honest conclusion is the one now in the lead: do not assert
+ what the trap does under interrupts, and trust the `staged …` line instead.
+ Several of this page's earlier wrong sentences trace to a harness that
+ signalled or observed the wrong thing, which is the whole reason the recipe
+ keys on the printed line and not on the trap.
Hence the form above: the body is `"$STAGE"`, relative to the directory the
block already `cd`-ed into and never leaves, and the `trap` is installed
diff --git a/landing/docs/recipes/air-gapped-deployment.html b/landing/docs/recipes/air-gapped-deployment.html
index eb3359f19..9823c38aa 100644
--- a/landing/docs/recipes/air-gapped-deployment.html
+++ b/landing/docs/recipes/air-gapped-deployment.html
@@ -109,7 +109,7 @@
"$STAGE/xerj" --version
echo "staged $ASSET ($want) in $OUT"
)</pre>
- <p>The checksum proves archive integrity against the digest published beside it in the same release; it is not a signature, provenance statement, or attestation. <code class="inline">"$STAGE/xerj" --version</code> executes the staged binary, so the staging host must match the target platform; drop that line, or stage a different target by changing <code class="inline">TARGET</code> here <strong>and</strong> the triple spelled out in the enclave block below. The extracted tree is removed by the <code class="inline">trap</code> after the <code class="inline">cd</code> on a clean exit &mdash; success, <code class="inline">set -e</code>, and a failed digest. An <strong>interrupted</strong> run is the case to be careful about: whether the trap gets to finish depends on how the interrupt arrives, and a <code class="inline">SIGKILL</code>, an OOM kill, power loss, or a <code class="inline">SIGTERM</code> delivered to the whole process group (which is how <code class="inline">timeout</code>, a CI runner and systemd send it, killing <code class="inline">rm -rf</code> alongside the shell) can all leave a <em>half-extracted, digest-unverified</em> tree behind. So do not rely on the trap to decide safety: only the archive and its <code class="inline">.sha256</code> should cross the airgap, and <strong>if the block did not print its <code class="inline">staged &hellip;</code> line, treat the staging directory as unverified and look before transferring.</strong> The trap body is <code class="inline">"$STAGE"</code> — relative to the directory the block already entered — and is installed before <code class="inline">tar</code>: an earlier version derived it from <code class="inline">$OUT</code> after the <code class="inline">cd</code>, which silently cleaned nothing when <code class="inline">OUT</code> was a relative path.</p>
+ <p>The checksum proves archive integrity against the digest published beside it in the same release; it is not a signature, provenance statement, or attestation. <code class="inline">"$STAGE/xerj" --version</code> executes the staged binary, so the staging host must match the target platform; drop that line, or stage a different target by changing <code class="inline">TARGET</code> here <strong>and</strong> the triple spelled out in the enclave block below. The extracted tree is removed by the <code class="inline">trap</code> after the <code class="inline">cd</code> on a clean exit &mdash; success, <code class="inline">set -e</code>, and a failed digest. An <strong>interrupted</strong> run may or may not leave the tree behind: whether the trap runs to completion depends on how and when the interrupt lands, and the honest summary is that you cannot tell from the outside. So do not use the trap to decide safety. The rule that always holds: only the archive and its <code class="inline">.sha256</code> should cross the airgap, and <strong>if the block did not print its <code class="inline">staged &hellip;</code> line, treat the staging directory as unverified &mdash; delete it, or inspect it, before transferring anything.</strong> The trap is a convenience for the normal exits, not a guarantee across interrupts.</p>
<p><strong>Transfer <code class="inline">$OUT</code> itself and land it in the enclave at <code class="inline">/opt/xerj-staging</code></strong>, so the archive sits at <code class="inline">/opt/xerj-staging/release/</code> &mdash; the fixed path the enclave blocks read. Then set the same approved <code class="inline">TAG</code> and verify before extracting:</p>
<pre class="code">(
set -eu