Skip to content

fix: guard invalid json schema patterns - #12

Closed
slegarraga wants to merge 1 commit into
AgentPostmortem:mainfrom
slegarraga:fix/json-schema-invalid-pattern
Closed

fix: guard invalid json schema patterns#12
slegarraga wants to merge 1 commit into
AgentPostmortem:mainfrom
slegarraga:fix/json-schema-invalid-pattern

Conversation

@slegarraga

Copy link
Copy Markdown

Closes #8.

Guards new RegExp(schema.pattern) in the JSON Schema validator so an invalid user-supplied pattern produces a failing scorer result instead of crashing the run.

Verified with npm run typecheck and npm test (68 passed).

@royalpinto007

Copy link
Copy Markdown
Collaborator

Closing this PR.

The author is no longer an active contributor on these repositories, so this cannot be carried through review or iterated on.

The underlying issue stays open and is available for anyone who wants it. If you were looking at this change, please do open a fresh PR, it is very welcome.

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.

An invalid pattern in a JSON schema throws and kills the whole run

2 participants