Skip to content

Commit 57dbcf7

Browse files
anakrishCopilot
andcommitted
fix: run all review perspectives on every PR
Path-based perspective selection proved too narrow — it missed security issues in new modules (e.g., src/sarif.rs) that didn't match existing path patterns. Now all 9 review perspectives run on every PR. The false-positive filter handles noise from irrelevant perspectives. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 2fdb1c7 commit 57dbcf7

1 file changed

Lines changed: 5 additions & 26 deletions

File tree

.github/scripts/perspective-review.sh

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -113,33 +113,12 @@ ADDED_COUNT=$(grep -c ':added:' "$TMPDIR/valid_anchors_full.txt" || echo 0)
113113
CONTEXT_COUNT=$(grep -c ':context:' "$TMPDIR/valid_anchors_full.txt" || echo 0)
114114
echo "Valid anchors: ${ADDED_COUNT} added, ${CONTEXT_COUNT} context"
115115

116-
# Step 3: Select perspectives based on changed paths
117-
PERSPECTIVES="reliability-engineer,test-engineer"
116+
# Step 3: Select all review perspectives
117+
# Every perspective runs on every PR — path-based filtering proved too narrow
118+
# (missed security issues in new modules that didn't match known paths).
119+
# The false-positive filter handles noise from irrelevant perspectives.
120+
PERSPECTIVES="api-steward,architect,ci-cd-security,performance-engineer,red-teamer,reliability-engineer,security-auditor,semantics-expert,test-engineer"
118121

119-
if grep -qE 'src/builtins/' "$TMPDIR/changed_files.txt" 2>/dev/null; then
120-
PERSPECTIVES="${PERSPECTIVES},semantics-expert,red-teamer"
121-
fi
122-
if grep -qE 'src/(value|number)' "$TMPDIR/changed_files.txt" 2>/dev/null; then
123-
PERSPECTIVES="${PERSPECTIVES},semantics-expert"
124-
fi
125-
if grep -qE 'bindings/|src/.*ffi' "$TMPDIR/changed_files.txt" 2>/dev/null; then
126-
PERSPECTIVES="${PERSPECTIVES},architect,api-steward"
127-
fi
128-
if grep -qE 'Cargo\.(toml|lock)' "$TMPDIR/changed_files.txt" 2>/dev/null; then
129-
PERSPECTIVES="${PERSPECTIVES},security-auditor,architect"
130-
fi
131-
if grep -qE 'src/(interpreter|rvm|compiler|scheduler)' "$TMPDIR/changed_files.txt" 2>/dev/null; then
132-
PERSPECTIVES="${PERSPECTIVES},semantics-expert,performance-engineer"
133-
fi
134-
if grep -qE '\.(yml|yaml|sh)$|\.github/' "$TMPDIR/changed_files.txt" 2>/dev/null; then
135-
PERSPECTIVES="${PERSPECTIVES},ci-cd-security"
136-
fi
137-
if grep -qE '\.json$' "$TMPDIR/changed_files.txt" 2>/dev/null && grep -qE '\.github/' "$TMPDIR/changed_files.txt" 2>/dev/null; then
138-
PERSPECTIVES="${PERSPECTIVES},ci-cd-security"
139-
fi
140-
141-
# Deduplicate
142-
PERSPECTIVES=$(echo "$PERSPECTIVES" | tr ',' '\n' | sort -u | tr '\n' ',' | sed 's/,$//')
143122
echo "Selected perspectives: ${PERSPECTIVES}"
144123

145124
# Step 4: Build context from knowledge files (limited to stay within model context)

0 commit comments

Comments
 (0)