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.

Integrate supported feedback fork commands and exercise rollback after a real commit

xerj-org39974a5e1211
diff --cc engine/crates/xerj-autoindex/src/feedback.rs
index 5362785e8,b1b6bfa54..9061124a4
--- a/engine/crates/xerj-autoindex/src/feedback.rs
+++ b/engine/crates/xerj-autoindex/src/feedback.rs
@@@ -2036,6 -2050,6 +2050,14 @@@ mod tests
xerj_origin(root);
let stub_dir = tempfile::tempdir().unwrap();
let log = stub_dir.path().join("gh.log");
++ let committed = stub_dir.path().join("report-committed");
++ write_executable(
++ &root.join(".git/hooks/post-commit"),
++ &format!(
++ "#!/bin/sh\ntouch {}\n",
++ shell_single(&committed.display().to_string())
++ ),
++ );
write_executable(
&stub_dir.path().join("gh"),
&format!(
@@@ -2044,7 -2058,7 +2066,12 @@@
\"auth status\") exit 0 ;;\n\
\"api user\") echo testlogin; exit 0 ;;\n\
\"api repos/xerj-org/xerj\") echo false; exit 0 ;;\n\
-- \"repo fork\") git remote add xerj-fork /nonexistent/fork-target; exit 0 ;;\n\
++ \"repo fork\")\n\
++ test \"$*\" = \"repo fork xerj-org/xerj --clone=false\" || exit 2\n\
++ exit 0 ;;\n\
++ \"repo sync\")\n\
++ git remote set-url --push xerj-fork /nonexistent/fork-target\n\
++ exit $? ;;\n\
*) exit 1 ;;\n\
esac\n",
shell_single(&log.display().to_string())
@@@ -2058,8 -2072,8 +2085,17 @@@
assert_eq!(code, 1);
let log_text = std::fs::read_to_string(&log).unwrap_or_default();
assert!(
-- log_text.contains("repo fork xerj-org/xerj"),
-- "a no-push account must fork:\n{log_text}"
++ log_text.contains("repo fork xerj-org/xerj --clone=false"),
++ "a no-push account must fork with the supported noninteractive arguments:\n{log_text}"
++ );
++ assert!(log_text.contains("repo sync testlogin/xerj --branch main"));
++ assert!(
++ committed.exists(),
++ "the report must reach commit and the failed push; an earlier fork failure is not a rollback test"
++ );
++ assert_eq!(
++ git_stdout(root, &["remote", "get-url", "xerj-fork"]).trim(),
++ "https://github.com/testlogin/xerj.git"
);
assert!(
git_stdout(root, &["branch", "--list", "field-report/*"])