Skip to content

Add partially synthetic validation of option pairs that represent ranges#4949

Merged
adamnovak merged 1 commit into
masterfrom
giraffe-validation
Jun 30, 2026
Merged

Add partially synthetic validation of option pairs that represent ranges#4949
adamnovak merged 1 commit into
masterfrom
giraffe-validation

Conversation

@adamnovak

Copy link
Copy Markdown
Member

Changelog Entry

To be copied to the draft changelog by merger:

  • vg giraffe now validates more options, including pairs of options describing min and max values of ranges

Description

Someone mentioned somewhere that Giraffe was able to crash instead of actually validating the values of some of the options that control mapping algorithm parameters.

This adds a couple more validation guards on individual options, and adds a new system for validating that paired min and max options actually describe a nonempty interval, though right now this happens after index loading, which is not ideal. Validating earlier would require exciting comparisons on the (unrelated) Range objects used for ticking through option combinations to make sure they're non-overlapping, in a way that the option parsing logic is not architected to support well. The right answer there might be telling the option parsing/range stuff when two options form a pair like this.

This set of options missing validation was identified by the rigorous process of "asking Anthropic Claude Opus to find them", and so may be incomplete. I also let it write the calls to the validation function (and I then had to fix a missing min option it wanted to validate), and fix my syntax.

@adamnovak adamnovak merged commit 24112d5 into master Jun 30, 2026
2 checks passed
@faithokamoto faithokamoto deleted the giraffe-validation branch July 1, 2026 04:35
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.

1 participant