Skip to content

test(rate-limit-guard): convert the eval suite to case.yaml - #12069

Merged
kyle-sexton merged 2 commits into
mainfrom
test/8635-convert-rate-limit-guard
Nov 1, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
test/8635-convert-rate-limit-guard

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #8635

Summary

The first slice-3 conversion under the owner's (c2) decision (8635#issuecomment-6560394961): rate-limit-guard's 5 eval cases move from skills/*/evals/evals.json to evals/<case>/case.yaml and prompt.md. The converted runs also showed the setup skill's text leaving the model to guess, so this tightens it.

Fix

  • 5 cases converted with the fixed converter (fix(evals): grant converted cases the tools their skill needs #11987): every case lists Bash where its skill needs it. setup-reads asks about another machine's snapshot, since the module writes a real one in the sandbox. setup-checks expectation 2 accepts UNKNOWN for an unrendered option, as setup/SKILL.md requires.
  • setup/SKILL.md:
    • every row is PASS, FAIL, INFO or UNKNOWN, and a check that cannot run here is UNKNOWN;
    • each FAIL gets exactly one remediation line;
    • every option stays its own row, even when all are UNKNOWN;
    • the module writes rate_limits only when its session sees subscription windows (hooks/register.tsx:538);
    • the hook source is read only for a finding no check step covers.
  • A rate-limit-guard changelog fragment.

Verification

claude plugin eval, each run judged VALID by run-validity.py, with 0 permission denials in the last two:

Run Cases With Without
smoke, --runs 1 all 5 0.88 0.60
--runs 3 setup-reads 1.00 0.56
--runs 3, after the last two sentences setup-checks 1.00 0.50

The earlier 3-run of the setup cases was INVALID: the model Grepped the plugin's hooks/ and lib/ because the skill told it to read the code, and the sandbox denied it. The final runs read no file under either. The noise report says "n too small to call" (1-2 cases per run), so these show no loss, not a measured gain.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits November 1, 2026 14:09
Move the 5 cases from skills/*/evals/evals.json to evals/<case>/ under
the owner's #8635 slice-3 decision (c2), and tighten setup's check text
where the converted runs showed the model guessing: row labels
(PASS/FAIL/INFO/UNKNOWN), one remediation line per FAIL, every option
its own row, when the module writes rate_limits, and reading the hook
source only for a finding no step covers.

Evidence (claude plugin eval, runs judged VALID by run-validity.py):
- smoke --runs 1: with 0.88, without 0.60
- setup-* --runs 3: setup-reads with 1.00, without 0.56
- setup-checks --runs 3 after the last two sentences: with 1.00,
  without 0.50

Refs: #8635

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 1, 2026 19:13
@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-01T19:14:49.557801Z f6c6092 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 reviewed f6c6092c0c1a587b3a675b8aa70f102981a16187: read 32 of 32 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #12069 (rate-limit-guard eval conversion)

No security issues found.

I read every hunk of all 32 changed files in .claude-lane/pr.diff.

What changed

  • 5 eval cases moved from skills/{check,setup}/evals/evals.json to evals/<case>/case.yaml, prompt.md and samples/*.json. These are test fixtures. Their allowed_tools: [Read, Glob, Grep, Skill, Bash] applies only to the eval harness run and grants installed users nothing.
  • A changelog fragment, .changes/rate-limit-guard/...md. This is data only.
  • Body edits to plugins/rate-limit-guard/skills/setup/SKILL.md. The frontmatter and the skill's tool grants are unchanged.

Instruction-surface lens (SKILL.md)

  • Softened: "read hooks/register.tsx / record-rate-limit-stop.sh when a finding depends on what they do" becomes "read them only for a finding no step covers." This limits optional source reading during a read-only diagnostic. It does not remove a guardrail. No action it used to prevent now goes unchecked.
  • Added: rows must be labelled PASS, FAIL, INFO or UNKNOWN, and each FAIL gets exactly one remediation line. Every option stays its own row, and the rate_limits absence row gets a clarification. All of this tightens or clarifies the report. check stays read-only, and the eval expectations still say "Modifies no file" and "never writes settings".
  • I consulted docs/contracts/instruction-exception-register/README.md. None of the removed or changed wording matches a protected consequence class.

Other checks

  • Trusted paths: no changed file matches a TRUSTED PATHS: glob.
  • Trust controls: none touched (no trusted-actor list, token, kill switch or merge hold).
  • Plugin manifests: no plugin.json or marketplace.json changed, so there are no manifest lines.
  • Actions: no workflow changes.
  • Embedded text: none found in the PR context or the eval prompts. The eval prompts are ordinary user requests ("Just install it for me" is a test that the skill refuses to install).
  • Prior findings: none (0 rounds before this one, cap 3, not past the cap).

critical-findings: 0

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

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

Code review: PR #12069, rate-limit-guard eval suite moved to case.yaml

No findings. I read every hunk of all 32 changed files.

Conversion

  • The 5 cases match the deleted evals.json entries one for one: prompt, expected output and expectations are all carried over.
  • Two cases were deliberately changed, and both changes match what the PR says:
    • setup-checks-without-touching-settings expectation 2 now accepts UNKNOWN. That matches setup/SKILL.md step 5's existing UNKNOWN rule for a literal ${user_config.*} token, and the new check-wide UNKNOWN rule.
    • setup-reads-absent-rate-limits-as-reactive-only now asks about another machine's snapshot, so the case no longer depends on what the sandbox session writes.
  • The skill-fired grader on check-hook-notice-runs-the-read-only-check targets a skill that the model can invoke (disable-model-invocation: false in check/SKILL.md), so it can pass. Its regex (?:rate-limit-guard:)?check" rejects check-other, which the fail samples cover.
  • The setup cases correctly have no skill-fired grader, because setup is disable-model-invocation: true. They load the skill by slash command instead.
  • Nothing else in plugins/rate-limit-guard refers to the deleted skills/*/evals/evals.json paths.
  • The samples/expectation-*.json files carry the converter's "confirm the label before calibrating" placeholder, which is expected output of the converter fixed in fix(evals): grant converted cases the tools their skill needs #11987.

setup/SKILL.md

  • The new claim that the module writes rate_limits only when its session sees subscription windows is correct. I checked it against hooks/register.tsx:538. The --preserve-key rate_limits write path (lib/write-snapshot.mjs:231) also stops a session with no windows from removing windows already on disk, so the INFO row's reasoning holds.
  • The new text describes this plugin's own code, not an upstream specific, so .claude/rules/skill-bodies-state-current-rules.md is not broken.
  • The PASS/FAIL/INFO/UNKNOWN labelling, the one remediation line per FAIL, and the rule that every option stays its own row do not conflict with steps 1–5.

Rules and criteria

  • .claude/rules/eval-case-transcripts.md: none of the new prompts or samples holds a session or product transcript, or a machine-specific path.
  • Closing issue: none. The PR body says only Refs: #8635, so there are no closing-issue criteria to check.
  • Plugin manifests: no plugin.json or marketplace.json change, so there are no manifest lines. The changelog fragment's bump: patch fits a test move plus a wording change to one skill's text.
  • No instructions embedded in the PR context, rules or prior-findings files tried to direct the lane.

Verification: the claude plugin eval scores and VALID verdicts in the PR body are the author's claims; I did not re-run them. This lane has no shell.

Spend: none at runtime. Re-running these eval cases uses prepaid model credit only.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 1, 2026
Merged via the queue into main with commit e09dba5 Nov 1, 2026
66 of 67 checks passed
@kyle-sexton
kyle-sexton deleted the test/8635-convert-rate-limit-guard branch November 1, 2026 19:23
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