Skip to content

test(harness-memory): add the audit C8 codify hand-off eval case - #17632

Merged
kyle-sexton merged 1 commit into
mainfrom
test/17200-harness-memory-codify-handoff-case
Nov 20, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
test/17200-harness-memory-codify-handoff-case

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #17200

Summary

Adds the harness-memory eval case that #17200 asks for under #17179: audit-c8-unchecked-rule-hands-to-codify. It loads a corrections stand-in plugin, in the shape of the harness-config cases from PR 17459, and grades that the audit's C8 check, as changed in PR 17210, hands a C8 instruction no check covers to /corrections:codify and names no mechanism itself.

The scenario is one CLAUDE.md line a machine could check ("Every shell script under scripts/ starts with set -euo pipefail"), which nothing checks today and which is no protected rail. The prompt loads the skill with the Skill tool, has it read reference/criteria.md C8 items 1 to 3, and asks for three filled lines: C8:, MOVE: and MECHANISM:. It does not name codify or corrections. The skill text is unchanged; this PR adds the case, its stand-in plugin and a bump: none changelog fragment.

The case grants Bash, unlike the performance and planning cases in PR 17628 and PR 17629. The audit skill has a pre-computed spine line, and the evals plugin's validity gate fails a run whose skill did not load because the case granted no Bash. The existing audit-c8-enforced-prose case grants Bash for the same reason. No run called Bash itself.

Fix

Graders, all deterministic:

  • c8-warn (both arms): the C8: line says warn. This is the no-loss check: item 2's WARN is unchanged by PR 17210.
  • move-hands-to-codify (both arms): the MOVE: line names corrections:codify. This is the discriminator.
  • mechanism-none (both arms): the MECHANISM: line says none. This checks that the audit picks no mechanism itself.
  • no-codify-run (with-only): no Skill call runs codify.
  • no-unavailable-claim (both arms): the MOVE: line does not call codify unavailable.

No llm grader.

Before-text check, judged by reading the text (no before arm was run). Before PR 17210, C8 item 1 listed six mechanisms (a compiler setting, a static-analyzer or linter rule, an architecture test, a pre-commit or pre-push git hook, a CI gate, a Claude Code hook), and item 3 said "Include which enforcement level it could move to". It named no codify. A faithful reply's MOVE: line names a level from that list, so it fails move-hands-to-codify, and its MECHANISM: line names that level, so it fails mechanism-none. Samples of both shapes are among the graders' must-fail samples. c8-warn passes on both texts.

Verification

  • validate-cases.py over plugins/harness-memory/evals: no FAIL. The new case's one WARN, that Bash needs an --allow-tools grant, is the one every Bash-granting case in the suite carries. Its deterministic graders were checked offline against the case's samples/.
  • scripts/check-affected.sh: 18 passed, 2 skipped (no changed shell or Python).
  • Smoke run on main's skill text, claude plugin eval on Claude Code 2.1.329, model sonnet, 3 runs a side, this case only, with --allow-tools Bash. The validity gate read VALID: no denied tool call, no skill load failure, and every with-arm run loaded the plugin and the stand-in. Its two warnings: no grader checks that the skill fired, and no judge was recorded (the case has no judge grader).
    • With the plugin, score 1.00: c8-warn 3/3, move-hands-to-codify 3/3, mechanism-none 3/3, no-codify-run 3/3, no-unavailable-claim 3/3.
    • Without the plugin, score 0.42: c8-warn 0/3, move-hands-to-codify 0/3, mechanism-none 2/3, no-unavailable-claim 3/3. The without-arm replies say the skill could not load and fill the lines with "unknown"; two of them wrote none on the MECHANISM: line.
    • One with-arm reply, read in full: it loads harness-memory:audit, reads criteria.md, and ends C8: warn, MOVE: Hand it to /corrections:codify, which picks the strongest enforcement-ladder rung ..., MECHANISM: none.
    • Cost reported by the tool: 0.54 USD (list-price estimate).
    • The run used a copy of the plugin outside any git repository, the route the evals plugin documents for the CLI's linked-worktree refusal.
  • Not run: a before arm on the pre-PR-17210 text, and the opus alias.

Related

Remaining

#17200 stays open. This PR delivers the eval-case item of the #17179 entry. Not part of this PR: that entry's PR-body quote item, and the entry's run budget beyond this smoke run (before and after, both aliases). The other entries' host steps remain as the issue lists them.

🤖 Generated with Claude Code

Adds audit-c8-unchecked-rule-hands-to-codify for issue 17200's host
step under issue 17179. The case loads a corrections stand-in and checks
that the audit's C8 check warns on a CLAUDE.md line no check covers and
hands the choice of mechanism to /corrections:codify, naming no
mechanism itself, without running codify or calling it unavailable. The
skill text is unchanged.

Refs: #17200

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KeBVgf4hSWe3ViMaDA9Fp9
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 20, 2026 15:01
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 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-20T15:03:40.969805Z 61e13bc 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

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-refine/fix-docs
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 44759250425

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

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

claude-lane: claude-security-review

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 61e13bc72b1c00778a1678f9be0c725beb21cfbd: read 10 of 10 changed file(s); 2 finding(s), 2 as inline comments.

Security review: PR #17632 (full review, head 61e13bc)

I found no exploitable security issue. The pull request adds one eval case for harness-memory and a bump: none changelog fragment. The case contains:

  • case.yaml with regex and tool_used graders
  • prompt.md
  • a grader samples/ set
  • a stand-in corrections plugin: a plugin.json and a prose-only skills/codify/SKILL.md

It changes no workflow, script, trust control, merge hold, token request, kill switch or marketplace.json. It deletes or softens no standing instruction. The stand-in SKILL.md is new prose that tells the stand-in to propose only and edit nothing.

The stand-in's plugin.json is new. It has no hooks, mcpServers, lspServers, monitors, channels, dependencies or userConfig, so it loads no code and starts no server. It is not listed in marketplace.json. It is loaded only when an eval run names it in plugins: ["../..", "corrections-stub"] (prompt.md#L3). Under the default-deny rule for manifests, its added name and version fields still have to be flagged. Both flags are IMPORTANT, not CRITICAL: neither field installs or runs code for existing users on update. They are the two inline comments.

The eval grants Bash (prompt.md#L7). That grant applies only inside an eval session run on demand against a fixed prompt, with no untrusted input.

Spend: each run of this eval case uses prepaid API credit or subscription usage (3 runs per arm, max_turns: 12). This is not a hold.

I found no embedded instructions in the PR context.

Manifest lines (3)
  • manifest name: flag, the added stand-in manifest plugins/harness-memory/evals/audit-c8-unchecked-rule-hands-to-codify/corrections-stub/.claude-plugin/plugin.json declares plugin name corrections, the same name as the real corrections plugin. Nothing runs from it: it has no hooks or servers, and it is loaded only when an eval run lists it.
  • manifest version: flag, the field is added (0.0.0) on a new eval-only manifest. It is not a change to an existing version, and it carries nothing users install on update.
  • manifest description: pass

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

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

Code review: no findings

I read all 10 changed files in full. The PR adds one eval case, audit-c8-unchecked-rule-hands-to-codify, plus its corrections-stub stand-in plugin, five grader sample files and a bump: none changelog fragment. No skill text changes.

What I checked:

  • Premise. The case tests behaviour the audit skill already has. criteria.md L302-L307 (C8 item 3) hands the mechanism choice to /corrections:codify when that skill is available, else uses a fallback. That is what the move-hands-to-codify and mechanism-none graders check for.
  • Grader patterns. They match the existing codify hand-off cases. The no-codify-run input_match and the no-unavailable-claim regex are the same patterns as in harness-config/evals/ai-must-always-rule-hands-to-codify/case.yaml, with PROPOSAL: replaced by MOVE:. plugins: ["../..", "corrections-stub"] follows the convention used in the other stub cases.
  • Samples. I traced every pass and fail sample by hand against its grader's regex, including the bold-label and capitalised variants and the "codify mentioned only outside the MOVE line" failure. Each sample gives the result it is labelled with. I did not run the graders; this was a manual trace.
  • Bash grant. The justification for granting Bash (the skill's pre-computed spine line) matches the existing audit-c8-enforced-prose case.
  • Author's verification. The PR's smoke-run scores (with plugin 1.00, without 0.42), its validate-cases.py run and its check-affected.sh run are author-claimed and unverified. I did not run them.

Other checks:

  • Closing issue. None: the PR only references chore: run the host steps for the nine #16029 follow-ons #17200 ("Refs"), so there are no closing-issue criteria to check.
  • Embedded instructions. No embedded directives in the PR context.
  • Loosened checks. This change loosens no check. The prompt carried no loosened_check_verdict: or loosened_check_patterns: lines, so I used fail and no consumer entries. It also carried no loosened_check_decision_record: line, so the citation requirement was not checked. Loosened checks would be marked: fail (default); patterns: 0.
  • Spend. The new case spends prepaid API credit or subscription usage on eval runs: 3 runs per arm, up to 12 turns each, when the suite runs. This is not a hold.
Advisory and manifest lines (2)
  • manifest description: pass. The new corrections-stub/.claude-plugin/plugin.json is an eval-only stand-in, and its description says what it provides.
  • manifest version: pass. The stub is not a released plugin, and the changelog fragment's bump: none fits a change that only adds an eval case.

Verifier dropped 0 of 0 candidates.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit c96dcfa Nov 20, 2026
84 checks passed
@kyle-sexton
kyle-sexton deleted the test/17200-harness-memory-codify-handoff-case branch November 20, 2026 15:38
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 20, 2026
@kyle-sexton

Copy link
Copy Markdown
Member Author

Eval of case audit-c8-unchecked-rule-hands-to-codify (#17179, skill change PR 17210), sonnet (served as claude-sonnet-5-5), 3 runs a side, Claude Code 2.1.329, --allow-tools Bash. Verdict: no loss, with a detection signal.

Grader BEFORE AFTER
c8-warn 3/3 3/3
move-hands-to-codify 0/3 3/3
mechanism-none 1/3 3/3
no-codify-run 3/3 3/3
no-unavailable-claim 3/3 3/3
Case mean 0.67 1.00
  • Loss rule (mean drop of 0.15 or more, or a grader passing 2 or more fewer runs AFTER): no loss. Detection signal: move-hands-to-codify 3/3 AFTER against 0/3 BEFORE, and mechanism-none 3/3 against 1/3. Every BEFORE MOVE: line names a level from the pre-change list ("a pre-commit git hook ... with a CI gate as backstop", "a pre-commit/pre-push hook or CI gate") and none names codify. Two BEFORE MECHANISM: lines name that level; the third wrote none (the audit lists generic options ... but names no specific mechanism), so mechanism-none passed it while its MOVE: line still picked a level.
  • Cost (list-price estimate from the result JSON): BEFORE 0.392 USD. The recorded PR 17632 run reported 0.54 USD for both of its arms (with and without plugin).
  • Limits: the arms were not interleaved; AFTER is the with-arm of an earlier default-ablation launch on the same Claude Code version.
  • Not run: the opus alias (the budget runs opus only to confirm a sonnet loss).

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