Skip to content

fix(evals): fail run-validity when a scaffold case ran without --scaffold - #11337

Merged
kyle-sexton merged 6 commits into
mainfrom
fix/run-validity-unchecked-missing-case
Oct 30, 2026
Merged

kyle-sexton merged 6 commits into
mainfrom
fix/run-validity-unchecked-missing-case

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #10504

Replaces #11291

Summary

Problem: run-validity.py returned verdict: VALID on a pass where a case's scaffold_script never ran, because the eval was invoked without --scaffold. Intent: "fail a run whose case declares a scaffold script but whose workspace was never scaffolded".

This PR carries the lanes App's change from #11291, a scaffold check with a --scaffolded operator flag. It adds the fix for that PR's Blocking review thread: a case.yaml that could not be found counted as "no script", so a result read where its suite root or a case dir no longer exists passed the check without reading any case.yaml. This went against the issue's decision 3, which says unreadable means UNCHECKED, never PASS.

Fix

  • run-validity.py gets a scaffold check. A case whose case.yaml sets context.scaffold_script fails the run unless --scaffolded records that the eval ran with --scaffold. A case with no script is unaffected.
  • A missing case.yaml now means "no script" only when the case dir exists. When the suite root or the case dir is missing, the check reports UNCHECKED and the verdict is INVALID, the same as an unparseable or unopenable case.yaml.
  • Tests: the clean result now gets a real suite root holding each case dir. Two new cases, a missing suite root and a missing case dir, both expect UNCHECKED. r2-invalid.json keeps its absent /tmp/eval-r2 root, so its expected verdict now includes the scaffold reason.

Verification

Left out: no real claude plugin eval pass with and without --scaffold, since the result schema records no scaffold field and the check relies on the operator's --scaffolded flag (the issue's decision 2 fallback). ruff format --check reports formatting debt in test_run_validity.py lines this PR did not write.

Related

🤖 Generated with Claude Code

melodic-automation-lanes Bot and others added 5 commits October 30, 2026 15:10
Lane-Activity: work-resolve-issue/resolve-issue
…sing

A case.yaml that could not be found counted as "no scaffold script", so a
result read where its suite root or a case dir no longer exists passed the
scaffold check without reading any case.yaml. A missing case.yaml now means
no script only when the case dir exists; otherwise the case is UNCHECKED,
as issue #10504 decision 3 requires.

Tests give the clean result a real suite root with each case dir, and add
a missing-suite-root and a missing-case-dir case, both failing before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 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-10-30T18:54:09.300888Z f9324f1 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f9324f1a1c

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

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

No security issues in the incremental change since f9324f1 (3 files).

I read .claude-lane/incremental.diff and found no security-relevant surface. None of the three files is on the trusted-paths list, and none is a trust control, token scope, kill switch, merge hold, or plugin manifest.

  • plugins/evals/skills/plugin-eval/scripts/run-validity.py:
    • The SCAFFOLD_KEY regex now matches any uncommented mention of scaffold_script, not only scaffold_script:.
    • The new continues() helper makes a key with an empty value followed by an indented line fall through to UNCHECKED.
    • Both changes make the scaffold check stricter. They fail closed: ambiguous case.yaml shapes now report UNCHECKED instead of passing silently.
    • The regex is anchored at line starts, so backtracking is linear per line. continues() runs once per scan. I found no ReDoS or resource-exhaustion path.
    • The change adds no file access and no new input source. It only parses a case.yaml the script already read.
  • plugins/evals/skills/plugin-eval/scripts/test_run_validity.py: adds a test for the two unreadable shapes (a quoted key, and an empty value continued on the next line).
  • plugins/evals/skills/plugin-eval/reference/reading-results.md: documentation only. It adds a pointer, as-of date and recheck trigger, and reworded the --scaffold guidance.

manifest: no manifest files changed.
critical-findings: 0

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

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

Incremental review of cc47fb2 against f9324f1: no findings.

What changed. SCAFFOLD_KEY in run-validity.py now matches any uncommented mention of scaffold_script, with no colon required. The new continues() helper makes a key with an empty value and a more-indented next line leave the case UNCHECKED. A matching test covers a quoted key and an empty value continued on the next line. The reading-results.md wording was tightened, and a Pointer / As of / Recheck trigger block was added.

What I checked by reading the code.

  • continues() skips blank and comment-only lines and compares indent with the key's. An empty scaffold_script: followed by a sibling or top-level key (same or lower indent) still returns None, None, which is right. Only a deeper-indented continuation breaks out to UNCHECKED.
  • A quoted key ("scaffold_script":) matches SCAFFOLD_KEY, but neither FLOW_SCRIPT nor BLOCK_SCRIPT match it. The scan falls through to the UNCHECKED return, as the new test expects.
  • A search of every case.yaml in the repo found no scaffold_script mention other than the plain scaffold_script: <value> form (no matches for an empty value, a #, | or > value, or a second mention on a line). The looser regex therefore turns no existing case into a false UNCHECKED or INVALID.
  • A prose mention of scaffold_script in a description: now gives UNCHECKED, where the old colon-bound regex gave "no script". That follows the closing issue's decision 3 (unreadable means UNCHECKED, never PASS). It errs on the safe side, and I counted it as a trade-off, not a finding.
  • The reading-results.md text matches the code. The Recheck trigger names the missing result-file field, which replaces the dropped "result file does not record it" sentence.

I did not run the tests. Whether run-validity.test.sh passes is the PR author's claim, unverified by me.

Spend: none. No change here costs money or changes model or schedule settings.

Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM6yGqba
Lane-Thread: PRRT_kwDOTCGFQM6yGqbe
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

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

@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 0cf66b8 Oct 30, 2026
51 checks passed
@kyle-sexton
kyle-sexton deleted the fix/run-validity-unchecked-missing-case branch October 30, 2026 21:54
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): run scaffold scripts in plugin-eval and fail validity when a case was never scaffolded

1 participant