fix: prevent room-map.json overwrite + is_unrouteable handler
ROOT CAUSE: install.sh --update-only blindly deployed room-map.json from the repo (containing 'GENERAL' as catch_all) to the production /home/bernd/.hermes/data/ directory, overwriting the machine-specific map. FIXES (3 changes): 1. REMOVED room-map.json from repo + added to .gitignore This file is machine-specific data, not source code. 2. REMOVED room-map.json deploy from install.sh (both paths): - Normal install block (section 3.5) - --update-only emergency deploy (section 3.5) Replaced with comment: 'MACHINE-SPECIFIC — created by RC-Skill onboarding' 3. FIX adapter.py: is_unrouteable guard on ContextVar routing Before: ContextVar set to target_room even when unrouteable Result: 'Ich antworte im Zielraum.' note appeared, but Hermes couldn't deliver to unsubscribed room — answer lost silently. After: Forward block checks not getattr(decision, 'is_unrouteable', False) If unrouteable → stays in origin room, answers there normally. PRODUCTION: Correct room-map.json deployed with 4 project rooms + DM catch_all on .101. Excluded rooms: multi-agent DM, testbot DM.
This commit is contained in:
+6
-26
@@ -363,19 +363,9 @@ perform_update() {
|
||||
copied_count=$(find "$script_dir/plugin" -type f ! -path '*/__pycache__/*' ! -name '*.pyc' | wc -l)
|
||||
msg copied "$copied_count"
|
||||
|
||||
# Deploy room-map.json if it exists
|
||||
local DATA_DST="$hermes_dir/data"
|
||||
if [ -f "$script_dir/room-map.json" ]; then
|
||||
mkdir -p "$DATA_DST"
|
||||
local ROOM_MAP_DST="$DATA_DST/room-map.json"
|
||||
if [ -f "$ROOM_MAP_DST" ]; then
|
||||
# Create backup of existing room-map.json
|
||||
cp "$ROOM_MAP_DST" "$ROOM_MAP_DST.backup.$(date +%s)"
|
||||
msg room_map_backup "$ROOM_MAP_DST.backup.$(date +%s)"
|
||||
fi
|
||||
cp "$script_dir/room-map.json" "$ROOM_MAP_DST"
|
||||
msg room_map_deployed "$ROOM_MAP_DST"
|
||||
fi
|
||||
# NOTE: room-map.json is MACHINE-SPECIFIC — never deployed
|
||||
# by the installer. It is created by the RC-Skill onboarding
|
||||
# flow after gateway start. See RC-Skill: "Room Topic Discipline"
|
||||
fi
|
||||
|
||||
# Execute backend checks directly (Ollama check from lines 429-446)
|
||||
@@ -485,19 +475,9 @@ perform_update_only() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
# 3.5. Deploy room-map.json if it exists
|
||||
local DATA_DST="$hermes_dir/data"
|
||||
if [ -f "$script_dir/room-map.json" ]; then
|
||||
mkdir -p "$DATA_DST"
|
||||
local ROOM_MAP_DST="$DATA_DST/room-map.json"
|
||||
if [ -f "$ROOM_MAP_DST" ]; then
|
||||
# Create backup of existing room-map.json
|
||||
cp "$ROOM_MAP_DST" "$ROOM_MAP_DST.backup.$(date +%s)"
|
||||
msg room_map_backup "$ROOM_MAP_DST.backup.$(date +%s)"
|
||||
fi
|
||||
cp "$script_dir/room-map.json" "$ROOM_MAP_DST"
|
||||
msg room_map_deployed "$ROOM_MAP_DST"
|
||||
fi
|
||||
# NOTE: room-map.json is MACHINE-SPECIFIC — never deployed
|
||||
# by --update-only. It is created by the RC-Skill onboarding
|
||||
# flow after gateway start. See RC-Skill: "Room Topic Discipline"
|
||||
|
||||
# 4. Clear stale __pycache__
|
||||
find "$PLUGIN_DST" -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
|
||||
|
||||
Reference in New Issue
Block a user