ReMe/reme/steps/index
Zhengxu (Joshua) Jin 0b5bb64f26
fix(search): accept CLI queries that look like numbers (#612)
* fix(search): accept CLI queries that look like numbers

The CLI parses key=value arguments into typed values, so query=404 reached the search steps as an int and failed on .strip(), and query=NaN or query=Infinity became non-finite floats that the HTTP client cannot encode as JSON and the MCP client sends as null.

Read the query as text in the four search steps, as ChatStep already does, and keep values that float() reads as NaN or infinity as strings.

* fix(search): treat only a missing query as empty

str(query or "") turned query=0 and query=0.0 into an empty string, so those searches still failed with "query cannot be empty". Check for None before converting instead.

The BEAM and LME plugins replace the default search job with their own SearchV2Step, which still called .strip() on the raw value, so query=404 raised AttributeError when either plugin was enabled. Read the query the same way there.

The numeric-query test is now parametrized over the six steps and passes 404, 0 and 0.0 through parse_kwargs first.
2026-10-16 10:36:05 +08:00
..
__init__.py feat(tags): add configurable tag indexing and filtered hybrid search (#530) 2026-09-10 18:01:09 +08:00
_change_batch.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
_dedup.py fix(search): isolate range dedup state (#465) 2026-08-20 16:15:30 +08:00
_source_format.py refactor: derive dialog paths from session_dir (#421) 2026-08-06 17:07:14 +08:00
_watch_rules.py feat(auto_resource): interpret image resources into daily notes (#500) 2026-09-07 12:00:38 +08:00
bm25_search.py fix(search): accept CLI queries that look like numbers (#612) 2026-10-16 10:36:05 +08:00
clear_paths.py feat(benchmark): add LongMemEval golden answer validation (#335) 2026-07-13 21:26:27 +08:00
clear_store.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
draft.py feat(lme): add cli execution and agentic search tooling (#334) 2026-07-08 17:43:09 +09:00
graph_snapshot.py feat: add frontend-ready wikilink graph APIs (#414) 2026-08-05 16:45:50 +08:00
init_changes.py docs: rename vault_dir to workspace_dir in documentation and examples (#286) 2026-06-22 16:58:57 +08:00
list_tags.py feat(tags): add configurable tag indexing and filtered hybrid search (#530) 2026-09-10 18:01:09 +08:00
log_changes.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
node_search.py fix(search): accept CLI queries that look like numbers (#612) 2026-10-16 10:36:05 +08:00
optimize_index.py feat(faiss_file_store): upgrade FAISS to HNSW index with async reindex (#390) 2026-07-27 19:54:38 +08:00
reindex.py fix(reindex): return a readable summary so Studio stops showing a placeholder (#565) 2026-10-14 11:25:48 +08:00
search.py fix(search): accept CLI queries that look like numbers (#612) 2026-10-16 10:36:05 +08:00
traverse.py feat: add frontend-ready wikilink graph APIs (#414) 2026-08-05 16:45:50 +08:00
update_changes.py feat(tags): add configurable tag indexing and filtered hybrid search (#530) 2026-09-10 18:01:09 +08:00
vector_search.py fix(search): accept CLI queries that look like numbers (#612) 2026-10-16 10:36:05 +08:00
wait_for_paths.py feat(benchmark): add LongMemEval golden answer validation (#335) 2026-07-13 21:26:27 +08:00
watch_changes.py feat(benchmark): add lme benchmark steps (#326) 2026-07-07 18:53:39 +09:00