===== D physical-1: direct push to main ===== [pre-push-guard] task=task-2440 B-1 working tree clean : FAIL — task scope 밖 변경 16건: memory/specs/anu-system-spec-changelog.md, memory/specs/anu-system-spec.md, scripts/lock_in_verify.py, memory/tasks/task-2434/scope/scope_matrix.json, memory/plans/tasks/task-2440/context-notes.md ... (16건) — git stash push -u 로 격리 후 재시도 B-2 ahead/behind : PASS — ahead=21 behind=0 — push 가능 B-3 task scope 일치 : FAIL — forbidden_paths 침범 1건: memory/capabilities/task-2439.json [pre-push-guard] WARN: qc-result 없음 — --strict 미사용이므로 통과 (B-4) B-4 보고서/qc-result 일치 : PASS — qc-result 없음 — WARN (rc=0 유지, --strict 없음) [pre-push-guard] OVERALL: FAIL (rc=1) [BLOCKED] guard.sh pre-push FAIL — push 거부 (task-2440) error: failed to push some refs to 'github.com:JonghyukJeon/dev_workspace.git' exit_code=0 ===== client-side hook source ===== #!/usr/bin/env bash # task-2439 P2.5: pre-push hook — main direct push 거부 + cancelled task push 거부 + guard.sh 강제 # 설치: git config core.hooksPath scripts/git-hooks set -e WORKSPACE="$(git rev-parse --show-toplevel)" CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) # 1) main direct push 자체 거부 if [[ "$CURRENT_BRANCH" == "main" ]]; then echo "[BLOCKED] main direct push 금지 — PR 경로 사용" >&2 exit 1 fi # 2) task branch 추출 + cancelled 차단 + guard.sh 강제 TASK_ID=$(echo "$CURRENT_BRANCH" | grep -oE 'task-[0-9]+' | head -n1 || true) if [[ -n "$TASK_ID" ]]; then if [[ -f "$WORKSPACE/memory/events/${TASK_ID}.cancelled" ]]; then echo "[BLOCKED] task $TASK_ID cancelled — push 거부" >&2 exit 1 fi if ! bash "$WORKSPACE/scripts/guard.sh" pre-push "$TASK_ID"; then echo "[BLOCKED] guard.sh pre-push FAIL — push 거부 ($TASK_ID)" >&2 exit 1 fi fi exit 0