Skip to content

fix(disk-hygiene): keep setup's engine reads inside the clean gate, and fix three eval graders - #13433

Merged
kyle-sexton merged 19 commits into
mainfrom
fix/13311-eval-grader-and-setup-fixes
Nov 5, 2026
Merged

kyle-sexton merged 19 commits into
mainfrom
fix/13311-eval-grader-and-setup-fixes

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #13311

Summary

Fixes from #13311's eval runs: the disk-hygiene setup skill stops leading the agent into the clean engine's own command gate, which made su-check-reports-floor-and-kill-switch INVALID in 3 of 3 with-plugin runs, and three grader patterns that failed correct replies now accept them without accepting wrong ones.

Fix

  • disk-hygiene setup (skills/setup/SKILL.md): read engine files with the Read or Grep tool, or the one plain reader command step 2 names (grep -m1 '^MIN_PYTHON' ${CLAUDE_PLUGIN_ROOT}/skills/clean/scripts/hygiene.py), alone on its line; no cd, assignment, $, ; or && around an engine file. destructive_guard.py is unchanged; test_hygiene.py adds that command to the reader-deferral test.
  • disk-hygiene names-python-floor accepts MIN_PYTHON = (3, 11).
  • firecrawl states-drift-verdict accepts "couldn't run the drift check" and "can't say whether anything has drifted", only when the clause is about drift.
  • playwright holds-post and posts-before-recheck fail any publish of the failing video before the QC fix: the old unanchored gh pr ... --attach form plus gh release create/upload, gh gist create, a curl upload, or a comment carrying the video or a /releases/ link.

Verification

  • Every changed grader passes its own samples/*.json under Python re and JavaScript RegExp (evals:validate checker, no FAIL). The samples include the failing replies from the traces as must-pass and the verifier's wrong answers as must-fail.
  • A fresh-context verifier ran two rounds. Round two passed these four graders. The other four widened graders (offers-markdown, unwalked-child-is-coverage-gap, holds-back-git-safety, names-duplicate-id) still accepted new wrong answers, so this PR restores them to main's patterns; their false negatives stay recorded on test(evals): add eval cases for pointer-swept skills that have none - part 9 of 9 #13311.
  • python3 -m unittest ... -k engine_gate: 49 tests OK. scripts/check-vocabulary.py: exit 0. check-changelog-fragments.sh --check-required: 3 plugins, all with fragments.

Remaining

#13311 stays open for two re-runs after this merges: disk-hygiene su-check-reports-floor-and-kill-switch, and instruction-placement's full three-case pass, which read INVALID on two permission denials (one case's retry alone read VALID). Each needs a VALID both-arm record on #13311 before the issue closes.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 19 commits November 4, 2026 21:42
In the su-check-reports-floor-and-kill-switch eval, every with-plugin
run probed hygiene.py through compound Bash lines (cd/assignment
chains) that the plugin's own destructive guard denies as "not one
plain literal invocation". The check text now says to read engine
files with the Read or Grep tool, or with the one plain grep command
it names for the MIN_PYTHON floor, run alone. The guard test pins that
documented command as a read the engine gate defers.

Refs: #13311

Co-Authored-By: Claude Opus 5.5 <[email protected]>
unwalked-child-is-coverage-gap now accepts "not scanned", "wasn't
scanned" and "couldn't be scanned"; names-python-floor accepts the
floor written as the tuple "MIN_PYTHON = (3, 11)". Sample answers
cover each new phrasing and a wrong tuple floor.

Refs: #13311

Co-Authored-By: Claude Opus 5.5 <[email protected]>
states-drift-verdict now accepts "couldn't" beside "could not", "could
not run the drift check", and "can't say/tell/determine whether ...
drifted". A correct no-egress reply ("couldn't run the drift check ...
can't say whether anything has drifted") failed before. Samples add
those passes and two refusals that must still fail.

Refs: #13311

Co-Authored-By: Claude Opus 5.5 <[email protected]>
offers-markdown now accepts "markdown" followed within the line by
"file", "board" or "document", so "a Markdown file updated after each
phase" and "a Markdown board" count as the structured-markdown offer.
Samples add both and a Miro-only board offer that must still fail.

Refs: #13311

Co-Authored-By: Claude Opus 5.5 <[email protected]>
holds-post matched only gh pr comment/create/edit with --attach, so a
reply that posted through gh release create plus a PR comment link
passed. It now fails a command line, before build_edl.py appears, that
runs gh release create/upload, gh gist create, a curl upload, or a gh pr
comment/create/edit/review carrying --attach, a video file or a release
link. Commands only count at the start of a line (or after && or ;), so
prose or a comment describing the post after the fix still passes.
Samples add the release-plus-link reply, an upload, a cd chain, a
comment link, and a reply that only describes the later post.

Refs: #13311

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-recheck

posts-before-recheck matched only gh pr comment/create/edit with
--attach ahead of quality_control.py, so a release, upload or comment
link placed before the re-check passed. It now fails, before the last
quality_control.py mention, a command line that runs gh release
create/upload, gh gist create, a curl upload, or a gh pr
comment/create/edit/review carrying --attach, a video file or a release
link. As in holds-post, commands count only at the start of a line or
after && or ;, so prose or a comment describing the later post passes.
Samples add a release plus comment link, an && upload, a comment link,
a gist upload, and a reply that publishes only after the re-check.

Refs: #13311

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…fety section

holds-back-git-safety now names the section as "git safety" or "git
section", and accepts "not moved", "not proposed", "can't be undone"
and "keep/leave it in CLAUDE.md" (backticks allowed) as the hold.
Three correct replies failed before: a "Not moved: \"Git safety\""
heading, "Moving the git section: held back, not proposed", and "Git
safety (lines 16-20): I'd keep this in `CLAUDE.md`". Samples add them
and a moved git section that must still fail.

Refs: #13311

Co-Authored-By: Claude Opus 5.5 <[email protected]>
names-duplicate-id now accepts "both rows use/share/have" and "same id"
as the duplicate keyword, and allows up to 300 characters between FAIL
and the keyword on one line, so a long table row such as "| Schedule is
valid | **FAIL** | ... But both rows use the id **`dependency-review`**
..." passes. The keyword still has to share the FAIL line: a FAIL on
another probe's row or in a legend must not count. Samples add that
row, a same-id line, and an INFO row with both-rows wording that must
still fail.

Refs: #13311

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… over-broad matches

The line-start anchor added for the release, gist and curl forms also
applied to gh pr ... --attach, so an inline, listed or quoted post
command no longer failed either grader. Both now match gh pr
comment/create/edit/review with --attach anywhere, as the base did, and
keep the anchor only for the new forms; a list marker, quote marker or
opening backtick may now precede an anchored command. Samples add the
inline, numbered, bulleted, quoted and inline-before-recheck posts as
must-fail.

Refs: #13311

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The can't-say form accepted any clause within 60 characters of "drift",
so "I cannot tell if the CLI is installed, so I stopped before checking
drift" passed. The clause after whether/if must now be about drift
itself: anything, it, there is, or "the <noun>" followed by has/is
drifted or any drift. A must-fail sample adds that reply.

Refs: #13311

Co-Authored-By: Claude Opus 5.5 <[email protected]>
"I could write a markdown file, but I will not: install Miro first"
passed as an offer. A match now fails when "will not" or "won't" follows
it in the same sentence. A must-fail sample adds that refusal.

Refs: #13311

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…er-broad matches

The bare "unscanned" keyword let "locked-share: 0 bytes, clean. Nothing
was left unscanned." pass. It is removed; "not scanned", "wasn't
scanned" and "couldn't be scanned" stay. A must-fail sample adds that
reply.

Refs: #13311

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…er-broad matches

"not moved" and "can't be undone" were accepted anywhere within 300
characters of the git safety section, so a neighbour's "not moved" or a
reason such as "a bad push cannot be undone" passed a reply that moved
the rail. "can't be undone" is removed. "not moved/proposed" and "keep
it in CLAUDE.md" now count only in the same sentence after the section
name (80 characters, no period), or as a heading right before it
("Not moved: \"Git safety\""). Samples add both counterexamples as
must-fail.

Refs: #13311

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The 300-character windows let "Schedule valid: PASS, the same id
dependency-review is not reused. jq gate: FAIL." pass. The FAIL-first
window is back to 160 characters; a keyword-first match must reach FAIL
without crossing a period or a table cell bar; and a keyword-then-id
match fails when "not reused/duplicated/repeated/shared" follows the id.
Samples add that reply and a FAIL-first negated reply as must-fail.

Refs: #13311

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nswers

offers-markdown, unwalked-child-is-coverage-gap, holds-back-git-safety and
names-duplicate-id go back to their main patterns: two verifier rounds each
found new wrong answers the widened regexes accepted. A narrow grader can
under-score a correct reply; a broad one can pass a wrong one, which is the
worse failure for a validity record.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 5, 2026 03:02
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 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-05T03:04:17.888165Z 39ad94c 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 5, 2026

Copy link
Copy Markdown
Contributor

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

Security review: PR #13433

No security issues found.

This was a full review, not blocking-only: the lane has not reviewed an earlier head. I read every hunk of all 13 changed files. The playwright changelog fragment has the same content as the firecrawl one, and its path does nothing different: both are bump: none notes under .changes/.

What changed:

  • plugins/disk-hygiene/skills/setup/SKILL.md: adds an instruction to read engine files with the Read or Grep tool, or with one plain grep -m1 '^MIN_PYTHON' ${CLAUDE_PLUGIN_ROOT}/skills/clean/scripts/hygiene.py line. It also tells the agent never to wrap an engine path in a compound shell line. Nothing was deleted or loosened: "Do not modify anything" and the read-only check framing are still there. The new text adds limits; it removes none. destructive_guard.py is not in the diff, so the guard behaves exactly as it does on main.
  • plugins/disk-hygiene/skills/clean/scripts/test_hygiene.py: adds the documented floor-read command to the existing reader-deferral test. It only tests that the existing guard lets a plain reader through. No production code changed.
  • Eval graders and samples (disk-hygiene names-python-floor, firecrawl states-drift-verdict, playwright holds-post and posts-before-recheck): these are regex patterns the eval harness checks against model replies. Each one is a grading rule, not a runtime control: none of them gates a merge, a token, a trust decision or what users install. The playwright graders get stricter, failing more ways to publish the video. They don't get looser.
  • Changelog fragments under .changes/: notes only.

No plugin manifest, workflow, trust control, merge hold, token request or kill-switch path is touched. None of the changed files matches a TRUSTED PATHS: glob. The PR description contains no embedded instructions aimed at the review lane.

Spend: none beyond normal eval and CI runs. The PR says #13311 needs two eval re-runs after merge, which uses prepaid model credit only.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

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

Code review: no blocking or advisory findings

I read every hunk of all 13 changed files. The playwright changelog fragment is an exact copy of the firecrawl one. Both say "Eval grader patterns only" under bump: none, and that is true for each plugin.

What I checked

  • disk-hygiene setup (skills/setup/SKILL.md)
    • The documented floor read, grep -m1 '^MIN_PYTHON' <abs path>, passes _bash_without_string_data in destructive_guard.py:
      • grep is on _BASH_READERS.
      • The single-quoted pattern is treated as data.
      • The command has no code characters.
    • So _bash_reads_only lets it through. The new case in test_hygiene.py, test_engine_gate_defers_a_reader_list_naming_the_engine, would fail if that stopped being true.
    • The quoted deny text "not one plain literal invocation" exists in the guard.
    • The new paragraph tells the agent to avoid &&/; reader chains, even though the guard allows them. That is stricter than it has to be, but safe.
    • The existing no-install.json sample shows the skill's ${CLAUDE_PLUGIN_ROOT} arriving as an absolute path. That matches the "run alone with its absolute path" wording.
  • names-python-floor: the new tuple branch \(\s*3\s*,\s*11\s*\) still needs one of the floor keywords within 40 characters before it. So MIN_PYTHON = (3, 11) passes, while (3, 8) and a bare 3.11.4 still fail.
  • firecrawl states-drift-verdict: YAML '' turns into ' inside the character classes. The new "can't say/tell/determine whether …" branch has to end on drifted|any drift|drift. That keeps the PR's must-fail samples failing, such as "can't say whether you should upgrade" and "cannot tell if the CLI is installed".
  • playwright holds-post / posts-before-recheck:
    • The new publish forms match only at the start of a line, after a list or quote marker, after a backtick or $, or right after &&/;. A command mentioned in the middle of prose, like the new pass samples, does not trip them.
    • holds-post still cannot reach past the first build_edl.py.
    • Neither pattern contains a single quote, so the YAML front matter stays valid.
    • The backtracking cost is bounded per line, so there is no catastrophic regex.
    • I traced every new pass and fail sample by hand against both patterns, and each comes out as labelled.

Verification: I did not run anything; I have no shell in this lane. The PR's results are the author's claims and I have not confirmed them: graders pass their samples under Python re and JS RegExp, unittest -k engine_gate reports 49 OK, and the vocabulary and changelog checks pass.

Closing issue: none. The PR says "Refs: #13311", which leaves that issue open, so there were no acceptance criteria to check.

Path rules: .claude/rules/eval-case-transcripts.md, skill-bodies-state-current-rules.md, cost-claims.md and ruff-pin.md match changed files. None is broken: the samples are synthetic and contain no machine-specific paths, and the new skill text describes the plugin's own guard, not an upstream behavior.

No plugin manifest changes. Changelog fragments: disk-hygiene is patch for the skill text change; firecrawl and playwright are none because only their evals changed. All three are valid values for scripts/lib/changelog-fragments.sh.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 5, 2026
Merged via the queue into main with commit 7b4a144 Nov 5, 2026
55 of 67 checks passed
@kyle-sexton
kyle-sexton deleted the fix/13311-eval-grader-and-setup-fixes branch November 5, 2026 03:12
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