Skip to content

Commit ac81cf2

Browse files
igerberclaude
andcommitted
Add explicit disclosure of excluded files in AI review prompt
Echo a note into the prompt listing any excluded data files so Codex knows its diff is partial. Addresses P2: review should not appear to have full coverage when large data files were omitted. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 32e7db2 commit ac81cf2

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/ai_pr_review.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,18 @@ jobs:
147147
echo "Changed files:"
148148
git --no-pager diff --name-status "$BASE_SHA" "$HEAD_SHA"
149149
echo ""
150+
# Identify large data files excluded from the unified diff
151+
EXCLUDED_GLOBS="benchmarks/data/real/*.json benchmarks/data/real/*.csv"
152+
excluded_files=$(git --no-pager diff --name-only "$BASE_SHA" "$HEAD_SHA" -- $EXCLUDED_GLOBS)
153+
if [ -n "$excluded_files" ]; then
154+
echo "NOTE: The following files are excluded from the unified diff below"
155+
echo "due to size (they are generated data/golden-value files). Their"
156+
echo "filenames appear in the 'Changed files' list above, but their"
157+
echo "content is NOT shown. Review coverage for these files is metadata-only."
158+
echo "$excluded_files" | sed 's/^/ - /'
159+
echo ""
160+
fi
150161
echo "Unified diff (context=5):"
151-
# Exclude large generated data files from the full diff to stay
152-
# within the model's input limit. The --name-status above still
153-
# lists them so the reviewer knows they changed.
154162
git --no-pager diff --unified=5 "$BASE_SHA" "$HEAD_SHA" \
155163
-- . ':!benchmarks/data/real/*.json' ':!benchmarks/data/real/*.csv'
156164
} >> "$PROMPT"

0 commit comments

Comments
 (0)