fix: plan_completion_guard 정책 정합성 회복 및 위험 권한 제거 (#44)#45
Merged
Conversation
- REQUIRED_PLAN_FILES에서 context.md 제거하여 work-planning-rules.md (plan.md + checklist.md 2종) 정책과 일치 - 2종 문서 미완료 plan에서 거짓통과되던 결함을 회귀 테스트로 고정 - .claude/settings.json의 위험한 와일드카드 allow 제거, block_dangerous는 보조 방어선으로 유지 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
plan_completion_guard.py의REQUIRED_PLAN_FILES에서context.md제거.docs/work-planning-rules.md의 2종(plan.md + checklist.md) 정책과 일치시킴exit=0으로 거짓통과하던 결함을 회귀 테스트 3건으로 고정.claude/settings.json의 위험한 와일드카드 삭제allow항목 제거(allow: []).block_dangerous는PreToolUse보조 방어선으로 유지Why
다른 에이전트의 평가에서 두 가지 결함이 확인됨:
allow로 넓게 허용한 뒤 훅으로 다시 막는 구조는 훅이 깨지면 방어선이 사라짐. 권한은 좁게, 훅은 보조로 두는 게 옳은 설계.Closes #44
Test plan
plan.md+checklist.md(미완료)만 두고 가드 호출 → 패치 전exit=0, 패치 후exit=2차단 확인test_plan_completion_guard.py10/10 통과 (기존 7 + 신규 3)test_work_plan_enforcer.py34/34 통과 (회귀 없음)block_dangerous보조 방어선 동작 확인(PreToolUse Bash 매처 유지)비고
test_block_dangerous.py(pytest) 12건 실패는 본 PR 이전부터 존재한 결함(soft-warn 케이스가 hard-block으로 동작).git stash전후 동일하게 재현되어 본 PR 범위 밖으로 분리, 별도 후속 작업으로 처리 예정.