Skip to content

feat(evals): run no eval for an edit inside a skill's Next section - #18930

Merged
kyle-sexton merged 3 commits into
mainfrom
feat/evals-next-section-no-run
Nov 25, 2026
Merged

kyle-sexton merged 3 commits into
mainfrom
feat/evals-next-section-no-run

Conversation

@kyle-sexton

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

Copy link
Copy Markdown
Member

Closes #18948

Summary

docs/review/evals.md counted any removed or reworded SKILL.md text as a cut, so trimming a ## Next list owed a compare run. #18922's one-bullet trim selected 15 cases, 102 agent runs. A ## Next section is "a mention for the human, never an operative chain" (.claude/rules/skill-bodies-state-current-rules.md, "Successor sections"): it changes no tool call, so no deterministic grader can see the edit. The owner chose to make such edits no-run.

Fix

  • docs/review/evals.md: an edit inside a skill's ## Next section is not a cut.
  • select_mapping.py: classify_skill_md skips a -U0 hunk whose old lines sit wholly inside the base file's ## Next body; an edit elsewhere in the same file still counts.
  • reference/select.md: one added paragraph stating the class.
  • Changelog fragment for evals (minor).

Verification

Loosened checks

Related

🤖 Generated with Claude Code

@kyle-sexton
kyle-sexton marked this pull request as ready for review November 24, 2026 23:29
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 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-24T23:31:45.689760Z 697642d 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 24, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review needs no new review of 6664120064e5d08f466ee385ce690fd13ea8496c: no file of this pull request changed since the review of 697642d.

Security review: PR #18930

I found no security issues.

What the change does. The eval case selector no longer counts an edit inside a SKILL.md ## Next section as a "cut." It still counts edits anywhere else in the same file. The changes are:

  • select_mapping.py: adds _next_section_lines and a skip_old_ranges parameter to _diff_has_cut_hunks and diff_has_cut.
  • Two new tests.
  • A policy sentence in docs/review/evals.md, which is a trusted path.
  • A paragraph in reference/select.md.
  • A changelog fragment.

What I checked.

  • Trusted path (docs/review/evals.md). I read the whole change. It adds one sentence that exempts ## Next edits from the cut definition. It removes no existing rule and touches no trusted-actor list, token scope, kill switch or merge-hold module. Fewer eval runs lower test coverage for one class of prose edit. That is not a leak, a compromise or a charge.
  • Can the skip hide an operative edit? The skipped range comes from the base file: the lines after the ## Next heading up to the next ## heading. The heading line itself is outside the range. A hunk is skipped only when all of its old lines sit inside that range.
    • An edit that touches the heading or the next section still counts as a cut.
    • Text added under ## Next was already not a cut under the existing rule.
    • The new code reads no input from outside the repository and runs no shell command. Paths and the diff base go to git as before.
  • Injection or command surface. None was added. The parsing is pure Python over git diff -U0 output.
  • Instruction surface. No standing guardrail is removed. The rule that ## Next is a mention for the person and not an operative chain is cited, not changed.
  • PR context. I found no embedded instructions aimed at the review lane.

Spend. Fewer post-merge compare runs, which spend prepaid agent credit. Per the PR, #18922's trim drops from 102 agent runs to 0. Not a hold.

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

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

claude-review needs no new review of 6664120064e5d08f466ee385ce690fd13ea8496c: no file of this pull request changed since the review of 697642d.

Code review: PR #18930, Next-section edits run no eval

Change: classify_skill_md now skips a -U0 hunk when all of its old lines fall inside the base file's ## Next body. The diff also adds a matching sentence to docs/review/evals.md and reference/select.md, a minor changelog fragment for evals, and two tests.

Correctness: I found no defects in the new code.

  • Range: _next_section_lines returns a 1-based range that includes both ends. It runs from the line after the heading to the line before the next ## heading, or to the end of the file.
  • Edges stay cuts: a hunk that touches the heading itself, or runs past the section's end, still counts as a cut. So does removing the whole section.
  • Pure insertions: a hunk with old_count == 0 behaves as before.
  • Base revision: the range comes from the same merge_base text that fm_end already uses.
  • Heading match: the exact-heading match agrees with .claude/rules/skill-bodies-state-current-rules.md "Successor sections" ("The heading is exactly ## Next"). Every SKILL.md I checked has exactly one ^## Next$ line, so a lookalike heading inside a code fence can't move the range today.
  • Tests: the new tests cover both sides, an edit inside the section and an edit outside it. The author reports the test-run and select-cases.py results in the PR body; I did not run them.

Blocking: one loosened-check finding (inline on select_mapping.py). The eval selector now asks for no runs on edits it used to treat as cuts. That is a check's own code changed so it accepts more (kind 9). The PR body gives a reason (the owner's 2026-11-24 decision), but not in a ## Loosened checks section, and the PR closes no issue that could serve as the spec. The fix is to add that section to the PR body; no code change is needed.

Closing issue: none. The PR body says it has no related issue and rests on an owner decision recorded in a session, so I had no acceptance criteria to check against.

Settings this lane used: the prompt had no loosened_check_verdict: or loosened_check_patterns: lines, so I used fail and no consumer entries. It had no loosened_check_decision_record: line either, so the citation requirement was not checked.

Loosened checks would be marked: fail (lane default; no wrapper settings lines); patterns: 0

Verifier dropped 0 of 1 candidates.

@github-actions

Copy link
Copy Markdown
Contributor

The pr-verify verifier failed head 697642d57ac8a158c4f2a0ee71e411ddc35d03af. What it wrote, as data:

What it wrote (25 lines)
Summary: PR #18930 links no issue, so its spec is its own trusted body (`spec_kind` `pull-request`).
  The diff does what that body describes. The changes are in `docs/review/evals.md`, `select.md`,
  `select_mapping.py` and the changelog fragment. `select_mapping.py` now skips a `-U0` hunk whose
  old lines sit wholly inside the base file's `## Next` body. The line-range arithmetic is correct,
  and the heading and edits outside the section still count as cuts. Two new tests cover the no-run
  case and the still-cuts case. The Python and Bash test jobs on the judged head concluded success
  (e.g.
  https://github.com/melodic-software/claude-code-plugins/actions/runs/45510418071/job/138856992840).
  The blocker is that the change loosens a check: a reworded or removed SKILL.md line that used to
  count as a cut and owe a compare run now owes no eval run. A spec can ask for a weakened check
  only through a `closes` or `refs` issue that links the owner-decisions record line and quotes the
  owner after `verbatim:`. This spec is a pull-request body with no linked issue, and its paraphrase
  of a session decision does not meet that rule. The code is otherwise sound.
- plugins/evals/skills/plugin-eval/scripts/select_mapping.py:396 The `skip_old_ranges` exemption for
  `## Next` edits loosens the eval-run check: an edit that removes or rewords SKILL.md text no
  longer owes a compare run. Only a spec can authorize this. Open an issue that names this exemption
  and holds a line link to the owner's decision in the owner-decisions record
  (docs/owner-decisions.md#L<line>) and the owner's words after `verbatim:` in double quotes, then
  link it with `Closes #<n>`. Otherwise drop the exemption.
- docs/review/evals.md:20 The new sentence that a `## Next` edit is not a cut changes the review
  rule that defines when an eval run is owed. It needs the same owner-decision authorization as the
  selector change. Keep it only once a linked issue carries the record link and the verbatim quote.
- PR body cites the owner decision only as a paraphrased session quote ("Yes, let's go with
  recommendations there"), with no owner-decisions record line link. That does not authorize
  loosening a check. Link the issue described above instead of stating 'No related issue'.

This pull request leaves the merge queue, and ci-status holds it out while it carries pr-verify-failed. A pr-verify pass removes the label, at a new commit or at this same head: once a trusted person edits the body, and only trusted people have edited it since the fail, this head is judged again, so a fail on the body or the issues it links needs only the body fixed, no new commit.

@github-actions github-actions Bot added the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Nov 24, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

pr-unblock / address-feedback finished round 1 of max 4 on 697642d.

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this. label Nov 24, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

The pr-unblock lane stopped on this pull request and needs a person: an adjudicator found that a disputed review finding turns on what the change is meant to do, which a person decides.

Reason: intent

  • Reason: feedback-question-intent
  • Resume key: 697642d57ac8a158c4f2a0ee71e411ddc35d03af (the head the lane stopped on)

To resume, deal with the reason above, remove the needs-human label (and do-not-merge, if set), then dispatch the pr-unblock workflow with pr-number=18930 and activity=address-feedback:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=18930 -f activity=address-feedback

@kyle-sexton kyle-sexton removed the needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this. label Nov 25, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 25, 2026
@github-actions github-actions Bot removed the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Nov 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 25, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Unattended merge: risk HIGH at head 6664120064e5d08f466ee385ce690fd13ea8496c. Only LOW, or MED on class, size and reported review-finding reasons alone, merges without a human. This pull request waits for one.

HIGH security-finding: 1 open, evidence unbound
MED evidence-unbound:claude-review: not bound: lane-source-changed
MED evidence-unbound:claude-security-review: not bound: lane-source-changed

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 8519392 Nov 25, 2026
76 of 77 checks passed
@kyle-sexton
kyle-sexton deleted the feat/evals-next-section-no-run branch November 25, 2026 03:03
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 25, 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.

feat(evals): an edit inside a skill's Next section runs no eval

1 participant