Skip to content

fix(ci): the invisible-character gate never matched anything - #65

Merged
hyperpolymath merged 4 commits into
mainfrom
fix/empty-linter-pattern-never-matched
Aug 28, 2026
Merged

hyperpolymath merged 4 commits into
mainfrom
fix/empty-linter-pattern-never-matched

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Measured 2026-08-27: this gate caught 0 of 6 invisible-character test cases. It has never detected an NBSP, zero-width space, BOM, soft hyphen, bidi override or word joiner.

Root cause

The pattern used UTF-8 byte sequences (\xc2\xa0) while grep -P matches characters. Bytes c2 a0 are one character U+00A0; \xc2\xa0 asks for two, U+00C2 then U+00A0 — never present.

grep -P '\xc2\xa0'  ->  miss
grep -P '\x{a0}'    ->  MATCH

Only \x00 worked, being single-byte in both readings. The gate ran, passed, and could not see what it exists to see.

Fixed

  • codepoint escapes in place of byte sequences
  • C0 controls \x01-\x08,\x0B,\x0C,\x0E-\x1F added (TAB/LF/CR excluded)
  • grep -a — without it grep skips any NUL-bearing file as binary

The C0 range matters: a stray backspace byte made a workflow unparseable in developer-ecosystem, so it never ran — and this linter called it clean.

Canonical fix: hyperpolymath/empty-linter#70. 1 file(s) here.

Verified: YAML re-parsed, and the corrected pattern was confirmed to catch a real NBSP before the change was kept.

MEASURED 2026-08-27: this gate's pattern caught 0 OF 6 invisible-character test
cases. It has never detected an NBSP, zero-width space, BOM, soft hyphen, bidi
override or word joiner.

ROOT CAUSE: the pattern used UTF-8 BYTE sequences (\xc2\xa0) while grep -P
matches CHARACTERS. Bytes c2 a0 are ONE character U+00A0; \xc2\xa0 asks for TWO
characters, U+00C2 then U+00A0, which is never present.

  grep -P '\xc2\xa0'  ->  miss
  grep -P '\x{a0}'    ->  MATCH

Only \x00 worked, being single-byte in both readings.

FIXED: codepoint escapes; C0 control characters \x01-\x08,\x0B,\x0C,\x0E-\x1F
added (TAB/LF/CR excluded); and grep -a, without which grep skips any NUL-bearing
file as binary.

The C0 range matters: a stray BACKSPACE byte made a workflow unparseable in
developer-ecosystem, so it never ran, and this linter called it clean.

Canonical fix: hyperpolymath/empty-linter#70. 1 file(s) here.
VERIFIED: YAML re-parsed, and the corrected pattern was confirmed to catch a real
NBSP before the change was kept.
@coderabbitai

coderabbitai Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

Next included review available in 33 minutes.

View limit details

Limit details: You’ve used the included review currently available.

This review ran on the free tier because your account doesn't have an assigned seat on this organization's plan. Waiting won't change this — ask an organization admin to assign you a seat, then retry.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Free

Run ID: fb2fdfaf-7c5a-4e72-a169-5dc68f6f58df

📥 Commits

Reviewing files that changed from the base of the PR and between 1a03f66 and 40d3e73.

📒 Files selected for processing (1)
  • .github/workflows/dogfood-gate.yml
ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Free

Run ID: b37fd3c4-c1ec-4604-82c3-5d086a74e561

📥 Commits

Reviewing files that changed from the base of the PR and between bde0c80 and 1a03f66.

📒 Files selected for processing (1)
  • .github/workflows/dogfood-gate.yml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Improved detection of invisible and Unicode characters during automated quality checks.
    • Blocking control characters are now reliably identified and prevent changes from passing validation.
    • Non-blocking invisible Unicode characters generate advisory warnings without unnecessarily stopping validation.
    • Validation results now clearly distinguish between total findings and issues requiring action.

Walkthrough

The workflow now detects invisible Unicode characters with Unicode-aware patterns, separates blocking C0/NUL findings from other findings, and applies failure or warning outcomes during validator enforcement.

Changes

Unicode character gate

Layer / File(s) Summary
Scan and enforce invisible-character findings
.github/workflows/dogfood-gate.yml
The scan detects C0 controls, NUL, and other invisible Unicode characters. It records total findings and blocking findings. The enforcement step fails for scan errors or blocking findings and warns for non-blocking findings.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 1a03f

This PR corrects the workflow’s invisible-character matching and adds coverage for previously missed control characters; no actionable merge-blocking risk remains beyond normal checks and review.

Poem

A rabbit checks each hidden mark,
C0 and NUL stand out in the dark.
Unicode whispers, warnings glow,
Blocking faults stop the flow.
Clean files let the gate doors swing.


Note

🎁 Summarized by CodeRabbit Free

The PR author is not assigned a seat. If you are a newly provisioned user and your organization has automatic seat assignment enabled, open a new pull request to trigger seat assignment. Otherwise, ask an organization administrator to assign a seat through the team management page at https://app.coderabbit.ai/settings/team-management.

Comment @coderabbitai help to get the list of available commands.

@gitar-bot

gitar-bot Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

Third layer of the empty-linter fix, scoped by an owner ruling after a census.

DETECTION (layers 1-2, earlier commits) sees everything the pattern covers.
ENFORCEMENT (this commit) distinguishes two classes:

  BLOCKING  C0 control characters and NUL. Never legitimate; proven damage -
            a backspace byte made a workflow unloadable (it never ran once),
            and LaTeX maths in wiki files was silently mangled where a
            generation step turned backslash-b commands into backspaces.
  ADVISORY  NBSP, BOM, zero-width marks. A gate-lens census found ~2,100
            first-party files carry these as legitimate typography in prose;
            blocking would fail 2,333 files estate-wide for no safety gain.

Also checks the lint STEP OUTCOME: if the step crashes, its counts arrive
empty, and a count-only check would silently pass (review finding).

The blocking count re-greps only the files the full pattern already flagged,
so the find expression is not duplicated and cannot drift.

1 file(s). YAML re-parsed per edit; reverted on any mis-apply.
@hyperpolymath
hyperpolymath enabled auto-merge (squash) August 28, 2026 07:31
@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath disabled auto-merge August 28, 2026 15:45
@hyperpolymath
hyperpolymath merged commit 4a75dfc into main Aug 28, 2026
4 of 35 checks passed
@hyperpolymath
hyperpolymath deleted the fix/empty-linter-pattern-never-matched branch August 28, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant