Skip to content

fix(reference): match eval with any number of arguments in no-eval-call - #595

Merged
theCodeDrift merged 1 commit into
mainfrom
fix/reference-eval-any-arity
Oct 30, 2026
Merged

theCodeDrift merged 1 commit into
mainfrom
fix/reference-eval-any-arity

Conversation

@theCodeDrift

Copy link
Copy Markdown
Member

The sg half of #591. #592 widened the vale reference; no-eval-call still used pattern: eval($ARG), which matches exactly one argument, though its prompt asks for any call to eval(). A generator that follows create-sg-rule writes fail cases on each side of the arity boundary (eval(), eval(a, b)), and step 5 of the eval protocol (our rule against their fixtures) failed on them: 2 of 3 eval:sg runs on claude-sonnet-5.

  • Pattern is now eval($$$ARGS).
  • New fail cases eval-no-args and eval-multiple-args; reference.json regenerated.
  • The prompt names the arities it expects.
  • reference-verify.test.ts now verifies the published sg entry against its own cases, as it already did for vale. With the old pattern restored it fails with the same two fail case did not fire lines from the issue.
  • Patch changeset; the corpus version is unchanged since only one entry's content moved.

Fixes #591

The prompt asks for any call to eval(), but the pattern eval($ARG) matched
exactly one argument, so downstream evals graded generated fail cases for
eval() and eval(a, b) as wrong. Match any arity, add a fail case for zero and
two arguments, name the arities in the prompt, and verify the published sg
reference against its own cases.
@theCodeDrift
theCodeDrift merged commit 0b41364 into main Oct 30, 2026
8 checks passed
@theCodeDrift
theCodeDrift deleted the fix/reference-eval-any-arity branch October 30, 2026 18:07
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.

Reference rules no-eval-call and prefer-use-over-utilize are narrower than their own prompts

1 participant