-
Notifications
You must be signed in to change notification settings - Fork 0
Add starts-with and ends-with eval assertion types #2
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Context
The eval engine (pulser eval) supports 5 assertion types: contains, not-contains, min-length, max-length, matches.
Missing: starts-with and ends-with — the most natural string checks after contains.
Use case
# eval.yaml
tests:
- name: "output starts with summary"
input: "Review this code"
assert:
- starts-with: "## Summary"
- ends-with: "recommendation"Currently requires a regex via matches, which is cumbersome and error-prone.
What to do
- Add
starts-withandends-withto the assertion type insrc/eval/types.ts - Add the two cases in
src/eval/assertions.ts— follow the existing pattern
The existing assertions are just if branches. This is two more.
Files to modify
src/eval/types.ts— add toAssertionDeftypesrc/eval/assertions.ts— add two cases
Difficulty: Easy
~15 minutes for someone familiar with TypeScript.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed