Skip to content

test(visualization): read bracketed quote placeholders as placeholders - #11936

Merged
kyle-sexton merged 4 commits into
mainfrom
test/visualization-bracketed-quote-placeholders
Nov 1, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
test/visualization-bracketed-quote-placeholders

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Refs: #11628

Summary

The no-invented-quote grader in plugins/visualization/evals/pres-missing-figure/case.yaml (merged in #11811) falsely fails answers that leave the customer quote as a bracketed placeholder.

Measured with 12 real runs (claude plugin eval --case pres-missing-figure --runs 3, twice, Claude Code 2.1.316): no answer invented a quote, and the grader failed 5 of the 12. All 5 failures were bracketed placeholders other than exactly [__], such as "[__ Hartwell survey quote]", "[PLACEHOLDER: customer quote from the Hartwell survey]" and a — [Customer name / role, Hartwell survey] attribution. 4 of the 5 were in the without-plugin arm, so the false fails inflated the reported with-versus-without delta.

Fix

  • Every quoted-string alternative: the guard after the opening quote mark changes from (?!\[__\]) to (?!\[), so a quote whose text starts with [ is a placeholder.
  • Blockquote-attribution alternative: an attribution whose text after the dash or parenthesis starts with [ no longer counts ((?![ \t]*\[) after the dash group).
  • Blockquote-under-a-quote-heading alternative: blockquote text that starts with an optional quote mark and [ is a placeholder ((?![ \t]*["“]?\[)). Without this, the first measured shape (> "[__ Hartwell survey quote]") still failed through this alternative, since [__ is not [__].

The rest of the pattern is unchanged. The five measured shapes are new pass samples in samples/no-invented-quote.json, and a new fail sample shows an invented, attributed quote is still caught after a bracketed placeholder and attribution elsewhere in the answer.

Verification

  • python3 plugins/evals/skills/validate/scripts/validate-cases.py plugins/visualization/evals exits 0 with no findings; node is on PATH, so the samples are graded under both Python re and JavaScript RegExp.
  • A comparison script ran main's pattern and this branch's pattern over every sample: main fails all 5 new pass samples, and this branch sorts all 19 pass and 17 fail samples correctly.

Related

Remaining

This PR fixes one grader in #11628's suite. #11811 already rewrote the other graders and fixed the truncated reports-instruction.json sample. #11628 still needs:

  • The present and visualize trigger and outcome passes re-run concurrently after fix(evals): let trigger-measurement probe runs pass run-validity #11618, on a fresh held-out set, with denial-free runs or the denial cause removed, each pass judged VALID by /evals:plugin-eval.
  • The keep-or-revert decision on the present description, made on that VALID re-measure, and the re-decision of the reverted bodies and the visualize description on the new numbers.

🤖 Generated with Claude Code

kyle-sexton and others added 3 commits November 1, 2026 09:09
The no-invented-quote grader in pres-missing-figure exempted only an exact
"[__]" quote, so real answers that wrote "[__ Hartwell survey quote]",
"[PLACEHOLDER: ...]" or a bracketed attribution failed it. In 12 real runs
none invented a quote and 5 failed this grader, all on bracketed
placeholders.

A quoted string, or a blockquote under a quote heading, whose text starts
with "[" is now a placeholder, and so is an attribution whose text after the
dash starts with "[". The five measured shapes are pass samples, and a fail
sample shows an invented quote is still caught after a bracketed placeholder
elsewhere.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 1, 2026 14:12
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T14:13:40.148958Z 3356ece Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review needs no new review of bc096172791cf72de7360ccbfe59b3650964ec21: no file of this pull request changed since the review of 3356ece.

Security review: no security issues found.

I read every hunk of all 3 changed files:

  • .changes/visualization/test-visualization-bracketed-quote-placeholders-852b4b7e.md is a new changeset fragment with bump: none.
  • plugins/visualization/evals/pres-missing-figure/case.yaml changes the regex pattern of the no-invented-quote eval grader. The (?!\[__\]) guard becomes (?!\[), and two negative lookaheads are added so bracketed placeholders aren't counted as invented quotes.
  • plugins/visualization/evals/pres-missing-figure/samples/no-invented-quote.json adds 5 new pass samples and 1 new fail sample.

What I checked:

  • Security surface: none. The change only affects how the local eval suite grades a model's answer (target: last_message). It touches no workflow, token, trusted-actor list, merge hold, kill switch, plugin manifest, skill or agent body, or hook.
  • Trusted paths: no changed file matches a TRUSTED PATHS: glob.
  • Instruction surface: the diff deletes, narrows or softens no standing instruction.
  • Plugin manifests: no plugin.json or marketplace.json is changed, so there are no manifest <field> lines.
  • Regex cost: I considered whether the loosened lookaheads could make the regex slow on some inputs. It only runs on eval output on the operator's own machine, with no attacker-supplied input and no credentialed context, so it doesn't meet the bar.
  • PR context: the description has no embedded instructions aimed at the review lane.
  • Spend: none beyond normal review runs.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

claude-review needs no new review of bc096172791cf72de7360ccbfe59b3650964ec21: no file of this pull request changed since the review of 3356ece.

Code review: PR #11936, bracketed quote placeholders in no-invented-quote

I read every hunk in all 3 changed files: the changelog fragment, case.yaml and samples/no-invented-quote.json.

The idea is sound. Treating a quote or blockquote whose text starts with [ as a placeholder matches the shapes the PR body says it measured. I traced the five new pass samples and the new fail sample through the pattern by hand and they sort as the PR claims. I couldn't run the grader or validate-cases.py, so the 19/17 sample split and the measured-runs numbers come from the author and I haven't checked them.

There are 2 findings, both advisory and both on the blockquote-attribution alternative (the last one in the pattern):

  1. The fix is incomplete. The new (?![ \t]*\[) check applies only at the first dash or ( on the line. The lazy [^\n]*? before it can still move to a later dash or parenthesis inside the bracket. So a bracketed attribution placeholder like > — [Customer name, role (Hartwell survey respondent)] still fails, which is the same false fail this PR sets out to fix.
  2. Some invented quotes are no longer caught. This alternative used to be the only one that caught an unquoted blockquote quote with an attribution in a section whose heading has no quote keyword. Now the invented quote passes when only the attribution is bracketed.

Other checks:

  • Changelog fragment: bump: none fits, since only eval files change and nothing ships to users. No plugin manifest changes.
  • Path rule .claude/rules/eval-case-transcripts.md (covers plugins/*/evals/**): the new samples are synthetic case outputs with no identifying details or machine paths, so the rule is met.
  • Closing issue: the PR says Refs: #11628 and closes no issue, so there are no acceptance criteria to check.
  • Embedded instructions: the PR context contains none aimed at this lane.
  • Spend: none. This is an eval-grader-only change.

critical-findings: 2

Findings not posted inline (their lines are not in the diff):

  • plugins/visualization/evals/pres-missing-figure/case.yaml:21 (RIGHT): Advisory: the bracketed-attribution fix only works when there's no ( or - inside the bracket.

In the last alternative (^[ \t]*>(?!…)[^\n]*?(?:[—–]|[ \t]-[ \t]|\()(?![ \t]*\[)[^\n]{0,40}?(?:Hartwell|customer|respondent|survey)), the new (?![ \t]*\[) check rejects the em dash only at that one position. The lazy [^\n]*? then keeps extending and can stop at a later ( or - inside the bracket, where the lookahead passes.

Example that still fails:

> — [Customer name, role (Hartwell survey respondent)]

The guard finds no placeholder words on the line. The — is skipped because [ follows it. The ( then matches and Hartwell comes right after it, so the line matches and the grader fails the answer. > — [Name, role - Hartwell survey] fails the same way through [ \t]-[ \t].

This is the shape the PR fixes (a — [Customer name / role, Hartwell survey] attribution), with a parenthesis added, which models often write. The new pass sample avoids it only because it has no ( on the attribution line.

Possible fix: exempt the line as a whole when the attribution starts with [. One way is to add (?![^\n]*(?:[—–]|[ \t]-[ \t])[ \t]*\[) to the guard after ^[ \t]*>, and add a pass sample with a parenthesis inside the bracketed attribution.

  • plugins/visualization/evals/pres-missing-figure/case.yaml:21 (RIGHT): Advisory: an invented, unquoted blockquote quote with a bracketed attribution now passes when the section heading lacks a quote keyword.

Before this change, the last alternative caught this:

## Slide 2
> The new tiers finally fit how we buy — [Customer, Hartwell survey]

It matched —, then Hartwell within 40 characters. With the new (?![ \t]*\[), it no longer matches. No other alternative covers this shape:

  • The quoted-string alternatives need a "/“ mark.
  • The blockquote-under-a-quote-heading alternative needs the line above to contain quote|customer|voice|Hartwell|survey|testimonial|respondent. Unlike the other alternatives, its list has no slide[ \t]*2\b, so a bare ## Slide 2 heading doesn't trigger it.

The quote text is invented; only the attribution is a placeholder. The grader exists to catch exactly that.

The new fail sample doesn't cover this case because its invented quote is in quote marks and the line names Hartwell, so the first alternative catches it.

Possible fix: exempt the attribution only when the blockquote text before the dash is also a placeholder, or add slide[ \t]*2\b to the heading list of the blockquote-under-a-quote-heading alternative. Either way, add a fail sample with this shape.

@kyle-sexton

Copy link
Copy Markdown
Member Author

Reply to the claude-review findings on 3356ece:

# Finding Classification Basis
1 A bracketed attribution with a ( or - inside the bracket still fails Not changed in this PR verified: the trace is correct, but no measured answer wrote that shape
2 An unquoted invented blockquote with a bracketed attribution, under a heading with no quote cue, now passes Not changed in this PR verified: the trace is correct, but no measured answer wrote that shape

This grader changes only in response to real-answer measurements. This PR's evidence is 12 real runs on Claude Code 2.1.316: no answer invented a quote, and 5 false fails all came from the bracketed placeholder shapes that are now pass samples. Neither shape above showed up in those runs. Both are hypothetical layouts, so adding them would start another regex round with no measured answer behind it. If a later measured run writes one of them, it goes in as a sample along with the fix it needs.

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

The pr-verify verifier failed head 3356ece07779169c18dcefd33862747715f1e595. What it wrote, as data:

What it wrote (26 lines)
Summary: This PR is linked to #11628 by a `Refs:` line, so it only delivers part of that issue. It
  fixes the `pres-missing-figure` `no-invented-quote` grader so a quote or attribution whose text
  starts with `[` counts as a placeholder, which is within the issue's grader scope. The regex
  changes and the new samples look correct, and check-plugins passed. It still fails because the PR
  body never says which parts of #11628 are left for later work, and a `refs` delivery has to name
  them.
- PR body: the spec links #11628 only through `Refs:`, so the body has to name the work that
  remains. It names none. The Related section just says #11628 is 'the issue the suite work belongs
  to'. Fix: add a 'Remaining' section listing what #11628 still needs. That is the other grader
  rewrites still open (for example `viz-ambiguous-code`, `pres-k2-instruction`,
  `pres-outline-record`, `viz-comparison-table`, `viz-pr-diff-terminal`, and `pres-missing-figure`
  `blank-marked`, unless earlier PRs already landed them), the truncated `reports-instruction.json`
  sample, the concurrent re-measure that must be judged VALID after #11618, and the keep-or-revert
  decision on the `present` description.
- plugins/visualization/evals/pres-missing-figure/case.yaml:22: I read all three changes: the
  quoted-string guard changes from `(?!\[__\])` to `(?!\[)`, a `(?![ \t]*["“]?\[)` guard is added on
  the blockquote-under-heading alternative, and a `(?![ \t]*\[)` guard is added after the
  attribution dash group. They line up with the five new pass samples and the one new fail sample,
  and I found no correctness defect.
- plugins/visualization/evals/pres-missing-figure/case.yaml:22: the PR author accepted two known
  gaps in a PR comment and left them unfixed. A bracketed attribution with `(` or ` - ` inside the
  bracket still fails. An unquoted invented blockquote with a bracketed attribution, under a heading
  with no quote cue, now passes. Neither blocks, but a person should know about them.
- upstream-jobs.json: test-bash, test-python and test-node were skipped. That is expected, because
  no unit suite covers the eval files. check-plugins passed, and the PR body says
  `validate-cases.py` exits 0 on the samples.

This pull request leaves the merge queue, and ci-status holds it out while it carries pr-verify-failed. A pr-verify pass at a new commit removes the label.

@github-actions github-actions Bot added the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Nov 1, 2026
…ing work

No file changes: pr-verify judges each head once, so its verdict on the
updated body needs a new commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot removed the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Nov 1, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 1, 2026
Merged via the queue into main with commit 7d60541 Nov 1, 2026
39 checks passed
@kyle-sexton
kyle-sexton deleted the test/visualization-bracketed-quote-placeholders branch November 1, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant