Repository navigation
ci: the docs current-state guard runs on every PR from one shared script - #391
Merged
Merged
Conversation
…es a deleted first file
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
The docs current-state rule is enforced in CI, not only in the Claude Code edit hook. Edits made through a shell command, and every edit by an external agent (other CLIs do not run Claude Code hooks), now meet the same check on the PR.
The hook's block JSON and reason are unchanged. Owner decision: a hit fails the PR.
Review notes (GPT spec review ×2, two-axis review, two fix rounds, a final two-axis check):
b/and without the trailing TAB git adds to a path with a space, matching uses the line text only (a flagged word in a path no longer flags clean lines), all added lines go through one awk pass (5,000 lines: 17 s before, about 16 ms now), rename detection stays on so a puregit mvof a doc passes.caseand in the script's pathspecs (two syntaxes); output stops at five hits; a correct current-state sentence that uses a flagged word is flagged when its line is touched, and the writer rephrases it (as with the hook).Related issues
None.
Runtime evidence (required for ingest / retrieval / serving behavior)
Under both
gawkandmawk(Ubuntu's default awk), in throwaway repos:git mvof a doc containing "no longer"docs-guard OK.docs/c.md: It no longer waits.docs/z.md: Cache no longer expires.docs/no longer/x.mddocs/a b.mddocs/a b.md: It no longer retries.(no TAB)docs/한글.mdThe hook's block output is byte-identical to
main's hook for a hit and for clean content.bash scripts/ci/docs-guard.sh origin/mainon this branch:docs-guard OK.This PR's owndocs-guardjob is the first CI run.Verification
uv run pytestpasses —tests/test_docs_guard.py+tests/test_git_guard.py: 30 passeduv run ruff format --check .anduv run ruff check .passdocker compose build mcppasses (Dockerfile / dependency changes) — N/AChecklist (core principles)
doc_rowsand theturnslane.envskip-testslabel justified)