The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
fix(gateguard): drop \x00 placeholder in glob-to-regex (eslint no-control-regex) (#2439)
Affaan Mustafa31678527538d
diff --git a/scripts/hooks/gateguard-fact-force.js b/scripts/hooks/gateguard-fact-force.jsindex 627f7fdf9..3f7f9ed80 100644--- a/scripts/hooks/gateguard-fact-force.js+++ b/scripts/hooks/gateguard-fact-force.js@@ -116,10 +116,9 @@ function getExemptMatchers() {.map(glob => {const source = glob.replace(/[.+^${}()|[\]\\]/g, '\\$&') // escape regex metachars, keep * and ?- .replace(/\*\*/g, '\x00') // ** placeholder (cross-segment)- .replace(/\*/g, '[^/]*') // * -> within a segment- .replace(/\x00/g, '.*') // ** -> across segments- .replace(/\?/g, '.');+ .split('**') // ** boundaries (cross-segment)+ .map(part => part.replace(/\*/g, '[^/]*').replace(/\?/g, '.'))+ .join('.*'); // ** -> across segmentstry {return new RegExp(source);} catch (_) {