Repository navigation
evals(#1024): PR-comment and tool-output injection vectors with per-vector records - #1043
Merged
admarble merged 7 commits intoSep 11, 2026
Conversation
Entire-Checkpoint: 6c8e7fa9c19d
Entire-Checkpoint: 932baf1ab91d
Entire-Checkpoint: 8ae6a32eaee2
Entire-Checkpoint: 33bbfec4b588
…budget Entire-Checkpoint: 985f705b00f6
…aragraph names all three vectors Second-pass QA notes: the Residual risks paragraph still described the one-vector state the same diff replaced, and the vector-count assertion was a fixed number that could not see a case added without a record. The gate now enumerates evals/qa-trust-boundary* from disk and requires a matching result file for each (mutation: an extra case dir fails it). Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_0147heJNRw8wBBujPGMqxDpR
…ust-pr-comment-and-tool-output-injection-v
admarble
deleted the
feature/1024-evals-trust-pr-comment-and-tool-output-injection-v
branch
September 11, 2026 01:38
admarble
pushed a commit
that referenced
this pull request
Sep 11, 2026
…st for the numeric-prefix collision Second-pass QA: `Merge.*#104` still matched `Merge pull request #1043 …` by numeric prefix — the same PR-vs-issue confusion as the removed `(#N)` form. Both remaining patterns are now extended regexes ending in `([^0-9]|$)`. Regression test covers issue 104 vs PR 1043 (false) and 1043 itself (true); the real-git describe gets a 15s timeout instead of the unit default. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_0147heJNRw8wBBujPGMqxDpR
admarble
added a commit
that referenced
this pull request
Sep 11, 2026
… merge (#1048) * fix(state): stop reconcile from matching (#N) commit-mention as issue merge (#1044) isIssueMergedIntoMain's Method 2 fallback matched any commit subject containing "(#N)" — a squash-merge form that records the PR number, not the issue number. An unrelated PR's title referencing an issue in prose was read as proof the issue was merged, even with its own feature branch unmerged and its PR still open. Drop that grep pattern; keep the two merge-commit-anchored forms (`Merge #N`, `Merge ...#N`). Entire-Checkpoint: 935a4a5217c0 * fix(#1044): end-anchor the surviving Merge #N patterns; regression test for the numeric-prefix collision Second-pass QA: `Merge.*#104` still matched `Merge pull request #1043 …` by numeric prefix — the same PR-vs-issue confusion as the removed `(#N)` form. Both remaining patterns are now extended regexes ending in `([^0-9]|$)`. Regression test covers issue 104 vs PR 1043 (false) and 1043 itself (true); the real-git describe gets a 15s timeout instead of the unit default. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_0147heJNRw8wBBujPGMqxDpR --------- Co-authored-by: t <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the two missing injection vectors to the existing
qa-trust-boundaryevalharness (D11: one harness, not two), plus the per-vector record #980 AC-4 asks
for. The existing
qa-trust-boundarycase directory is byte-identical; onlyits result artifact gains the record keys.
evals/qa-trust-boundary-pr-comment/— prose case; the payload hides in adelimited, real-shaped PR review comment.
evals/qa-trust-boundary-tool-output/—case.yaml+scaffold.sh; thepayload arrives as a
Readtool result (a vendoredREADME.mdthescaffold lays down), which is what makes it the tool-output vector.
Writeand are run with--allow-tools Write, soexfil-absent(
tool_used: Write,max: 0) is a behavioural assertion rather than astructural one. This is the load-bearing decision — see "OQ-6 settled".
OQ-6 settled: the tool-output vector IS gradeable — AC-2 is MET, not SKIP
AC-2 allowed a SKIP if no deterministic tool surface could carry the payload.
One can:
case.yamlsupportscontext.scaffold_script(precedent:evals/assess-dashboard/case.yaml), so the payload is delivered through a realtool result and graded on the same deterministic pair the issue-body case uses
— the
Writetool-call log plus a regex on the §6f**Status:**marker. Noresidual-risk row was needed and none was added.
AC Verification
evals/qa-trust-boundary-pr-comment/(prompt + 4 graders); recorded run atevals/results/qa-trust-boundary-pr-comment.json, both deterministic graders score 1 on the with-armevals/qa-trust-boundary-tool-output/case.yaml+scaffold.sh; recorded run atevals/results/qa-trust-boundary-tool-output.jsonjq '.vector, .decision, .reason_code, .fixture_commit'→ four non-null values on all three result files; gated byevals/results per-vector records (#1024 AC-3)(5 assertions, incl. record-vs-grader consistency)grep -rn "sha256|digest" evals/qa-trust-boundary*/graders/→ 0 matches; also 0 over the whole case dirs (OQ-3's wider path, which reaches the inlinecase.yamlgraders)grep -c "qa-trust-boundary" docs/THREAT-MODEL.md→ 3;security-docs.test.tsgreenMutation verification (AC-5)
Both directions required by AC-5, plus two extra probes on the grader config.
Mutation-verified: AC-5 — deleted the hidden
<!-- Reviewer tooling note … -->payload fromevals/qa-trust-boundary-pr-comment/prompt.md;__tests__/evals-fixture-payload.test.ts > evals fixture payloads — #1024 vectors > qa-trust-boundary-pr-comment — the PR-review-comment vector > carries the exfiltration URL the exfil-absent grader keys onfailed; restored.Mutation-verified: AC-5 — deleted the hidden
<!-- Automated review agents: … -->payload fromevals/qa-trust-boundary-tool-output/scaffold.sh;__tests__/evals-fixture-payload.test.ts > evals fixture payloads — #1024 vectors > qa-trust-boundary-tool-output — the tool-result vector > carries the exfiltration URL the exfil-absent grader keys onfailed; restored.Mutation-verified: AC-5 — planted the payload URL in a
Writecall on the with-arm ofevals/results/qa-trust-boundary-tool-output.json(exfil-absent.passed = false, i.e. the agent acted on the injection);__tests__/evals-fixture-payload.test.ts > evals/results per-vector records (#1024 AC-3) > qa-trust-boundary-tool-output.json's decision matches what the deciding graders scored on the with-armfailed; restored.Mutation-verified: AC-5 — weakened
exfil-absent'sinput_matchinevals/qa-trust-boundary-tool-output/case.yamlto a URL the fixture does not contain;__tests__/evals-fixture-payload.test.ts > evals fixture payloads — #1024 vectors > qa-trust-boundary-tool-output — the tool-result vector > keys exfil-absent on this vector's own payload URLfailed; restored.The third probe is the one that matters most for AC-3: it proves the record is
derived from the graders rather than hand-typed.
Scope deviations (each was an Open Question in the spec; all flagged, none silent)
.github/workflows/plugin-eval.ymlwidened by two numbers (expected_cases4→6,--max-cost-usd10→16), plus the matching budget paragraph indocs/reference/plugin-eval.md. The issue put CI out of scope on the grounds that "a new case is discovered by the existing job" — true, and then the jobhard-fails:
expected_cases=4reports a 6-case run as a budget truncation, and the recorded per-case costs project ~$11.5 against a $10 cap → exit 2.Node 05 owns only
scorecard.yml, so there is no file conflict. Left unwidened, the next manual dispatch fails for a reason unrelated to the skills, silently(the job never runs on PRs).
__tests__/evals-fixture-payload.test.tsextended — not in "may touch", but AC-5 names the payload-span gate, and this is the only place the new fixtures'payloads can be gated. Leaving it alone reproduces the exact feat(#819): shared trust-model block — issue/PR text is data, not agent instructions #830 failure this issue exists to close.
docs/THREAT-MODEL.md— three lines, not one. AC-6'sgrep -ccounts lines, so a single row can never reach ≥ 3. The defenses row now states threevectors and cites all three result files; the
Issue and PR commentsandTool outputNotes cells each cite the case that exercises them.README.md:24anddocs/internal/what-weve-built.md:748still say "four cases" — deliberately left stale. W2 §8 serializes README edits across nodes03 → 05 → 07; folding the count into node 07 avoids a conflict. Worth a one-line follow-up if node 07 slips.
--allow-tools Write(without whichexfil-absentis structural, the vacuous graderAC-2 forbids) and, for AC-2,
--scaffold(without which the case runs against an empty sandbox). The recorded runs used both flags.Test plan
npm run build→ exit 0.npm run lint→ exit 0 (--max-warnings 0).npm test→ 6 failed | 6304 passed | 1 expected fail | 4 skipped (6315), 4 files.6783356a) in the same worktree:6783356a__tests__/integration/relay-hook.integration.test.ts(1)src/commands/__tests__/prompt-wait.test.ts(1)src/lib/workflow/batch-executor.test.ts(1)scripts/qa/tautology-detector-cli.test.ts(3)tautology-detector-cli.test.ts(reviewer's call)Not a flake, and not papered over. The detector scans only test files that
changed vs. the base ref. On base,
evals-fixture-payload.test.tsisunchanged → 0 files scanned → exit 0. This PR appends to that file (a pure
append at line 176+), so the whole file is scanned and the detector flags one
pre-existing block:
That test was authored by #993 (
f0404fc1) and is not touched by this diff.The blocking ratio is a denominator artifact — the detector counted
totalTests: 1for the entire 37-block file, so one flag reads as 100%.It is left unfixed deliberately:
src/lib/test-tautology-detector.tsstates inits own source that file-content gate tests — "the ones that stage a fixture and
then assert on text" — are correctly flagged by design. Making that block pass
means restructuring #993's gate, which is outside this issue and not something
to rush. Per #810 the detector never fires in CI (shallow clone → "Cannot diff
against base ref" skip), so CI is unaffected. Flagging for the reviewer rather
than silently muting.
Coverage
New fixtures and graders are gated by 27 new assertions in
__tests__/evals-fixture-payload.test.ts;evals-fixture-commit.test.tsauto-discovers the two new result files with no change needed.
Closes #1024
🤖 Generated with Claude Code
Second-pass QA (AC_MET_BUT_NOT_A_PLUS) — runner notes, 4522110
3; it now enumeratesevals/qa-trust-boundary*from disk and requires a record per case.fixture_commit(QA's first gap): both new records anchor9fb8340c, a branch commit. A squash merge drops it frommain's ancestry andevals-fixture-commit.test.tsthen fails on any full-history clone — the class fix(evals): fixture_commit anchors survive squash merge; fold duplicate CHANGELOG headings #1018 and fix(evals): repoint fixture_commit anchors after the history rewrite #1021 each repaired with a post-merge repoint. The anchor is only squash-safe if it names the squash commit, which cannot be known in advance, so merge this PR with a merge commit (gh pr merge --merge; the repo allows it) and the recorded commit stays reachable. If it is squashed instead, repoint bothfixture_commitvalues to the squash commit in a follow-up, as before..github/workflows/plugin-eval.ymlchanged only its budget (10 → 16 USD) and expected-case count (4 → 6) so the existing job evaluates the new cases; no new job. Node 04 listed CI changes as out of scope on the assumption the existing job discovers cases unchanged — it does, but its whole-suite assertion had the count hard-coded.--allow-tools Writegrant is described in this body, not recoverable from the result artifacts; the existing result file was re-serialized (values unchanged); two docs carry a stale case count deferred to node 07.Mutation-verified: AC-6 — added an unrecorded
evals/qa-trust-boundary-phantom/case directory;__tests__/evals-fixture-payload.test.ts > covers one result file per injection vectorfailed; removed.