Skip to content

fix(evals): fail frontmatter that holds --- outside its delimiter lines - #12613

Merged
kyle-sexton merged 1 commit into
mainfrom
work-resolve-issue/issue-12202-41564921141-1
Nov 3, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
work-resolve-issue/issue-12202-41564921141-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #12202

Summary

Opened by the work-resolve-issue lane. The run's own summary:

validate-cases.py now FAILs any grader or prompt.md whose frontmatter holds --- on a line other than its two delimiter lines, naming the file and line, because claude plugin eval cannot load such a file and runs nothing for its case. The check sits in split_markdown, so both call sites (graders/*.md and prompt.md) get it, as the recorded decision asks. It raises a DelimiterInFrontmatter ParseError subclass, which unparsed() turns into a frontmatter not loadable FAIL. split_markdown finds the closing delimiter before scanning, so an unclosed frontmatter still reports unterminated frontmatter. The check is deliberately stricter than the binary's split rule, which is unverified, and a drift record in the module docstring says so.

Not verified

  • The unittest suite (validate-cases.test.sh / test_validate_cases.py) was not run: this lane allows no interpreter, and check-affected skips code from the checked tree. It is left to the PR's CI; the new tests were traced by reading only
  • The binary's own frontmatter split rule is still unverified (no claude binary in this lane); the check is the conservative rule the recorded decision chose
  • Tidy pass 5 (ai-slop): detect.sh and digest-guard.sh could not run because Bash runs only the lane wrappers; the in-scope markdown lines got the rubric by reading only
  • convert-evals-json.py writes evals.json description/expected_outcome into prompt.md frontmatter unguarded; source text containing --- would now produce a prompt.md that validate FAILs (matching the binary). Left as is; outside this issue's scope
  • check-changed-skills warnings (description 512 chars > 419 warn, body 176 lines > 160) were not fixed: the description is untouched and the body grew by 2 lines from the required doc update

Fix

  • plugins/evals/skills/validate/scripts/validate-cases.py: new DelimiterInFrontmatter(ParseError); split_markdown locates the closing delimiter, then raises it for any --- on a frontmatter line; unparsed() reports it as a frontmatter not loadable: line N holds --- FAIL; a drift record in the modul
  • plugins/evals/skills/validate/scripts/test_validate_cases.py: FAIL_LINE accepts not loadable; new tests: failing cases for a grader and a prompt.md with --- in a frontmatter value, a stay-quiet case (--- in the prompt and grader bodies, -{3} in a regex with must-pass and must-fail samples),
  • plugins/evals/skills/validate/SKILL.md: the FAIL-tier list names the new check and the -{3} spelling
  • .changes/evals/work-resolve-issue-issue-12202-41564921141-1-1943cd1f.md: patch changelog fragment for evals (wording tidied by the tidy pass)

Verification

The runner ran each check from the base copy against a9e2feb:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • check-changelog-fragments: all 5 fragments valid (run before and after tidy and after the review fix)
  • check-changed-skills: validate PASS, 0 errors, 3 warnings (description length 512 > 419, body 176 > 160 lines, body grew 174 -> 176 lines)
  • check-affected: 12 passed, 6 skipped over 4 changed files
  • Grep over plugins//evals//prompt.md and graders/*.md: no tracked grader or prompt holds --- on a frontmatter line (the ai-slop fixture-unchanged.md grader already uses -{3}), so no existing suite newly fails
  • Fresh-context subagent review of the whole diff: no correctness bugs; traced each new test to pass; flagged that unclosed frontmatter with --- in the body got the wrong message, which was then fixed and covered by a new test
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41564921141

Left out: the items under Not verified.

Related

#12202

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

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

Security review: PR #12613 — no security issues found

I read every hunk of all 4 changed files. None of them changes a security surface:

  • plugins/evals/skills/validate/scripts/validate-cases.py: split_markdown now finds the closing --- delimiter first. It then raises a new DelimiterInFrontmatter (a ParseError subclass) if any frontmatter line between the delimiters contains ---. unparsed() turns that error into a FAIL finding naming the line. The new logic only compares strings on text the validator already reads. It adds no file, process, network or credential handling, and no input reaches a shell, eval or a path. The added check is stricter, so it accepts nothing the base accepted.
  • plugins/evals/skills/validate/scripts/test_validate_cases.py: the FAIL_LINE pattern now also matches not loadable, and there are 4 new unit tests built from fixture strings. These are tests only.
  • plugins/evals/skills/validate/SKILL.md: the FAIL-tier list gains the new check. This adds to a standing instruction and removes or softens none, so the instruction-surface lens has nothing to check.
  • .changes/evals/...md: a changelog fragment.

Other checks:

  • Trusted paths: no changed file matches any listed TRUSTED PATHS glob.
  • Plugin manifests: no plugin.json or marketplace.json is changed.
  • Trust controls: none touched (trusted-trigger check, lane token, kill switch, token broker, merge holds).
  • PR context: the description and closing-issue text contain no embedded directives aimed at this lane.
  • Owner threat model: no friction hold is removed.
  • Prior findings: none. This is round 0 of a cap of 3, so the round cap does not apply.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

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

Code review: no findings

This change makes validate-cases.py fail a grader or prompt.md whose frontmatter has --- on any line other than its two delimiter lines. I read every hunk of all 4 changed files. I also read the code around the change in validate-cases.py, the two places that call split_markdown (graders at L1042 and prompt.md at L1649), the ParseError class and the test helpers.

Correctness

  • Split logic: split_markdown finds the closing delimiter first and only then scans the lines between the delimiters (for … else at validate-cases.py#L631-L639). So a file that never closes its frontmatter still reports unterminated frontmatter, and the line number it reports (inner + 1) counts from 1 for the file.
  • New error class: DelimiterInFrontmatter is a subclass of ParseError and sets construct. Every existing except ParseError handler catches it unchanged, including the ones in check-matchers.py, calibrate-judge.py and test_convert_evals_json.py. unparsed() turns it into a frontmatter not loadable FAIL.
  • Tests: FAIL_LINE now accepts not loadable. Tracing by reading only, the new tests match the code:
    • a failing grader: --- on line 3 is reported as line 3;
    • a failing prompt.md: line 2 is reported as line 2;
    • a file with unclosed frontmatter and --- in its body still gets the unterminated message;
    • a case that must stay quiet: --- in the prompt body and the grader body, plus -{3} in a regex checked against samples that must pass and must fail.

Closing issue #12202. Both acceptance criteria are met and covered by tests that could fail:

  • "FAILs any grader whose frontmatter holds --- outside the delimiter lines": the check is in split_markdown, so both the grader and prompt.md paths get it, as the recorded decision asks.
  • "A stay-quiet case and a failing case are added": test_dashes_in_the_body_or_spelled_as_a_quantifier_stay_quiet, plus the two failing-case tests.

Path-scoped rules. I checked the rules that apply to these paths:

  • skill-bodies-state-current-rules.md: the SKILL.md edit states the check as our decision without restating anything from upstream.
  • ruff-pin.md: no concern.

Not verified by me. I could not run the unittest suite in this lane, so I have not confirmed that the tests pass. The author's PR body says the tests were also not run and were traced by reading only. The author's claims about check-changelog-fragments, check-changed-skills and the grep showing that no tracked suite newly fails are unverified.

Noted, not a finding. The PR body says convert-evals-json.py can write --- into the frontmatter of a prompt.md it generates. Such a file would now fail validation. That matches the loader, which could not load the file before this change either, so it is not a regression.

Changelog. A patch fragment for a stricter validator check described as a fix is consistent with SemVer. No plugin manifest changed.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head a9e2feb726943ea53fa0c15295faef9c2f60ab01. The lanes clear this reason on their own; the next scheduled run judges it again.

pr-merge's gate refuses its verifier verdict (verify:unreadable)

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit 2df5f65 Nov 3, 2026
44 checks passed
@kyle-sexton
kyle-sexton deleted the work-resolve-issue/issue-12202-41564921141-1 branch November 3, 2026 03:03
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.

fix(evals): validate-cases.py passes a grader whose frontmatter claude plugin eval cannot load

1 participant