fix: address review findings from issue #81
- Fix dev-agent.sh comment: gardener-poll.sh is the backup injector, not review-poll.sh - Add renotify marker cleanup to gardener injection path - Use atomic mv to claim reply file, preventing double-injection race between supervisor and gardener - Add break after supervisor injection for symmetry with gardener - Remove overly prescriptive PHASE:awaiting_ci hardcode from injection instructions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
48683e508c
commit
bfe0c09b5c
3 changed files with 14 additions and 12 deletions
|
|
@ -66,8 +66,10 @@ fi
|
|||
|
||||
# ── Inject human replies into needs_human dev sessions (backup to supervisor) ─
|
||||
HUMAN_REPLY_FILE="/tmp/dev-escalation-reply"
|
||||
if [ -s "$HUMAN_REPLY_FILE" ]; then
|
||||
_gr_reply=$(cat "$HUMAN_REPLY_FILE")
|
||||
_gr_claimed="/tmp/dev-escalation-reply.gardener.$$"
|
||||
if [ -s "$HUMAN_REPLY_FILE" ] && mv "$HUMAN_REPLY_FILE" "$_gr_claimed" 2>/dev/null; then
|
||||
_gr_reply=$(cat "$_gr_claimed")
|
||||
rm -f "$_gr_claimed"
|
||||
for _gr_phase_file in /tmp/dev-session-"${PROJECT_NAME}"-*.phase; do
|
||||
[ -f "$_gr_phase_file" ] || continue
|
||||
_gr_phase=$(head -1 "$_gr_phase_file" 2>/dev/null | tr -d '[:space:]' || true)
|
||||
|
|
@ -87,8 +89,7 @@ ${_gr_reply}
|
|||
Instructions:
|
||||
1. Read the human's guidance carefully.
|
||||
2. Continue your work based on their input.
|
||||
3. When done, push your changes and write the appropriate phase:
|
||||
echo \"PHASE:awaiting_ci\" > \"${_gr_phase_file}\""
|
||||
3. When done, push your changes and write the appropriate phase."
|
||||
|
||||
_gr_tmpfile=$(mktemp /tmp/human-inject-XXXXXX)
|
||||
printf '%s' "$_gr_inject_msg" > "$_gr_tmpfile"
|
||||
|
|
@ -99,7 +100,7 @@ Instructions:
|
|||
tmux delete-buffer -b "human-inject-${_gr_issue}" 2>/dev/null || true
|
||||
rm -f "$_gr_tmpfile"
|
||||
|
||||
rm -f "$HUMAN_REPLY_FILE"
|
||||
rm -f "/tmp/dev-renotify-${PROJECT_NAME}-${_gr_issue}"
|
||||
log "${PROJECT_NAME}: #${_gr_issue} human reply injected into session ${_gr_session} (gardener)"
|
||||
break # only one reply to deliver
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue