Skip to content

v3.8.1 — 배포 후크화: git hook 자동 배포 + drift 백스톱

Choose a tag to compare

@etinpres etinpres released this 01 Jun 01:07
· 16 commits to master since this release

v3.8.1 — 배포 후크화: git hook 자동 배포 + drift 백스톱

배경 (근본 원인)

contradiction 분류 false-positive 를 93% 줄이는 프롬프트 보정 커밋(4a4fdac)이 repo 에는
2026-05-28 존재했으나, 배포 경로(~/.claude/scripts/mindvault)에는 06-01 까지 미반영이었다.
install.sh 가 모델 다운로드·launchctl·헬스체크·인덱싱까지 도는 무거운 설치라 코드 한 줄을
고쳐도 수동 재실행을 미루게 되고, 그 사이 라이브 hook 은 옛 코드로 계속 돈다. 실제로 이
3일 지연 때문에, 이미 수정 완료된 'haruko_novel 서사 타임라인' 항목이 fact_correction
오탐(conf=1.00)으로 review 큐에 올랐다. (구프롬프트 → fact_correction, 현 프롬프트 →
no_conflict, temp=0.0 결정론적 5/5 재현으로 배포 지연이 원인임을 확정.)

변경

  • install.sh — MV3_SYNC_ONLY 경량 경로: 파일 복사 + settings.json 등록만 수행하는
    sub-second sync (0.594s 실측). 모델 다운로드·pip·plist(launchctl)·헬스체크 대기·
    인덱싱·pre-warm 은 전부 skip. src→target 매핑(파일 rename 포함)은 기존 deploy 호출을
    그대로 재사용해 단일 진실원본 유지. 비arm64 인터랙티브 프롬프트도 우회.
  • .githooks/post-commit · post-merge: deploy 소스(src/·hooks/·skill/·scripts/·
    install.sh) 변경 시 자동 경량 sync. 문서/테스트-only 커밋은 skip. install.sh 가
    core.hooksPath=.githooks 를 self-wire 한다.
  • scripts/deploy_drift_check.py — SessionStart 백스톱: repo src/*.py ↔ 배포본
    sha256 비교, drift 시 한 줄 경고 + 해결 명령(MV3_SYNC_ONLY=1 ./install.sh)을
    additionalContext 로 주입. 훅 우회(--no-verify)·외부 동기화 누락까지 포착. 항상
    exit 0(세션 비차단), drift 없으면 무출력, repo 경로 없으면(엔드유저 설치) 조용히 skip.
  • tests/test_sync_only.py: sync 배포·슬로우 단계 skip·drift 검출/복구 6 케이스.

효과

repo 커밋이 ~/.claude 배포 경로에 즉시 반영 → "repo 는 고쳤는데 배포는 stale" 상황이
구조적으로 불가능해진다. 훅을 우회해도 다음 세션 시작에 drift 경고로 포착되는 이중 안전망.

검증

747 passed + 25 subtests (신규 6 포함, 회귀 0). post-commit·post-merge 라이브 발동,
drift 양성/복구 스모크, 라이브 sync 0.594s 실측.