feat(hook): harden hard-gate — repo-root resolution + opt-in objective checks (v0.1.12) - #30
Merged
Merged
Conversation
…e checks (v0.1.12) Two fixes surfaced by dogfooding the pipeline end-to-end: - cwd fix: resolve .wigtn/gate-pass at git toplevel in both the hook and auto-commit Step 3.5, so committing from a subdirectory no longer false-blocks a legitimately-passed gate (hook was coupled to session cwd, not the commit repo). - anti-fabrication: hook runs an optional repo-root .wigtn/checks.sh before a pipeline commit; a non-zero exit blocks. This binds the gate to real test/typecheck exit codes a model cannot fabricate — upgrading the guarantee from "a review happened" to "objective checks actually passed". No file -> old frictionless behavior. Verified in an isolated harness: 5/5 scenarios (subdir+toplevel allow, checks-fail block, checks-pass allow, manual allow, missing-gate-pass block). Bump 0.1.11 -> 0.1.12. Co-Authored-By: Claude Opus 4.8 (1M context) <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
도그푸딩으로 발견한 하드 게이트 hook의 두 약점을 고친다. v0.1.12.
Changes
.wigtn/gate-pass를git rev-parse --show-toplevel기준으로 해석. 하위 디렉토리에서 커밋해도 정상 PASS를 오차단하지 않는다. (도그푸딩에서 hook이 세션 cwd에 결합돼 있어 서브디렉토리 커밋을 오차단하는 걸 발견.).wigtn/checks.sh(예:npm test && npm run typecheck)를 두면 hook이 커밋 직전 직접 실행, non-zero면 차단. 게이트 보증을 "리뷰가 일어났음" → **"객관 검증이 실제로 통과했음"**으로 올린다(모델이 test/typecheck exit code는 못 꾸밈). 파일 없으면 기존 무마찰.Verification
격리 하네스 5/5 시나리오: 서브디렉토리+toplevel 허용 · checks 실패 차단 · checks 통과 허용 · 수동 허용 · gate-pass 없음 차단.
정직한 한계
🤖 Generated with Claude Code