Skip to content

test(evals): anchor no-install in the 7 formatter ck-notice cases - #12767

Merged
kyle-sexton merged 8 commits into
mainfrom
test/12645-anchor-no-install-2
Nov 3, 2026
Merged

kyle-sexton merged 8 commits into
mainfrom
test/12645-anchor-no-install-2

Conversation

@kyle-sexton

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

Copy link
Copy Markdown
Member

Closes #12645

Summary

The no-install grader in the 7 formatter ck-notice-runs-bundled-checker cases matched a package client and an install verb anywhere in a Bash command, so a read-only grep -n 'brew install' README.md, echo 'install with: brew install x' or curl -sI https://example.invalid failed a run that installed nothing. Each case now matches only at command position, and a separate session re-measured the cases: see Verification.

Fix

  • Each case now builds no-install in its matchers.json from command_position_multishell, and check-matchers.py --write renders it into case.yaml.
  • The tail is the same across the 7 and wider than the one #12640 gave actionlint, which misses installs the old regex caught (nvm, conda, rustup, Install-Module, npx, yarn global add).
  • curl and wget count only when they write to disk or feed something other than a text reader. A redirect counts at any stage of the pipeline, so curl URL | cat > /tmp/x fails, while a > inside a reader's quoted argument (jq '.count > 1') and a redirect to /dev/null do not. 1>, 1>> and >& file count as stdout redirects; 2>/dev/null, 1>&2 and >& /dev/null do not. wget -qO- URL, wget -O - URL and wget -O /dev/null URL read like their curl equivalents; wget -O /tmp/x URL and a bare wget URL still fail.
  • Install-Module and Install-PSResource count at a statement start, including under pwsh -Command, but not as an argument of Get-Command. The shared fragment is unchanged. It reaches pwsh -Command "Install-Module x", but misses pwsh -ExecutionPolicy Bypass -Command "...", a quoted pwsh.exe path, {Install-Module x} and $null = Install-Module x, so the case's own tail covers those.
  • samples/no-install.json holds the read-only shapes as pass (30) and real installs and downloads as fail (74), identical in all 7.
  • Registry: the samples/no-install.json line goes, as its comment directs when a copy diverges, and a line for the 7 identical matchers.json copies comes in. The 9 other plugins with this case lose drift checking on that one sample file, because check-cross-plugin-source-drift.sh keys a cluster by path within a plugin and cannot register a subset.

Verification

  • check-matchers.py plugins/*/evals: 6 fragments, 20 cases with matchers, 83 graders under JavaScript: ok, which sorts every sample under the built grader and fails on a case.yaml that differs from its build. check-matchers.test.sh: 12 tests OK.
  • The fd-redirect samples (curl ... 1> /tmp/x, wget -qO- ... 1>> /tmp/x, curl ... >& /tmp/x) failed check-matchers.py as unmatched before the redirect fix and pass after it.
  • validate-cases.py over the 7 suites: exit 0 each, with only the 3 expected WARN lines on tools that need --allow-tools.
  • A one-off probe of 50 commands against all 7 built graders under node's RegExp: 0 wrong, including pwsh -NoProfile -Command "Install-Module x", npx, and the two review findings' shapes, each of which it showed wrong before the fix.
  • check-cross-plugin-source-drift.sh --check and check-changelog-fragments.sh --check-required origin/main pass.
  • Re-measure: lane 4 re-measured at b9d8325b99, recorded on the issue: VALID on all 7 result files, no-install failures 0 of 21 runs.
  • Left out: a re-measure of the later curl and wget branch fix. The re-measured runs' read-only commands were command -v, --version, head and ls, which name neither tool, and no run tried a real install, so the fail side rests on the samples.

Related

  • #12640 fixed the same regex for actionlint.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VQb9Q49h99qKdrunU4xw3S

kyle-sexton and others added 2 commits November 3, 2026 01:47
The grader matched a package client and verb anywhere in a Bash command, so a
read-only grep, echo or curl -sI failed it. Each case now builds it in
matchers.json from command_position_multishell, with a tail of its own: the
actionlint tail misses installs the old regex caught (nvm, conda, rustup,
Install-Module, npx, yarn global add, sudo -u root, curl -O).

curl and wget now count only when they write to disk or feed something other
than a text reader. PowerShell verbs count at a statement start, wrapped in
pwsh -Command included, not as an argument of Get-Command.

The samples/no-install.json copies now differ between these 7 and the 9 other
plugins with this case, so its drift-registry line goes, as that line's comment
directs. The 9 lose drift checking on this file; the check keys a cluster by
path within a plugin, so it cannot register a subset of a path's copies.

Refs: #12645

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9Q49h99qKdrunU4xw3S
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 3, 2026 06:50
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 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-03T06:52:59.038435Z b9d8325 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b9d8325b99

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 13f89ded92b70269a49b28294672578a38c3dca8: read 29 of 29 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #12767, head 13f89ded

No security issues found. Nothing in this change has a security surface, so skip-gate 2 applies.

What I read. I read every hunk in .claude-lane/pr.diff. For each set of copies in identical.txt, I read the first path; the job counts the copies as read.

  • 7 changelog fragments: each is bump: none with one line of prose.
  • 7 case.yaml files: each swaps the input_match regex of the offline no-install eval grader for one built from command_position_multishell and a shared tail. The 7 new regexes are byte-identical. I read each one.
  • 7 new matchers.json files: the source the regex is built from. All 7 are identical.
  • 7 samples/no-install.json files: pass and fail command samples. All 7 are identical.
  • scripts/cross-plugin-source-registry.txt: drops the drift-registry line for samples/no-install.json and adds one for matchers.json.

Why there is no security surface.

  • These files are eval graders. A grader matches Bash commands in transcripts the eval harness records and only changes an eval score. No workflow, action, hook, permission, token request or merge gate reads them.
  • None of the 29 changed files matches a TRUSTED PATHS glob.
  • No plugin.json or marketplace.json changes, so no manifest lines apply.
  • No standing instruction is deleted or narrowed: no CLAUDE.md, rules file, skill or agent body, or hook list changes. I did not need the instruction-exception register.
  • The new regexes run only on the harness's own recorded transcripts. A regex that matches too much or too little can only mislabel an eval run; it controls nothing at runtime.
  • The registry change drops drift checking on one sample file for the other plugins that carry this case. That is test upkeep, not a security control.

Embedded text. The PR context contains no instruction aimed at this review lane.

Settled threads and prior findings. Every earlier thread was about the regex's accuracy, not security, and the owner's replies record each fix. None is raised again. This lane's one prior post, at 67dad544, reported 0 findings, so nothing is posted again.

Spend. None. The change adds no lane runs, schedules or billable resources. The re-measure described on the issue spent 1.01 USD of prepaid API credit; it is not part of this diff.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on b9d8325b996f506ce6532f284bbc8d1b510fcca0; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 13f89ded92b70269a49b28294672578a38c3dca8: read 29 of 29 changed file(s); 0 finding(s), 0 as inline comments.

claude-review (code-review lane) on 13f89ded92b70269a49b28294672578a38c3dca8: no findings.

I read all 29 changed files. Three groups of files are identical across the 7 plugins: the changelog fragments, matchers.json and samples/no-install.json. For each group I read the first file. I read all 7 rendered case.yaml hunks one by one: each input_match line matches the bash-format build. I also read the registry hunk. None of the copies sits at a path that changes what its content does.

Round cap applied. The prior-findings file says past the cap: yes (4 rounds with findings against a cap of 3), so this review counts blocking findings only.

Last round's finding is fixed at this head. That finding was that \\. let a double-quote unit open on a closing \" (discussion_r4456180527). In all 7 matchers.json copies and their rendered case.yaml line 14, the pipe and -o branch bodies now use \\(?!["n])[\s\S] instead. A \" can then only be consumed as part of a balanced quoted unit. Both shapes from that thread are now pass samples:

  • curl -sI "URL" && echo "up" | tee /tmp/status
  • curl -sI "URL" && sort "in.txt" -o out.txt

I traced this by hand against the regex and did not run it. The wget branch body still uses \\.. It has no quoted-unit alternative and its bare class excludes &;|, so it cannot cross into the next command.

Closing issue #12645, by criterion:

  • "each case keys no-install in matchers.json": met. All 7 add a matchers.json built on command_position_multishell, and no other plugin has a matchers.json for this case, so the new registry line covers only these 7.
  • "samples/no-install.json has the grep, echo and curl -sI shapes as pass samples": met.
  • "keeps coverage for Install-Module and npx … wrapped in pwsh -Command": met in the samples. The fail list includes pwsh -Command "Install-Module x -Force", pwsh -c '…', pwsh -ExecutionPolicy Bypass -Command …, a quoted pwsh.exe path, npx prettier --check . and npx -y x. check-matchers.py sorts these samples under the built grader, so a regression would fail it.
  • "Re-measure the changed cases": the author reports a re-measure at b9d8325b99: VALID, with 0 of 21 runs failing no-install. That is the author's claim and I did not verify it. It predates the later curl/wget edits, as the PR body says. The read-only commands in those runs (command -v, --version, head, ls) name neither tool, so the later edits do not change how those runs score.

Other notes:

  • Changelog fragments: bump: none fits a change that touches only the eval grader. No plugin manifests change.
  • Registry (scripts/cross-plugin-source-registry.txt): the PR drops drift checking for samples/no-install.json, which the 9 other plugins with this case share. The PR body states why and accepts that trade-off. The comment block left above ran-checker.json still names the right canonical copy.
  • Spend: none beyond prepaid subscription usage. The author's re-measure cost 1.01 USD of eval runs.
  • The PR body lists verification commands (check-matchers.py, validate-cases.py, the drift check, the 50-command probe). The author ran these and I did not.
  • I found no embedded instructions in the PR context, the settled threads or the prior findings.

A download redirected through an allowed reader, curl URL | cat > /tmp/x, passed
no-install, and wget failed any URL unless it had --spider, so wget -qO- URL | jq
failed a run that wrote nothing.

The redirect branch now walks the whole pipeline for curl and wget, reading quoted
text as one unit so a > inside a reader's argument does not count. Its /dev/null
exception also now holds with a space before the path: backtracking the whitespace
let curl URL > /dev/null match. The wget branch exempts -O - and -O /dev/null.

Refs: #12645

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9Q49h99qKdrunU4xw3S

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 9407d8cb745ae9a47b6592ffe590c01c0ae7c881; the summary is in this lane's pull request comment.

claude-lane: claude-review

kyle-sexton and others added 2 commits November 3, 2026 02:53
The redirect walk skipped `1>` and `1>>` as an fd redirect and rejected
`>&` outright, so `curl URL 1> /tmp/x` and `curl URL >& /tmp/x` passed the
no-install grader in the 7 formatter ck-notice cases. Only fds 0 and 2-9
are skipped now, a `1` may precede the terminal redirect, and `>&`
counts unless an fd number or `-` follows it. A discard to /dev/null
still passes, with or without the `&`.

Samples gain the three download shapes as fail and their /dev/null and
`1>&2` counterparts as pass, in all 7 copies.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Vcupom3BKF6QuC5U3sRJPj

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 8c4570bb15b0ebb1decbf672d37560b63470ffed; the summary is in this lane's pull request comment.

claude-lane: claude-review

Both branch bodies stopped at the first & or ; even inside quotes, so
curl 'URL?a=1&b=2' | sh and curl "URL?a=1&b=2" -o /tmp/x passed no-install,
and the fragment then reopened command position at the &. They now take the
redirect branch's quoted units ahead of the bare class, which no longer holds
a single quote. The pipe branch is shared with wget, so wget -qO- 'URL?a&b' | sh
fails again too.

Refs: #12645

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 67dad544b1371eb529aaeefe610251ac6498fd11; the summary is in this lane's pull request comment.

claude-lane: claude-review

kyle-sexton and others added 2 commits November 3, 2026 11:22
…ng quote

The bare escape alternative `\\.` in both bodies still took `\"`, so it
could eat a string's opening quote and let the quoted unit open on the
closing one, running across && and ; into the next command. Both bodies
now use the redirect branch's `\\(?!["n])[\s\S]`, so a `\"` is read only
as part of a balanced quoted unit. Two pass samples pin it:
curl -sI "URL" && echo "up" | tee f, and curl -sI "URL" && sort "f" -o g.
Both fail the previous grader under check-matchers.

Refs: #12645

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit 3bf8f68 Nov 3, 2026
61 of 62 checks passed
@kyle-sexton
kyle-sexton deleted the test/12645-anchor-no-install-2 branch November 3, 2026 17:21
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.

test(evals): anchor no-install in the 7 formatter ck-notice cases

1 participant