fix: expose local index rebuild command

This commit is contained in:
HumbleTurtle
2026-08-27 00:41:28 -03:00
parent 35acd72e4e
commit 7eace14042
4 changed files with 55 additions and 1 deletions
+16
View File
@@ -36,6 +36,22 @@ def expect_unknown(mod, argv, expected_fragment):
raise AssertionError(f"expected RuntimeError for {argv}")
def test_reindex_cli_rebuilds_with_bounded_page_size():
mod = load_module()
calls = []
mod.reindex_project = lambda args: calls.append(dict(args)) or {
"indexed": 7,
"graph_complete": True,
}
output = io.StringIO()
with contextlib.redirect_stdout(output):
mod.cli_main(["napseer_mcp_server.py", "reindex", "--limit", "50"])
assert calls == [{"limit": 50}]
assert '"indexed": 7' in output.getvalue()
def test_auth_login_rejects_history_expansion_tail_before_browser():
mod = load_module()
mod.operator_account_login = lambda _args: (_ for _ in ()).throw(