You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
hook: doctor gate blocks commits on bloat in files that aren't part of the commit #357
Follow-up from the review of #356 (#320). Operator-approved as the step after the #318 series.
Since #356, the pre-commit hook tidies only staged vendor files and never sweeps unrelated work. In repos without a verify:adf script, the hook's evidence gate (charter doctor --adf-only --ci) still scans the whole working tree for vendor-file bloat. So a commit can be blocked by state that isn't part of it. In review, 5 of 13 scenarios newly blocked vs. the old hook, which only passed them by rewriting or sweeping files the user hadn't staged:
an unstaged bloated GEMINI.md while committing something else
a partially staged vendor file, which the hook skips by design (CP-3)
a planned module that has unstaged or untracked work, which the hook skips by design (CP-4)
#356 keeps these blocks and explains them (option A). This issue does the rest:
B: in hook context, scope doctor's bloat checks to the staged vendor files.
C: in hook context, bloat in files the tidy block deliberately skipped does not block the commit. CI's doctor --ci still enforces it.
That makes CP-3/CP-4 truly non-blocking in the default hook. Option D (doctor reads the staged blob) is the exact version, if B+C prove too coarse. Review analysis: #356 review comment.
Activity
fix(hook): accurate gate wording and fallback test (refs #357)
test: set git identity in doctor --staged fixtures (refs #357)
fix(hook): per-run scope token, clear fallback notice, accurate gate …
fix(hook): scope the doctor gate in verify:adf repos (#365)