Skip to content

fix(evals): carry calibrate-judge samples in case.yaml so a --- sample loads - #8046

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-6547-39096994763-1
Oct 18, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-6547-39096994763-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #6547

Summary

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

calibrate-judge build now writes each sample's system prompt into case.yaml as execution.append_system_prompt (with schema_version and name) and leaves it out of prompt.md frontmatter, so a --- in a sample can no longer end the frontmatter. This follows the recorded decision (option 2).

Not verified

  • One live Claude Code load confirming a mid-line --- in a case.yaml scalar loads; the issue puts it out of scope (after merge).
  • check-skill not run: no SKILL.md changed.

Fix

  • plugins/evals/skills/plugin-eval/scripts/calibrate-judge.py: new case_yaml(); prompt_md() no longer sets append_system_prompt; build writes case.yaml per case; docstring updated
  • plugins/evals/skills/plugin-eval/scripts/test_calibrate_judge.py: tests read the system prompt from case.yaml; new test for a table-rule sample (validator accepts, value round-trips, no append_system_prompt in prompt.md frontmatter)
  • .changes/evals/fix-calibrate-judge-sample-rule-frontmatter-3c91a7d2.md: patch fragment for evals

Verification

The run reports:

Left out: the items under Not verified.

Related

#6547

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed b4b5989ee7dc432cdc5699207a71d9cc1534fbf5: 0 finding(s), 0 as inline comments.

No security issues found in PR #8046 at head b4b5989.

The PR changes calibrate-judge.py build so it writes each sample into case.yaml as execution.append_system_prompt. Before, the sample went into prompt.md frontmatter. It also adds tests and a changelog fragment.

  • Injection: Sample text and the case name both go through yaml_quoted. That function escapes newlines, quotes and backslashes, and rejects other control characters. A --- or other YAML syntax in a sample therefore stays inside one quoted scalar. The new test checks that no line of case.yaml equals ---.
  • Trust boundary: The inputs come from a local eval suite that a developer passes to an offline generator. The PR adds no network, shell, path-traversal or credential surface.
  • Label leakage: The change doesn't reveal the expected label to the judged case. The updated test still asserts that the label and the why text never reach the generated files.
  • Instruction-surface lens: The diff deletes no standing instruction, guardrail, hook or allowlist.

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed b4b5989ee7dc432cdc5699207a71d9cc1534fbf5: 0 finding(s), 0 as inline comments.

No findings. I read the full diff and PR context and checked the change against the closing issue (#6547) and its recorded decision.

What the PR does: calibrate-judge.py build now writes each sample's system prompt to case.yaml as execution.append_system_prompt, with schema_version: "1.1" and name. prompt.md frontmatter no longer carries it. This is option 2 from the decision comment: the sample moves out of the frontmatter. A --- inside a sample can no longer end the frontmatter.

What I checked myself, by reading code (I ran no tests):

  • The case.yaml shape matches what validate-cases.py reads. It requires schema_version and name and reads run fields from execution. The repo's own plugins/evals/evals/*/case.yaml files use the same schema_version: "1.1" form.
  • yaml_quoted (calibrate-judge.py:166) escapes every newline, so the emitted append_system_prompt and name are each one line. A --- inside a sample therefore never starts a line in case.yaml.
  • prompt_md now emits no append_system_prompt, so prompt.md frontmatter cannot override the case.yaml value. Its docstring says so.
  • The skip path for a sample yaml_quoted rejects (a control character) still works. case_yaml runs before any file is written, so a skipped sample leaves no partial case directory.
  • Test changes cover the issue's fixture ask: a table-rule sample builds, validate-cases reports PASS, the value round-trips, no --- line appears in case.yaml, and prompt.md has no append_system_prompt. The label-leak test was extended to scan case.yaml and to normalize the quoted name.
  • Changelog fragment .changes/evals/… is a patch bump with a ### Fixed entry.
  • No .claude/rules/ rule I could match to the changed files is broken. The cost-claims rule is not relevant here.

Not verified:

  • The PR's own report that 33 tests pass is author-claimed. I did not run the suite.
  • Whether the live claude plugin eval CLI loads the case.yaml and ignores the empty prompt.md sample. The PR lists this under Not verified and the issue puts it out of scope.

Closing issue #6547 was read in full. Its original "fix wanted" (escape in yaml_quoted) was superseded by the maintainer's decision comment. The PR follows that decision, and the fixture-sample test the issue asked for is present.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path enqueued this pull request at head b4b5989ee7dc432cdc5699207a71d9cc1534fbf5.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 18, 2026
Merged via the queue into main with commit 2991e23 Oct 18, 2026
32 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-6547-39096994763-1 branch October 18, 2026 13:01
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.

calibrate-judge build: a sample holding --- makes its case fail to load and go untested

0 participants