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
PR #139 review finding [WARN-2]: The mut array regex />/ matches any command containing >, including benign uses like echo "version > 2" or commands with > inside quoted strings.
PR #139 amplified this by adding review_state reset on mutating bash commands (line 1024). Now harmless commands can falsely invalidate review state.
Fix
Tighten the > pattern to only match file redirects, not > inside quotes:
Option A: />(?!\s*&)(?!\s*\/)(?!.*['"].*>.*['"])/ — exclude fd redirects and quoted strings
Option B: Use a simple heuristic — split on unquoted |/&&/; first, then check each segment
Acceptance Criteria
echo "version > 2" does NOT trigger mut detection
gcloud list --format=json 2>&1 does NOT trigger mut detection
echo test > file.txt DOES trigger mut detection
sed -i 's/old/new/' file DOES trigger mut detection
Tests for false positive and true positive cases
Source
PR #139 review comment [WARN-2], pre-existing amplified by review_state reset
Activity
fix(guardrails): address 8 foundation bugs from PR #90 and Issues #140/…