From f42d9c16b9dfd091f5dd8503fa3994e5021fd46f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A1=B0=EC=9E=AC=EC=A4=91?= <126754298+m-a-king@users.noreply.github.com> Date: Fri, 10 Jul 2026 03:55:50 +0900 Subject: [PATCH 1/3] =?UTF-8?q?chore:=20commit-msg=20=ED=9B=85=EC=9D=84=20?= =?UTF-8?q?PIKI-Infra=20=EC=A0=95=EB=B3=B8=EC=97=90=EC=84=9C=20=EC=9B=90?= =?UTF-8?q?=EA=B2=A9=20=EB=B0=B0=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 커밋 타입 형식을 강제하는 commit-msg 훅이 이 repo 엔 없었다. 훅 정본은 PIKI-Infra(hooks/commit-msg)가 SSOT 로 소유하고, 이 repo 는 복사본을 체크인하지 않는다. - SessionStart 가 gh api 로 정본을 받아 git-common-dir/hooks 에 설치 (worktree 에서도 동작) - fetch 실패 시 기존 설치본 유지 (오프라인·권한 없음 안전, exit 0) - 검증: 배선 명령 실행 후 설치본이 정본과 바이트 동일, 형식 위반 커밋 거부(exit 1)·규약 커밋 통과 실측 --- .claude/settings.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .claude/settings.json diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 0000000..98ca342 --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,14 @@ +{ + "hooks": { + "SessionStart": [ + { + "hooks": [ + { + "type": "command", + "command": "bash -c 'tmp=$(mktemp); if gh api -H \"Accept: application/vnd.github.raw\" repos/TeamPiKi/PIKI-Infra/contents/hooks/commit-msg >\"$tmp\" 2>/dev/null && [ -s \"$tmp\" ]; then install -m 755 \"$tmp\" \"$(git rev-parse --git-common-dir)/hooks/commit-msg\"; fi; rm -f \"$tmp\"; exit 0'" + } + ] + } + ] + } +} From 60cf18f1771871b12428b87479a85c8f2fbf24d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A1=B0=EC=9E=AC=EC=A4=91?= <126754298+m-a-king@users.noreply.github.com> Date: Fri, 10 Jul 2026 04:05:57 +0900 Subject: [PATCH 2/3] =?UTF-8?q?chore:=20=EB=B0=B0=EC=84=A0=EC=9D=84=20?= =?UTF-8?q?=EC=96=87=EC=9D=80=20=EB=B6=80=ED=8A=B8=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=EB=9E=A9=20+=20PIKI-Infra=20install.sh=20=EB=A1=9C=20=EA=B5=90?= =?UTF-8?q?=EC=B2=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 직전 배선은 자산 경로·설치 로직이 SessionStart 명령에 문장째 박혀, 자산이 늘면 소비 repo 전부를 다시 고쳐야 했다 - 부트스트랩은 'PIKI-Infra install.sh 를 받아 실행' 한 줄로 축소. 이 repo 에 남는 상수는 repo 좌표 1개 - 검증 실측: 설치본 제거 후 부트스트랩 실행으로 원격 정본 설치(바이트 동일), 형식 위반 커밋 거부 회귀 확인 --- .claude/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.claude/settings.json b/.claude/settings.json index 98ca342..df1202c 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -5,7 +5,7 @@ "hooks": [ { "type": "command", - "command": "bash -c 'tmp=$(mktemp); if gh api -H \"Accept: application/vnd.github.raw\" repos/TeamPiKi/PIKI-Infra/contents/hooks/commit-msg >\"$tmp\" 2>/dev/null && [ -s \"$tmp\" ]; then install -m 755 \"$tmp\" \"$(git rev-parse --git-common-dir)/hooks/commit-msg\"; fi; rm -f \"$tmp\"; exit 0'" + "command": "bash -c 'gh api -H \"Accept: application/vnd.github.raw\" repos/TeamPiKi/PIKI-Infra/contents/install.sh 2>/dev/null | bash; exit 0'" } ] } From 0e05e4a409bea493a126d530998687930179dd14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A1=B0=EC=9E=AC=EC=A4=91?= <126754298+m-a-king@users.noreply.github.com> Date: Fri, 10 Jul 2026 04:30:08 +0900 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=EB=B6=80=ED=8A=B8=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=EB=9E=A9=EC=9D=84=20=ED=8C=8C=EC=9D=B4=ED=94=84=20=EC=8B=A4?= =?UTF-8?q?=ED=96=89=EC=97=90=EC=84=9C=20=EB=AC=B8=EB=B2=95=20=EA=B2=80?= =?UTF-8?q?=EC=A6=9D=20=ED=9B=84=20=EC=8B=A4=ED=96=89=EC=9C=BC=EB=A1=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - CodeRabbit 가용성 지적 수용분: install.sh 를 파이프로 바로 실행하면 문법 깨진 정본이 부분 실행될 수 있음. tmp 로 받아 bash -n 통과 시에만 실행 (실패 시 조용히 스킵, exit 0) - SHA pin·체크섬 제안은 기각 (배선의 존재 이유인 무전파 갱신 파괴 + 동일 신뢰 도메인) - 사유는 PR thread reply 에 --- .claude/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.claude/settings.json b/.claude/settings.json index df1202c..b5b8ba1 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -5,7 +5,7 @@ "hooks": [ { "type": "command", - "command": "bash -c 'gh api -H \"Accept: application/vnd.github.raw\" repos/TeamPiKi/PIKI-Infra/contents/install.sh 2>/dev/null | bash; exit 0'" + "command": "bash -c 'tmp=$(mktemp); if gh api -H \"Accept: application/vnd.github.raw\" repos/TeamPiKi/PIKI-Infra/contents/install.sh >\"$tmp\" 2>/dev/null && [ -s \"$tmp\" ] && bash -n \"$tmp\" 2>/dev/null; then bash \"$tmp\"; fi; rm -f \"$tmp\"; exit 0'" } ] }