fix: Action session name missing PROJECT_NAME prefix (#432)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
89a9a822de
commit
4a9f610c73
3 changed files with 7 additions and 6 deletions
|
|
@ -6,7 +6,7 @@
|
|||
# Lifecycle:
|
||||
# 1. Fetch issue body (action formula) + existing comments
|
||||
# 2. Create isolated git worktree: /tmp/action-{issue}-{timestamp}
|
||||
# 3. Create tmux session: action-{issue_num} with interactive claude in worktree
|
||||
# 3. Create tmux session: action-{project}-{issue_num} with interactive claude in worktree
|
||||
# 4. Inject initial prompt: formula + comments + phase protocol instructions
|
||||
# 5. Monitor phase file via monitor_phase_loop (shared with dev-agent)
|
||||
# Path A (git output): Claude pushes → handler creates PR → CI poll → review
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
# Key principle: The runtime creates and destroys. The formula preserves.
|
||||
# The formula must push results before signaling done — the worktree is nuked after.
|
||||
#
|
||||
# Session: action-{issue_num} (tmux)
|
||||
# Session: action-{project}-{issue_num} (tmux)
|
||||
# Log: action/action-poll-{project}.log
|
||||
|
||||
set -euo pipefail
|
||||
|
|
@ -32,7 +32,7 @@ source "$(dirname "$0")/../lib/agent-session.sh"
|
|||
source "$(dirname "$0")/../lib/formula-session.sh"
|
||||
# shellcheck source=../dev/phase-handler.sh
|
||||
source "$(dirname "$0")/../dev/phase-handler.sh"
|
||||
SESSION_NAME="action-${ISSUE}"
|
||||
SESSION_NAME="action-${PROJECT_NAME}-${ISSUE}"
|
||||
LOCKFILE="/tmp/action-agent-${ISSUE}.lock"
|
||||
LOGFILE="${FACTORY_ROOT}/action/action-poll-${PROJECT_NAME:-default}.log"
|
||||
THREAD_FILE="/tmp/action-thread-${ISSUE}"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# An issue is ready for action if:
|
||||
# - It is open and labeled 'action'
|
||||
# - No tmux session named action-{issue_num} is already active
|
||||
# - No tmux session named action-{project}-{issue_num} is already active
|
||||
#
|
||||
# Usage:
|
||||
# cron every 10min
|
||||
|
|
@ -52,7 +52,7 @@ log "found ${COUNT} open action issue(s)"
|
|||
# poll picks up remaining issues.
|
||||
for i in $(seq 0 $((COUNT - 1))); do
|
||||
ISSUE_NUM=$(printf '%s' "$ACTION_ISSUES" | jq -r ".[$i].number")
|
||||
SESSION="action-${ISSUE_NUM}"
|
||||
SESSION="action-${PROJECT_NAME}-${ISSUE_NUM}"
|
||||
|
||||
if tmux has-session -t "$SESSION" 2>/dev/null; then
|
||||
log "issue #${ISSUE_NUM}: session ${SESSION} already active, skipping"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue