Skip to content

test(harness-config): judge the formatter-hook case's light-level replies by their stated lean - #16396

Merged
kyle-sexton merged 2 commits into
mainfrom
fix/16324-posttooluse-grader-light
Nov 15, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
fix/16324-posttooluse-grader-light

Conversation

@kyle-sexton

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

Copy link
Copy Markdown
Member

Closes #16324

Summary

The posttooluse-not-a-gate judge in ag-formatter-already-enforced asked for a REJECT or CONDITIONAL verdict. The skill does not allow either verdict at verification level light or off. Every recorded reply ran at light, so the judge had nothing defined to grade, and it split replies of the same shape. In the #16078 compare, Sonnet passed 6 of 6 runs before and 2 of 6 after.

Fix

  • plugins/harness-config/evals/ag-formatter-already-enforced/case.yaml: the criteria now read a light-level reply's stated lean on the proposed hook as its verdict ("leans REJECT", "malformed, don't add", and similar wordings). A reply passes if its lean is against adding the hook, or is a CONDITIONAL that moves the check to a pre-commit hook, a pre-push hook or CI. It must also cite pre-commit and CI, and must not say PostToolUse can block the edit. A reply fails if it offers any per-edit PostToolUse hook as fitting. A separate, optional format-only PostToolBatch candidate does not fail it.
    Basis: plugins/harness-config/skills/audit-automation-gaps/SKILL.md:213-217 says that under light and off each candidate is listed as unverified, never PASS, CONDITIONAL or REJECT.
  • samples/posttooluse-not-a-gate.json: the 12 recorded Sonnet replies from the Release enforcement ladder 3.0.0 with the verification tier and capability-named rungs - part 2 of 2 #16078 compare are added as calibration samples, next to the 5 existing ones. Three independent labellers agreed on every label: PASS for all 6 BEFORE runs and for AFTER runs 1, 2, 4, 5 and 6. FAIL for AFTER run 3, which offers PostToolUse with if: Edit(*.py) as a fitting candidate. No reply contains a machine-specific absolute path.
  • A bump: none changelog fragment, because only an eval grader changed.

Verification

  • validate-cases.py plugins/harness-config/evals: 0 FAIL. The only WARNs are the ones already on main (case allowed_tools, and llm samples needing calibration).
  • scripts/check-affected.sh --no-fetch: 15 passed, 3 skipped.
  • Judge calibration (calibrate-judge.py, judge claude-opus-5-5, --runs 3, --threshold 0), in two runs because the first stopped at its 3 USD ceiling: samples 1-8 agreement 23/23 runs (100.0%) over 8 samples, then the other 9 (all 4 must-fail samples, including AFTER run 3, and 5 must-pass) agreement 26/26 runs (100.0%) over 9 samples. Together 49/49 judged runs (100%) over all 17 samples, against the 90% bar; no false pass and no false fail. Two runs were not counted: one skipped at the first run's ceiling, one whose trace did not reproduce its sample (that sample keeps 2 counted runs). Billed about 6.18 USD (judge included once).

Eval record (eval-16324)

Versions. AFTER is this head, b4f76ee8ae (ladder blob 025a6324, enforcement-ladder: 3.0.0). BEFORE is the same tree with only skills/audit-automation-gaps/context/enforcement-ladder.md replaced from a3aa9007^ (blob 6f6d34e5, 2.1.1). Right before batch 1, diff -rq of the two copies printed only that file's line, as registered. Claude Code 2.1.325 on both sides. The validator gave 0 FAIL on both sides; its WARNs are the allowed_tools grants (answered by --allow-tools Bash Write Edit WebFetch) and the calibration note.

Registration, frozen from batch 1, with no reruns:

  • One case on Sonnet, 12 runs per side, judge claude-opus-5-5, with at least 8 counted runs per side.
  • Pass rule 2: AFTER posttooluse-not-a-gate passes at least BEFORE's passes minus 2, over counted runs.
  • Every other grader is reported, and any lower AFTER count is named.
  • A run counts as fired when its reply carries the skill's verification-level line (owner Q160 (a)). Both readings, all counted and fired-only, are reported.

Calibration (carried). The judge agreed on 49 of 49 judged runs over 17 samples (see Verification above). Owner Q181 (a) requires this statement: the posttooluse-not-a-gate criterion was rewritten after reading the 12 #16078 Sonnet replies it is now calibrated on, so its pass is not independent of those replies. The compare's 24 runs are new.

Validity. Both files are VALID. 12 of 12 runs were counted on each side, with 0 denials and 0 exclusions. The trace greps found shim, permission-check, limit, leak-read and other-side at 0 on both sides. command not found came up in 9 runs per side, only for ruff, uv and uvx, which are registered as never voiding. check.py read CONTINUE after both batches, and no stop fired. The cap test read 3.21 + 5.42 = 8.63 against 15.00.

Fired: BEFORE 10 of 12 (runs 5 and 11 carry no level line), AFTER 12 of 12.

Grader BEFORE (all counted) AFTER (all counted) BEFORE (fired-only) AFTER (fired-only)
posttooluse-not-a-gate 12/12 10/12 (lower) 10/10 10/12
already-enforced 11/12 12/12 9/10 12/12
names-precommit 12/12 12/12 10/10 12/12
no-automation-write 12/12 12/12 10/10 12/12
no-automation-edit 12/12 12/12 10/10 12/12
  • Rule 2: MET on both readings. AFTER 10 against BEFORE 12 - 2 = 10 (all counted), and 10 against 10 - 2 = 8 (fired-only).
  • Lower AFTER count: posttooluse-not-a-gate, by 2.
  • ladder-read: BEFORE 7 of 12, AFTER 5 of 12.
  • Votes. Every run's three votes were unanimous. The two AFTER FAILs (runs 3 and 8) were FAIL FAIL FAIL. BEFORE run 12's already-enforced FAIL is a regex grader.

Hand read of the failing replies. Both FAILs follow the criterion's own text: it fails a reply that "offers any per-edit PostToolUse hook ... as fitting".

  • AFTER run 3 says the hook "probably isn't worth adding as written", then offers ruff format "from PostToolBatch ... or from async PostToolUse".
  • AFTER run 8 says the evidence "points against it as written", then says the rubric allows ruff format "as a PostToolUse rewrite".

Q181 (a) count. These are replies whose verdict on the proposed hook leans against it and never uses the word REJECT, read by hand per side out of 12. The light-level boilerplate and REJECT on other candidates are ignored, as registered.

  • Counting lowercase "reject"/"rejected" as the word: BEFORE 3 (runs 6, 11, 12), AFTER 7 (runs 2, 3, 5, 7, 8, 9, 11).
  • Counting only uppercase REJECT: BEFORE 5 (adding runs 3, "would be rejected", and 10, "malformed, not rejected"), AFTER 8 (adding run 12, "leans toward reject").
  • Every reply on both sides leans against the proposed hook. AFTER replies drop the word more often, which is the shape the rewritten criterion lets pass.

Judge reasons are not kept by the tool. A grader's explanation holds only the vote tally ("judge votes: FAIL FAIL FAIL"), judgeVotes holds the votes, and evidence holds the reply. This settles #16324's second done-when item ("or the record states why they cannot be").

Cost and time. Billed 6.30 USD (BEFORE 3.21, AFTER 3.09) against 6.41 expected and 10.85 worst, with the judge counted once. Wall time was 348 s and 321 s, against about 7.7 min expected per batch.

Verdict: MET. The calibrated grader shows no loss, so #16324's fourth done-when item (change the ladder text and repeat) does not apply.

Remaining

None for #16324. #16078 closes on this record (owner Q171 (a)).

Related

session: GitHub Support

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits November 15, 2026 11:25
…lies by their stated lean

The posttooluse-not-a-gate criteria demanded a REJECT or CONDITIONAL
verdict, which audit-automation-gaps forbids at verification light and
off, where every candidate is listed as unverified. Read such a reply's
stated lean on the proposed hook as its verdict, and fail any per-edit
PostToolUse hook offered as fitting.

Add the 12 recorded Sonnet replies from the ladder 2.1.1 and 3.0.0
compare as calibration samples, labelled by three independent labellers.

Refs: #16324

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 15, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 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-15T17:24:42.865198Z b4f76ee PR opened
ℹ️ 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

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

Code review: no findings

This pull request changes only an eval grader. It rewrites the posttooluse-not-a-gate criteria in ag-formatter-already-enforced/case.yaml, adds 12 recorded Sonnet replies as calibration samples (11 pass, 1 fail), and adds a bump: none changelog fragment. I read every hunk of all 3 changed files.

What I checked

  • The reason for the change holds. plugins/harness-config/skills/audit-automation-gaps/SKILL.md:213-217 says that under light and off every candidate is listed as unverified, never PASS, CONDITIONAL or REJECT. The old criteria demanded a REJECT or CONDITIONAL verdict, which a light-level reply can never give. The new criteria judge the reply's stated lean instead, which matches the skill. (SKILL.md#L213-L217)
  • Each sample's label matches the new criteria, by my reading of the text.
    • All 11 new pass samples lean against the proposed per-edit hook and cite both .pre-commit-config.yaml and the CI workflow.
    • None of them says PostToolUse can block the edit.
    • Where they offer an optional formatter, it is on PostToolBatch, which the new carve-out allows.
    • The new fail sample (ladder 3.0.0, run 3) offers PostToolUse with if: Edit(*.py) as a fitting candidate. That is exactly what the new FAIL clause names.
    • The samples file holds 17 answers: 13 pass and 4 fail. That matches the 17 samples the description reports.
  • The changelog fragment is valid. bump: none with a one-line reason passes the rule in scripts/lib/changelog-fragments.sh, and no shipped plugin behaviour changes.
  • The PR context file held no embedded instructions. The PR only refers to fix(harness-config): ag-formatter-already-enforced reads a loss on Sonnet under ladder 3.0.0 on an uncalibrated judge grader #16324 and closes no issue, so there were no acceptance criteria to check.
  • No manifest checks applied. No plugin.json or marketplace.json changed.

Not verified: the validator, check-affected and judge-calibration results (49/49 agreement) come from the author and I did not reproduce them; this lane has no shell.

Spend: none from this change; it edits grader text and samples only. The author's calibration runs billed about 6.18 USD of judge API credit, which is prepaid usage, not a hold.

Verifier dropped 0 of 0 candidates.

@github-actions

Copy link
Copy Markdown
Contributor

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

Security review: PR #16396 (head b4f76ee)

No security issues found.

What changed. All three files are eval or changelog data under plugins/harness-config and .changes/:

  • .changes/harness-config/fix-16324-posttooluse-grader-light-077c2d04.md: a new bump: none changelog fragment.
  • plugins/harness-config/evals/ag-formatter-already-enforced/case.yaml: only the criteria text of the posttooluse-not-a-gate LLM grader changed. The grader's type and the other graders are unchanged. The no-automation-write grader, a tool_used check on Write, is still in place.
  • plugins/harness-config/evals/ag-formatter-already-enforced/samples/posttooluse-not-a-gate.json: 11 recorded replies added as must-pass samples and 1 as a must-fail sample. All are prose in JSON strings.

Checks run:

  • Trusted paths: no changed file matches a TRUSTED PATHS glob.
  • Plugin manifests: no .claude-plugin/plugin.json or marketplace.json changed, so there are no manifest lines.
  • Trust controls: nothing in the diff touches the trusted-trigger check, the lane token request or broker, the kill switch, merge holds or any action under .github/actions/.
  • Instruction surface: no standing instruction is deleted, narrowed or softened. The changed text is a grader's pass/fail criteria for one eval case. It is not a rule, a hook list or a skill or agent body that governs a session.
  • Embedded text: the added sample replies are model output the judge grades. None of them tells the review lane to pass the PR, skip a check, drop a finding or post anywhere. The PR description has no such text either.
  • Secrets and paths: the samples hold no tokens, secrets or credentials. As the PR states, they hold no machine-specific absolute paths.

Spend (not a finding): the change adds no billed resource or paid plan. Running the eval or judge calibration over the larger sample set uses prepaid API credit only. The PR reports about 6.18 USD for its own calibration run.

critical-findings: 0

@kyle-sexton kyle-sexton removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 15, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 3f2269a Nov 15, 2026
119 of 123 checks passed
@kyle-sexton
kyle-sexton deleted the fix/16324-posttooluse-grader-light branch November 15, 2026 19:18
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 15, 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.

fix(harness-config): ag-formatter-already-enforced reads a loss on Sonnet under ladder 3.0.0 on an uncalibrated judge grader

1 participant