ReMe/reme/steps/index
北沐城歌 037cd06e8b
fix(file_store): keep tag rebuild failures from aborting the whole reindex (#780)
The tag index is an optional derived index. Incremental updates already
handle a failure that way: _upsert_tag_nodes and _delete_tag_paths swallow
it, log it, and mark the index unhealthy, deliberately "without allowing
optional-index failures to block other indexes".

The explicit rebuild path did the opposite: it turned the same False into a
RuntimeError, which failed every reindex(scope="all") call and discarded the
keyword and embedding rebuilds that had already completed.

The rebuild is now wrapped rather than inspected only through its return
value. require_tag_index() runs before _rebuild_tag_index reaches its own
try, so an unavailable tag-index dependency raises from there and a bare
return check would let it escape; the wrapper keeps that case inside the
optional index as well.

On failure the store returns a "failed" marker instead, and the step
summary surfaces it, so a degraded tag index stays visible without hiding
the indexes that succeeded.

That marker has to be rendered for flat single-index reports too. A
scope="tag" rebuild returns {"indexed": 0, "scope": "tag", "failed": true}
with no nested entries, so a summary built only from nested dictionaries
drops it and answers "Reindexed scope=tag: 0 indexed" -- indistinguishable
from a successful empty rebuild. MCP callers read only the answer and the
CLI hides metadata, so they had no way to tell a failed repair from an
empty one.

The embedding rebuild keeps raising: it is not an optional index, and an
incomplete vector index must not be reported as success.

Refs agentscope-ai/QwenPaw#8863
Refs agentscope-ai/QwenPaw#8580
2026-11-26 11:13:12 +08:00
..
__init__.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00
_change_batch.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00
_dedup.py refactor: simplify core, Studio, and unit test scaffolding (#658) 2026-10-22 19:35:21 +08:00
_ranking.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00
_single_search.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00
_source_format.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00
_threaded_watch.py fix(index): add opt-in isolated file watchers (#635) 2026-10-19 17:39:33 +08:00
_tool_context.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00
_watch_rules.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00
bm25_search.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00
cleanup_catalog.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00
clear_paths.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00
clear_store.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00
draft.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00
graph_snapshot.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00
init_changes.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00
list_tag_files.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00
list_tags.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00
log_changes.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00
node_search.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00
optimize_index.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00
reindex.py fix(file_store): keep tag rebuild failures from aborting the whole reindex (#780) 2026-11-26 11:13:12 +08:00
search.py feat(studio): unify the workbench and proactive runtime (#764) 2026-11-23 17:19:21 +08:00
traverse.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00
update_changes.py feat!: split proactive runtimes and add Studio backend management (#776) 2026-11-25 21:33:16 +08:00
vector_search.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00
wait_for_paths.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00
watch_changes.py refactor(core): reorganize the ReMe runtime and shared helpers (#769) 2026-11-20 22:06:46 +08:00