From 3be24a570497c957286c7b2a0f786b992f699690 Mon Sep 17 00:00:00 2001 From: Affaan Mustafa Date: Tue, 14 Apr 2026 19:26:24 -0700 Subject: [PATCH] fix: restore urgent PR CI health --- agents/a11y-architect.md | 1 + scripts/hooks/gateguard-fact-force.js | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/agents/a11y-architect.md b/agents/a11y-architect.md index 7ef2e517..531d43ff 100644 --- a/agents/a11y-architect.md +++ b/agents/a11y-architect.md @@ -1,6 +1,7 @@ --- name: a11y-architect description: Accessibility Architect specializing in WCAG 2.2 compliance for Web and Native platforms. Use PROACTIVELY when designing UI components, establishing design systems, or auditing code for inclusive user experiences. +model: sonnet tools: ["Read", "Write", "Edit", "Bash", "Grep", "Glob"] --- diff --git a/scripts/hooks/gateguard-fact-force.js b/scripts/hooks/gateguard-fact-force.js index 754fff80..1123f97c 100644 --- a/scripts/hooks/gateguard-fact-force.js +++ b/scripts/hooks/gateguard-fact-force.js @@ -189,7 +189,14 @@ function isChecked(key) { function sanitizePath(filePath) { // Strip control chars (including null), bidi overrides, and newlines - return filePath.replace(/[\x00-\x1f\x7f\u200e\u200f\u202a-\u202e\u2066-\u2069]/g, ' ').trim().slice(0, 500); + let sanitized = ''; + for (const char of String(filePath || '')) { + const code = char.codePointAt(0); + const isAsciiControl = code <= 0x1f || code === 0x7f; + const isBidiOverride = (code >= 0x200e && code <= 0x200f) || (code >= 0x202a && code <= 0x202e) || (code >= 0x2066 && code <= 0x2069); + sanitized += (isAsciiControl || isBidiOverride) ? ' ' : char; + } + return sanitized.trim().slice(0, 500); } function normalizeForMatch(value) {