Repository navigation
fix(source-control): make the evidence step's body file get written with the Write tool - #17215
Conversation
…ith the Write tool Step 4 of reference/evidence.md now gives the Write instruction once, after the placeholder list, with a literal target (<dir>/evidence-comment.md, the scratchpad or the path mktemp -d prints), every path and value filled in literally, and its reason: the Write tool's content reaches no shell, so a $(...) or backtick in the criterion or summary text stays text. Steps 5 and 8 read that file. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed Security review: no security issues foundI read the whole change in both files: Removed instruction. The diff deletes the old step 4 line that said to write the body with the Write tool. I checked this under the instruction-surface lens. The rule is not gone: it now sits after the placeholder list and is stricter.
This closes a shell-injection path the old wording left open. Sessions had been writing the body with an unquoted Steps 5 and 8. They now point at "the file step 4 wrote" instead of a vague "". The leak scan therefore runs on the same file that gets posted, so a scan-then-post mismatch can't happen. Not affected:
critical-findings: 0 |
|
claude-review reviewed Code review: no findings. This PR moves the "write the body with the Write tool" instruction in the evidence reference. It now sits after the placeholder list in step 4, gives a literal target ( What I checked:
Loosened-check verdict: fail (default; the wrapper supplied no verdict or patterns line); patterns: 0. The PR loosens no check. Verifier dropped 0 of 0 candidates. |
No related issue: an eval-measured weakness in one skill step, found while running the evidence suite; no issue tracks it.
session: AI Hero
Summary
The pull-request skill's evidence step 4 says to write the comment body with the Write tool, and sessions ignored it about half the time: the
body-written-with-writegrader in the fourpull-request-evidence-*cases passed 6 of 12 runs on main. A reproduction of the small case at main (0 of 3) showed why. Each run folded steps 4, 5 and 8 into one Bash call,cat > $TMPDIR/body.md <<EOF, a grep scan, thengh pr comment --body-file. The body file's target was known only as$TMPDIR, and capture paths only as$PWD. The Write tool expands neither. The step also put the instruction mid-paragraph, ahead of a 60-line placeholder list, gave no reason, and named no literal file.Fix
reference/evidence.mdstep 4 states the instruction once, after the placeholder list: write the body with the Write tool, in a call of its own, to<dir>/evidence-comment.md, where<dir>is the scratchpad or the absolute pathmktemp -dprints, with every path and value filled in literally. The reason is one clause: the Write tool's content reaches no shell, so a$(...)or backtick in the criterion or summary text stays text. That text comes from the PR body, which the skill treats as data. The reproduction's unquoted<<EOFwould have expanded it..changes/source-control/.Verification
Rule, written before the measurement: the four evidence cases, Sonnet tested, Opus judge, 3 runs each,
--ablation none,--scaffold, plugin content at ff7dd16. Support requires all four VALID,body-written-with-writeat least 10 of 12 in total and at least 2 of 3 in every case, and no other grader below the main arm.body-written-with-write, mainrun-validity.py --runs 3 --scaffolded): VALID, 12 of 12 traces, no permission denial.<TMPDIR>/evidence-comment.mdwith the Write tool, scans that file and posts it with--body-file. None uses a heredoc.Left out: the without-plugin arm, since the grader measures a skill instruction the bare model never sees.
Related
The guardrails secret scan is not the reason for the Write tool here:
plugins/guardrails/README.md("Consumer seams") says secret scanning declines a temp-tree file. The reason given matchesreference/create.md's "Why a file, not a shell variable".🤖 Generated with Claude Code