Align conftest mock herdr and unit test assertions with Claude's simplified session-based isolation and native herdr command updates

This commit is contained in:
2026-07-20 07:42:05 +09:00
parent cccc30a8ac
commit 6df4b03661
13 changed files with 312 additions and 115 deletions
@@ -231,7 +231,11 @@ HERDR_EPOCH=$(date +%s)
NOW_ISO=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
# 시작 명령 (CMD_FULL 은 spawn 전에 isolation 디스패치를 반영해 확정됨 — T4)
START_CMD="herdr agent start \"$SESSION_NAME\" --workspace \"${HERDR_SERVER_NAME:-default}\" --cwd \"$WORKSPACE\" -- $CMD_FULL"
# NOTE: this must match what `spawn()` actually ran above — env-var-driven
# isolation (HERDR_SERVER_NAME picked up by the lib.sh shim), not a
# `--workspace <label>` flag (real `herdr agent start --workspace` wants an
# actual workspace id like "w2", which HERDR_SERVER_NAME is not).
START_CMD="HERDR_SERVER_NAME=${HERDR_SERVER_NAME:-default} herdr new-session -d -s \"$SESSION_NAME\" -x 140 -y 40 -c \"$WORKSPACE\" \"$CMD_FULL\""
# If --onboard is specified, automatically build the onboarding prompt
if [ "$ONBOARD" = "1" ] && [ -z "$SUBMIT_JOB_PROMPT" ]; then
@@ -316,8 +320,13 @@ entry = {
'cwd': os.environ['PANE_CWD'],
},
'start_command': os.environ['START_CMD'],
'attach_command': f'herdr session attach {name}',
'kill_command': f'herdr session stop {name} && herdr session delete {name}',
# NOTE: `herdr session attach/stop/delete` operate on whole herdr
# *sessions* (server instances, e.g. "default") — NOT on an individual
# agent by its MAM name. Use the lib.sh tmux-compat shim commands
# instead (`source .agents/skills/lib.sh` first), scoped via the same
# env-var-driven isolation as start_command above.
'attach_command': f'HERDR_SERVER_NAME={server_name} herdr agent attach {name}',
'kill_command': f'HERDR_SERVER_NAME={server_name} herdr kill-session -t {name}',
}
# T5: isolation 블록 영속화 (all-L2) — resume/resolve/stop 이 재적용의 단일 소스로 사용