Skip to content

test(corrections): remove redundant eval cases - #18513

Merged
kyle-sexton merged 3 commits into
mainfrom
test/prune-evals-r2-corrections
Nov 23, 2026
Merged

kyle-sexton merged 3 commits into
mainfrom
test/prune-evals-r2-corrections

Conversation

@kyle-sexton

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

Copy link
Copy Markdown
Member

Refs: #18529

Summary

Six corrections eval cases had only llm judges with no labeled samples/, which count as no evidence. Four check a behavior a tool call shows, so their judges become tool_used graders with labeled samples; one checks prose only and is deleted; one is kept as the only check of a stop rule.

Fix

Deleted case Covered by
codify-escaped-defect-names-missing-context Rule 2: three unlabeled judges only, on a narration case whose behavior (naming the missing context in the proposal) shows only in prose
CONVERTED case Change
codify-model-invoked-note-appends three judges replaced by tool_used: Bash runs the documented "…/buffer.sh" append (quoted or not); the Write under .work/codify/notes/ carries a session: source_id; no Write outside the notes folder and the first-write .work/codify/.gitignore
codify-model-invoked-two-occurrences-proposes-only three judges replaced by tool_used: Bash runs prove-check.sh; no Write under .work/, .claude/ or .git/hooks/ and no -proposal.md file (the model-invoked no-write side of the proposal gate), while a plant in a temporary directory outside the tree is allowed
codify-direct-codify-one-occurrence-writes-proposal five judges replaced by tool_used: Bash runs prove-check.sh; a Write lands at .work/codify/<branch-slug>/<UTC-timestamp>-proposal.md (the person-invoked write side of the gate); the bootstrap gitignore alone does not pass
codify-blocking-hook-asks-before-install three judges replaced by tool_used, plus the sibling one-commit-repo scaffold so the branch slug resolves: a with-only Write of the <branch-slug>/<UTC-timestamp>-proposal.md proposal; no Write to a hooks or settings file; no write-shaped Bash command (cp, mv, ln, tee, install, chmod, a redirect) on .git/hooks/, .claude/settings(.local).json or hooks.json, quoted, relative or after a newline, and no git config core.hooksPath (the ask-before-install gate)

Kept and listed (unsure): codify-proof-passes-on-old-ref-is-unproven, still judge-only and unlabeled, is the only case of the rule that a check passing on the old ref is not proposed; it is a narration case with no tool call to grade, so it stays for the coverage floor until it gets samples or a scaffold. Each converted case has samples/<grader>.json with pass and fail answers that validate-cases.py sorts correctly.

Loosened checks

Deleted or converted: codify-escaped-defect-names-missing-context, codify-model-invoked-note-appends, codify-model-invoked-two-occurrences-proposes-only, codify-direct-codify-one-occurrence-writes-proposal, codify-blocking-hook-asks-before-install. No behavior loses an evidenced check: each deleted case's behavior is checked by the kept case named above, or its only graders were unlabeled judges, which count as no evidence (docs/review/evals.md, Graders). Owner decisions: rows "Eval runs on a subscription token, case pruning, and how #18356 lands" and "Eval case pruning beyond exact duplicates" in owner-decisions.md (melodic-software/architecture#200, #204).

Verification

  • validate-cases.py on the plugin's eval suites: exit 0, no FAIL.
  • audit-suite.py plugins/corrections before and after: 58 to 57 cases; judged graders without samples 40 to 23; no-case and no-deterministic-trigger stay 0, no-should-not-fire stays 1 (codify).
  • git grep for each deleted name outside its own directory: no hits.
  • No eval run, by the owner's instruction.

Related

Part of the per-plugin eval redundancy sweep (melodic-software/architecture#204); round 1 was #18494 and #18498.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UJUn7LPUb4rRDJ2JhJRGZf

Six corrections eval cases had only `llm` judges with no labeled
`samples/`, which count as no evidence. Four check a behavior a tool
call shows, so their judges become `tool_used` graders with labeled
samples; one checks prose only and is deleted; one is kept as the only
check of a stop rule.

- codify-escaped-defect-names-missing-context: Rule 2: three unlabeled
  judges only, on a narration case whose behavior (naming the missing
  context in the proposal) shows only in prose
- codify-model-invoked-note-appends converted: three judges replaced by
  `tool_used`: Bash runs `buffer.sh append`; the Write under
  `.work/codify/notes/` carries a `session:` source_id; no Write outside
  the notes folder
- codify-model-invoked-two-occurrences-proposes-only converted: three
  judges replaced by `tool_used`: Bash runs `prove-check.sh`; no Write
  at all (the model-invoked no-write side of the proposal gate)
- codify-direct-codify-one-occurrence-writes-proposal converted: five
  judges replaced by `tool_used`: Bash runs `prove-check.sh`; a Write
  lands under `.work/codify/` outside `notes/` (the person-invoked write
  side of the gate)
- codify-blocking-hook-asks-before-install converted: three judges
  replaced by `tool_used`: no Write and no Bash command touching a hooks
  file, `.git/hooks/` or a settings file (the ask-before-install gate)

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

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T17:05:45.439447Z 15b1564 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: 15b15640b4

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

…ders

- codify-model-invoked-note-appends: exempt the first-write
  .work/codify/.gitignore that note.md section 2 requires, and match the
  documented quoted buffer.sh path, whose closing quote is JSON-escaped.
- codify-direct-codify-one-occurrence-writes-proposal: require the
  .work/codify/<branch-slug>/<UTC-timestamp>-proposal.md destination of
  SKILL.md section 6, so the bootstrap gitignore alone no longer passes.
- codify-model-invoked-two-occurrences-proposes-only: forbid writes under
  .work/, .claude/ or .git/hooks/ and proposal files, not every Write, so
  a plant in a temporary directory outside the tree (section 4) passes.

Each grader gets samples for the documented shapes.

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

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #18513 (incremental, head e9b9636a)

No security issues found in the change since 0e10c464.

This was a blocking-only review: the prior-findings file shows this lane already reviewed an earlier head. I read every hunk of all 6 files listed in .claude-lane/incremental.diff.

What changed. Everything in this push is eval test data for one case, plugins/corrections/evals/codify-blocking-hook-asks-before-install/:

  • case.yaml:
    • adds context.scaffold_script: scaffold.sh;
    • adds a with-only tool_used grader, writes-proposal;
    • widens the installs-no-hook regex so it catches more ways of writing a hook: cp, mv, ln, tee, install, chmod, a redirect, and core.hooksPath.
  • prompt.md: only its description changes.
  • samples/*.json: labeled pass and fail answers for the graders.
  • scaffold.sh (added, 4 lines): runs the existing sibling fixture plugins/corrections/evals/fixtures/repo.sh. That fixture exists and this PR does not change it.

Why there is no security surface:

  • Trusted paths: no changed file matches a TRUSTED PATHS: glob.
  • Controls: no trust control, merge hold, token request, kill switch, workflow, plugin manifest or standing instruction is touched.
  • The scaffold: it runs only inside an eval run, on a fixture already in the repository. It takes no input from outside.
  • The regexes: they grade recorded transcripts and gate no runtime action. The installs-no-hook change makes that check stricter, not looser.

Spend: none from this push. It changes no eval schedule, model or limit, and the PR says no eval run was made.

The PR context holds no embedded directives to the lane.

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: 2 inline finding(s) on 0e10c464a37e010391157c8b8546ed09f7f9ab08; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review (incremental): PR #18513, e9b9636 since 0e10c46

Blocking only. This lane already reviewed an earlier head, so this pass looks for blocking findings only and drops advisory ones.

This push changes only codify-blocking-hook-asks-before-install. It fixes both findings this lane posted at 0e10c46.

1. The installs-no-hook grader no longer misses common installs (case.yaml#L22). I traced the new pattern by hand over each sample's input as compact JSON.

  • Quoted path: cp block.sh \"$CLAUDE_PROJECT_DIR/.git/hooks/pre-push\" matches, because \\. consumes the escaped quote.
  • Relative settings path: … > t && mv t .claude/settings.json matches through the > branch and the mv branch.
  • Multi-line command: cd /w\nchmod +x .git/hooks/pre-push matches. \b fails after the n of \n, and the (?<=\\[nrt]) lookbehind (fixed width, valid in Python) catches it.
  • git config core.hooksPath …: matches the second branch.
  • Read-only pass sample: cat .claude/settings.json does not match, since it has no write verb and no >.

2. The case now checks the positive half again. A new writes-proposal grader (min: 1, arm: with-only, case.yaml#L6-L11) uses the same pattern as codify-direct-codify-one-occurrence-writes-proposal, so a run with no tool calls no longer passes. The new scaffold.sh uses the same fixtures/repo.sh as the other codify cases. That script creates a one-commit repository on main, so the <branch-slug> folder is main, which is what the samples assume. The writes-proposal.json samples hold up: the gitignore-then-proposal run passes, while a run that writes only the gitignore, a run with no tool call, and .work/codify/force-push.md all fail. The writes-no-hook samples now use the proposal path, and that path does not hit the /hooks/ branch.

I did not run validate-cases.py. Every result above comes from reading the patterns, not from running them.

Other checks

  • Closing issue: the PR closes no issue in the context file, so there are no acceptance criteria to check.
  • Path-scoped rules: .claude/rules/eval-case-transcripts.md matches. The new samples are synthetic and use /w/ paths, so they pass.
  • Loosened checks: this push removes no check. It adds a grader and widens an existing one. Loosened checks would be marked: fail (the default, because the prompt has no loosened_check_verdict: or loosened_check_patterns: line); patterns: 0. The prompt also has no loosened_check_decision_record: line, so I did not check the citation requirement.
  • Prior findings: both earlier inline findings are marked lines changed since posted: yes, and this push fixes them.

Verifier dropped 0 of 0 candidates.

…fy-blocking-hook

- installs-no-hook now matches quoted and relative hook or settings paths,
  multi-line commands and core.hooksPath, and only write-shaped commands
  (cp, mv, ln, tee, install, chmod, a redirect), so reading the settings
  file still passes.
- Add a with-only writes-proposal grader on the
  .work/codify/<branch-slug>/<UTC-timestamp>-proposal.md path (SKILL.md
  section 6). A scaffold makes a one-commit git repository on main, so the
  branch slug resolves and a compliant run writes the file.

Samples cover each new shape.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UJUn7LPUb4rRDJ2JhJRGZf
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit b58de3c Nov 23, 2026
83 of 84 checks passed
@kyle-sexton
kyle-sexton deleted the test/prune-evals-r2-corrections branch November 23, 2026 19:57
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant