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
fix(lint:pkg): make Gate 6 ANSI-invariant so publint blocks fire in CI — queue #63
The lint:pkg wrapper captures publint stdout and matches PUBLINT_BLOCK_RE
(/^(Suggestions|Warnings|Errors):$/m) to fail the gate on any advisory. In CI,
publint colorizes its block headers (color-capable environment), emitting e.g.
"\x1b[1m\x1b[34mSuggestions:\x1b[39m\x1b[22m". The leading SGR codes mean the
line is not a bare "Suggestions:", so the regex never matched and the gate
silently no-op'd — a CI false-NEGATIVE in which a genuine Warning/Error block
would sail through undetected. Verified against raw CI logs: the gate had been
a no-op in CI since publint 0.3.21 landed 2026-05-11; locally (plain-text,
non-TTY) the regex matched and the gate fired correctly.
Fix (belt-and-suspenders): spawn publint with NO_COLOR=1 AND strip residual
ANSI SGR codes from captured stdout before the regex match, so the verdict is
identical in every color environment (plain, TTY, FORCE_COLOR=1). ANSI_RE is
built via String.fromCharCode(27) + RegExp() to avoid a control-char literal
that oxlint's no-control-regex (Correctness) would reject. Header comment
updated to record the verified CI-color root cause.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments