fix: address round 2 review findings from issue #81
- Move atomic mv inside gardener loop so reply is only claimed when a matching needs_human session exists (fixes reply-loss regression) - Delay rm of claimed file until after successful injection in both supervisor and gardener (OOM/SIGKILL leaves file recoverable) - Fix matrix_listener ack message: 'next poll' instead of 'next supervisor poll' Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
bfe0c09b5c
commit
63e60de9d6
3 changed files with 30 additions and 31 deletions
|
|
@ -540,7 +540,6 @@ check_project() {
|
|||
_nh_claimed="/tmp/dev-escalation-reply.supervisor.$$"
|
||||
if [ -s "$HUMAN_REPLY_FILE" ] && mv "$HUMAN_REPLY_FILE" "$_nh_claimed" 2>/dev/null; then
|
||||
_nh_reply=$(cat "$_nh_claimed")
|
||||
rm -f "$_nh_claimed"
|
||||
_nh_inject_msg="Human reply received for issue #${_nh_issue}:
|
||||
|
||||
${_nh_reply}
|
||||
|
|
@ -558,7 +557,7 @@ Instructions:
|
|||
sleep 0.5
|
||||
tmux send-keys -t "$_nh_session" "" Enter || true
|
||||
tmux delete-buffer -b "human-inject-${_nh_issue}" 2>/dev/null || true
|
||||
rm -f "$_nh_tmpfile"
|
||||
rm -f "$_nh_tmpfile" "$_nh_claimed"
|
||||
|
||||
rm -f "/tmp/dev-renotify-${proj_name}-${_nh_issue}"
|
||||
flog "${proj_name}: #${_nh_issue} human reply injected into session ${_nh_session}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue