Skip to content

관리 자산을 읽기 전용으로 설치하고 삭제 시 지문 대조를 걷어낸다 - #30

Merged
m-a-king merged 1 commit into
mainfrom
feat/readonly-assets
Jul 30, 2026
Merged

관리 자산을 읽기 전용으로 설치하고 삭제 시 지문 대조를 걷어낸다#30
m-a-king merged 1 commit into
mainfrom
feat/readonly-assets

Conversation

@m-a-king

Copy link
Copy Markdown
Contributor

Situation

  • 관리 경로(~/.claude/hooks · commands 등)의 파일은 SSOT 소유이고 수정은 infra 에서 해야 한다. 이 원칙 자체는 옳다.
  • 그런데 강제 방식이 "조용한 되돌림" 이었다. 로컬에서 고쳐도 다음 세션의 설치가 덮어쓸 뿐이라, 고친 사람은 자기 수정이 언제 왜 사라졌는지 알 수 없다. 실제로 확인해 봤다.
고치기 전:      855e48a9ae7d
내가 고친 후:   95e53b067244
설치기 실행 후: 855e48a9ae7d   ← 말없이 되돌아감

Task

  • 원칙(SSOT 소유)은 그대로 두되, 그것이 고치려는 시점에 드러나게 한다.

Action

읽기 전용으로 설치한다. md 는 444, 실행물(훅·스크립트)은 555.

기존 (조용한 되돌림) 읽기 전용
언제 알게 되나 고치고 나중에 (다음 세션) 고치려는 그 순간
알리는 주체 없음 (아무도 안 알려줌) 편집기·셸이 거부
소유 표현 문서로 설명 권한이 스스로 말함

의도적으로 고치는 길은 열려 있다(chmod +w). 다만 그 한 단계가 "이건 관리 파일이다" 라는 자각이 된다. 막는 것은 실수이지 의지가 아니다.

함께 #29 의 삭제 시 지문 대조를 제거한다. 설치는 로컬 수정을 덮어쓰면서 삭제만 그것을 존중하는 것은 정책 모순이다. 같은 원칙이면 양쪽이 같게 굴어야 하고, 읽기 전용이 "로컬에서 고쳐진 관리 파일" 이라는 상황 자체를 없앤다. 지문이 방어하려던 나머지 시나리오(매니페스트를 손으로 편집해 남의 파일 경로를 넣는 경우)는 정상 경로로 발생하지 않는다.

Result

  • 6개 시나리오 검증 통과.
시나리오 기대 결과
설치 에러 없이 444/555 PASS
사용자 수정 시도 차단 PASS (permission denied)
정본 갱신 읽기 전용이어도 덮어씀 PASS
은퇴 삭제 읽기 전용이어도 삭제 PASS
옛 매니페스트(지문 달린 형식) 경로만 취해 처리 PASS
오프라인 삭제 없음 PASS
  • 검증 중 실수 하나를 잡았다. 지문 제거 치환이 한 곳에 안 먹어 file_fingerprint: command not found 가 매 자산마다 났는데, shellcheck 은 통과했고 실행에서만 드러났다. 정적 검사만 믿지 않고 실제로 돌려본 덕이다.
  • 알아둘 마찰: 로컬에서 급히 디버깅하려면 chmod +w 가 한 번 필요하고, 그렇게 고쳐도 다음 설치에서 정본으로 돌아간다. 의도된 동작이다.

관리 경로의 파일은 SSOT 소유이고 수정은 infra 에서 한다. 그런데 지금까지는
로컬에서 고쳐도 다음 설치가 조용히 되돌릴 뿐이라, 고친 사람은 자기 수정이
언제 왜 사라졌는지 알 수 없었다.

읽기 전용으로 깔면 고치려는 그 순간 막힌다. 사후 통보가 아니라 사전 차단이고,
"이건 관리 파일" 이라는 사실을 권한이 스스로 말한다.

- md 는 444, 실행물(훅·스크립트)은 555
- 정본 갱신은 그대로 동작한다 (install 은 읽기 전용 대상도 교체)
- 은퇴 삭제도 그대로 (rm 은 디렉토리 쓰기 권한만 있으면 된다)

함께 #29 의 삭제 시 지문 대조를 제거한다. 설치는 로컬 수정을 덮어쓰면서 삭제만
그것을 존중하는 것은 앞뒤가 안 맞고, 읽기 전용이 "로컬에서 고쳐진 관리 파일"
이라는 상황 자체를 없앤다. 옛 매니페스트가 지문을 달고 있어도 경로만 취해
처리하므로 전환은 매끄럽다.
@m-a-king m-a-king added the infra 운영 환경 (IaC·클라우드 리소스·secret·배포 workflow) label Jul 30, 2026
@m-a-king m-a-king self-assigned this Jul 30, 2026
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@m-a-king, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 4 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3be765ee-ddfc-4eb1-948b-ccd13cda1337

📥 Commits

Reviewing files that changed from the base of the PR and between f8d4ca1 and cc62bf3.

📒 Files selected for processing (2)
  • README.md
  • install.sh

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@m-a-king
m-a-king merged commit 053a65b into main Jul 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infra 운영 환경 (IaC·클라우드 리소스·secret·배포 workflow)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant