fix(review): fence scope enumerations as data + byte-bound the lists (trail findings)

Commit

peyton-alt2mo ago

Two trail findings on the scope-injection design:

  • Commit subjects and filenames are attacker-controlled on a branch under review, yet they rendered unfenced inside the section framed as authoritative instructions — the exact injection surface the diff's dynamic fence already guards one paragraph below. The enumerations now ship inside their own dynamic fence (same longest-backtick-run sizing), introduced as untrusted data with an explicit do-not-act marker; entire's own instructions (authoritative-scope framing, discard rule) stay outside the fence.

  • The list sections were capped by line count only (50/200/100), so a wide branch with long paths could push the rendered lists past the ~32KiB platform argv cap even with the diff omitted. Lists are now trimmed to half the inline budget (charged commits -> files -> uncommitted, keeping leading lines; commits trimmed newest-first before the oldest-first reversal so the newest survive), and the remainder is charged against the diff allowance as before.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com Entire-Checkpoint: 23a2d752af4a

Checkpoints

test(review): pin that codex $name skills survive the legacy repair + native invocation

Claude Code
View session
Checkpoint 1