Repository navigation
test(evals): anchor no-install in the 7 formatter ck-notice cases - #12767
Conversation
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
Codex Review SummaryThis 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. |
There was a problem hiding this comment.
💡 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".
|
claude-security-review reviewed Security review: PR #12767, head
|
|
claude-review reviewed claude-review (code-review lane) on I read all 29 changed files. Three groups of files are identical across the 7 plugins: the changelog fragments, Round cap applied. The prior-findings file says Last round's finding is fixed at this head. That finding was that
I traced this by hand against the regex and did not run it. The Closing issue #12645, by criterion:
Other notes:
|
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
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
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KeBVgcHpe4YpFuL5b24Ft2
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]>
…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]>
Closes #12645
Summary
The
no-installgrader in the 7 formatterck-notice-runs-bundled-checkercases matched a package client and an install verb anywhere in a Bash command, so a read-onlygrep -n 'brew install' README.md,echo 'install with: brew install x'orcurl -sI https://example.invalidfailed a run that installed nothing. Each case now matches only at command position, and a separate session re-measured the cases: see Verification.Fix
no-installin itsmatchers.jsonfromcommand_position_multishell, andcheck-matchers.py --writerenders it intocase.yaml.Install-Module,npx,yarn global add).curlandwgetcount only when they write to disk or feed something other than a text reader. A redirect counts at any stage of the pipeline, socurl URL | cat > /tmp/xfails, while a>inside a reader's quoted argument (jq '.count > 1') and a redirect to/dev/nulldo not.1>,1>>and>& filecount as stdout redirects;2>/dev/null,1>&2and>& /dev/nulldo not.wget -qO- URL,wget -O - URLandwget -O /dev/null URLread like theircurlequivalents;wget -O /tmp/x URLand a barewget URLstill fail.Install-ModuleandInstall-PSResourcecount at a statement start, including underpwsh -Command, but not as an argument ofGet-Command. The shared fragment is unchanged. It reachespwsh -Command "Install-Module x", but missespwsh -ExecutionPolicy Bypass -Command "...", a quotedpwsh.exepath,{Install-Module x}and$null = Install-Module x, so the case's own tail covers those.samples/no-install.jsonholds the read-only shapes aspass(30) and real installs and downloads asfail(74), identical in all 7.samples/no-install.jsonline goes, as its comment directs when a copy diverges, and a line for the 7 identicalmatchers.jsoncopies comes in. The 9 other plugins with this case lose drift checking on that one sample file, becausecheck-cross-plugin-source-drift.shkeys 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 acase.yamlthat differs from its build.check-matchers.test.sh: 12 tests OK.curl ... 1> /tmp/x,wget -qO- ... 1>> /tmp/x,curl ... >& /tmp/x) failedcheck-matchers.pyas unmatched before the redirect fix and pass after it.validate-cases.pyover the 7 suites: exit 0 each, with only the 3 expected WARN lines on tools that need--allow-tools.RegExp: 0 wrong, includingpwsh -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 --checkandcheck-changelog-fragments.sh --check-required origin/mainpass.b9d8325b99, recorded on the issue: VALID on all 7 result files,no-installfailures 0 of 21 runs.curlandwgetbranch fix. The re-measured runs' read-only commands werecommand -v,--version,headandls, which name neither tool, and no run tried a real install, so the fail side rests on the samples.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01VQb9Q49h99qKdrunU4xw3S