mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 05:45:37 +08:00
Two gaps found by review: (1) invalidate_index_cache was add/update only — it registered new index entries as stubs and refreshed existing ones, but never dropped registrations whose ids vanished from the reloaded index, so a peer-process uninstall left this process serving the stale stub via the eager get_tool fall-through; (2) remove_tool_by_id persisted the index removal locally but never broadcast, so peers had no reason to reload until an unrelated populate ran. Extract the in-memory removal bookkeeping into _remove_tool_in_memory, diff the previous index against the reloaded one in invalidate_index_cache and pop vanished ids (diff-based, so internal and dynamic tools that never enter the index are untouched), and send reload_tool_source_cache (noop_self) after persisting a removal. _register_lazy_entry now registers the old-id bucket even when old_id == tool_id, matching the eager __add_tool — super's removal unconditionally pops that bucket. Claude-Session: https://claude.ai/code/session_018L7ZmCv2ubKA3JNeSL8Pkr