fix: bundled dust cleanup — lib/matrix_listener.sh (#264)

- Remove dead ROOM_ENCODED and EVENT_ID variables from matrix_listener.sh
  (were suppressed with SC2034 instead of removed)
- Remove dead REPO variable from dev-poll.sh and review-poll.sh
- Update header comment in matrix_listener.sh to list all 5 reply-routing
  cases (supervisor, gardener, dev, review, vault, action)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
openhands 2026-03-20 21:40:31 +00:00
parent e4d5058172
commit f78fbc1da6
3 changed files with 4 additions and 13 deletions

View file

@ -201,9 +201,6 @@ try_direct_merge() {
return 1
}
# shellcheck disable=SC2034
REPO="${CODEBERG_REPO}"
API="${CODEBERG_API}"
LOCKFILE="/tmp/dev-agent-${PROJECT_NAME:-harb}.lock"
LOGFILE="${FACTORY_ROOT}/dev/dev-agent-${PROJECT_NAME:-harb}.log"

View file

@ -7,6 +7,10 @@
# Dispatch:
# Thread reply to [supervisor] message → /tmp/supervisor-escalation-reply
# Thread reply to [gardener] message → /tmp/gardener-escalation-reply
# Thread reply to [dev] message → injected into dev tmux session (or /tmp/dev-escalation-reply)
# Thread reply to [review] message → injected into review tmux session
# Thread reply to [vault] message → APPROVE/REJECT dispatched via vault-fire/vault-reject
# Thread reply to [action] message → injected into action tmux session
#
# Run as systemd service (see matrix_listener.service) or manually:
# ./matrix_listener.sh
@ -33,10 +37,6 @@ if [ -z "${MATRIX_TOKEN:-}" ] || [ -z "${MATRIX_ROOM_ID:-}" ]; then
exit 1
fi
# URL-encode room ID
# shellcheck disable=SC2034
ROOM_ENCODED="${MATRIX_ROOM_ID//!/%21}"
# Build sync filter — only our room, only messages
FILTER=$(jq -nc --arg room "$MATRIX_ROOM_ID" '{
room: {
@ -109,9 +109,6 @@ while true; do
while IFS= read -r event; do
SENDER=$(printf '%s' "$event" | jq -r '.sender')
BODY=$(printf '%s' "$event" | jq -r '.content.body // ""')
# shellcheck disable=SC2034
EVENT_ID=$(printf '%s' "$event" | jq -r '.event_id')
# Check if this is a thread reply
THREAD_ROOT=$(printf '%s' "$event" | jq -r '.content."m.relates_to" | select(.rel_type == "m.thread") | .event_id // empty' 2>/dev/null)

View file

@ -12,9 +12,6 @@ export PROJECT_TOML="${1:-}"
source "$(dirname "$0")/../lib/env.sh"
source "$(dirname "$0")/../lib/ci-helpers.sh"
# shellcheck disable=SC2034
REPO="${CODEBERG_REPO}"
# shellcheck disable=SC2034
REPO_ROOT="${PROJECT_REPO_ROOT}"
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"