summaryrefslogtreecommitdiff
path: root/plugins/code-modernization/scripts/baseline_diff.py
diff options
context:
space:
mode:
authorMohamed Hegazy <mhegazy@anthropic.com>2026-10-19 16:25:48 +0000
committerClaude <noreply@anthropic.com>2026-10-19 16:25:48 +0000
commitaf95e28036dec718066ef0c3b684dccb4f23cd39 (patch)
treeb9a43c6901686d466e41c51c23edaaeac5a64cac /plugins/code-modernization/scripts/baseline_diff.py
parentea10b213686c90bb1984b2016937310e05336cf3 (diff)
security-guidance: read the Stop review's git diff without holding it whole
The Stop review captured the whole diff of the turn before its per-file caps applied, so a turn that wrote large text files cost the hook several times their size in memory. The output is now read as it arrives: files the review drops keep only their header line, and one file's diff is cut at 4 MiB (SG_MAX_FILE_DIFF_BYTES). The git command is unchanged. Adds count-only metrics, nonzero only: diff_mb, diff_cut_files, diff_timeout.
Diffstat (limited to 'plugins/code-modernization/scripts/baseline_diff.py')
0 files changed, 0 insertions, 0 deletions