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(seo): man-page fact-check aliases held backspaces, not word boundaries

Tom Villanibb4f1dc57815
diff --git a/scripts/seo/claims_rules.py b/scripts/seo/claims_rules.py
index e1ec64156..8da6cbe85 100644
--- a/scripts/seo/claims_rules.py
+++ b/scripts/seo/claims_rules.py
@@ -1665,7 +1665,7 @@ THING_MATRIX = [
"section with the page title and the NAME summary. mdoc(7) pages (BSD macros, e.g. "
"ssh.1) are NOT parsed - they index as plain text lines. No rendering, no apropos/"
"whatis database, no info pages."),
- "aliases": [r"man ?pages?", r"manpages?", r"roff", r"troff", r"groff"]},
+ "aliases": [r"\bman ?pages?\b", r"\bmanpages?\b", r"\broff\b", r"\btroff\b", r"\bgroff\b"]},
{"thing": "Legacy / other office formats (.xls, .ppt, .xlsb, OpenDocument)", "status": RED,
"mech": "no extractor - sniff.rs names .xlsb and OpenDocument with an export hint", "cite": RC + ":378",
"gate": "No extractor. Tell the reader to save as .xlsx / .pptx / .docx first; do not write a page.",
diff --git a/scripts/seo/factcheck.py b/scripts/seo/factcheck.py
index 71e5cee11..cf63ac780 100755
--- a/scripts/seo/factcheck.py
+++ b/scripts/seo/factcheck.py
@@ -943,6 +943,18 @@ def self_test():
overlap = set(R.TIER_A) & set(R.TIER_C)
if overlap:
fails.append("keys in both Tier A and Tier C: %s" % sorted(overlap))
+ # A regex escape decoded by a scripted edit lands as a control character: the
+ # man-page row once held "\x08man ?pages?\x08" (backspaces, not word
+ # boundaries) and matched nothing. Every alias and pattern must be printable.
+ for row in R.THING_MATRIX:
+ for a in row.get("aliases", []):
+ re.compile(a)
+ if any(ord(c) < 0x20 for c in a):
+ fails.append("THING %r alias %r holds a control character" % (row["thing"], a))
+ for r in R.RULES:
+ for k in ("pattern", "context", "requires"):
+ if r.get(k) and any(ord(c) < 0x20 and c not in "\t\n" for c in r[k]):
+ fails.append("%s %s holds a control character" % (r["id"], k))
cases = [
("11.5x", "the bool query is 11.5× faster", "FC-NUM-TIERC"),