fix(ci): the invisible-character gate never matched anything - #743
Open
hyperpolymath wants to merge 1 commit into
Open
fix(ci): the invisible-character gate never matched anything#743hyperpolymath wants to merge 1 commit into
hyperpolymath wants to merge 1 commit into
Conversation
Replace the character-mode PCRE escapes (\xc2\xa0 asks for the two characters U+00C2 U+00A0, never present in any file) with the canonical byte-safe two-tier scanner from rsr-template-repo (rsr#49): scripts/check-invisible-characters.sh matches UTF-8 byte sequences under LC_ALL=C, so typographic invisibles (NBSP, soft hyphen, zero-width/bidi, BOM) warn while C0/NUL corruption blocks, and scanner failure refuses a partial pass instead of going green. tests/invisible-characters-test.sh proves the detector against fixtures that MUST trip it — including a leading BOM — and the workflow runs that proof before every scan. Also fixes the seven NBSP-bearing docs the old gate never saw. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
Warning Review limit reachedNext included review available in 2 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (10)
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. Comment |
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.
Supersedes #734 (unmergeable: DIRTY, and its inline Python scanner violates the estate language policy).
What
Replaces the broken character-mode PCRE escapes in
dogfood-gate.yml's empty-lint job (\xc2\xa0ingrep -Pasks for the two characters U+00C2 U+00A0 — present in no file, so the gate matched nothing for months) with the canonical byte-safe scanner that rsr-template-repo#49 hardened through four owner review rounds:scripts/check-invisible-characters.sh— ported verbatim from rsr-template-repomain. Matches UTF-8 byte sequences underLC_ALL=C(robust to invalid-UTF-8 files), NUL-delimited enumeration, fail-closed on find/grep errors.tests/invisible-characters-test.sh— the regression controls: NBSP, soft hyphen, zero-width/bidi, word-joiner, leading BOM, NUL, backspace, invalid UTF-8, permitted TAB/LF/CR, newline-bearing filenames, injected grep/find failures.::warning, C0/NUL corruption::error+ exit 1, scanner failure exit 2 (no partial pass). The job runs the regression proof before every scan.What this does NOT carry from #734
python3heredoc scanner (Python is deny-listed estate-wide).governance.ymlreusable-workflow SHA bump — already stale again (standards HEAD has moved past it); re-pins are their own sweep..hypatia-exemptions.adocwording fix — an equivalent fix already landed onmain.Verification (local, on this branch)
tests/invisible-characters-test.sh→ pass (10/10 fixtures detected, incl. leading BOM; blocking set exactly {NUL, backspace}; all three injected-failure controls fail closed).main→ all flagged in the warn tier (the port detects the real defects the old gate missed).Toolset integration map: hyperpolymath/empty-linter
docs/INTEGRATION.adoc(landing separately).🤖 Generated with Claude Code