mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-17 08:34:19 +01:00
## Background Simulator wants to create predicates that it knows will be Greater or Less than some known value. It uses `LTValue` and `GTValue` for generating these. ## Problem Current implementation simply decrements or increments a random char by 1, and can thus generate strings with control characters like null terminators that result in parse errors, as seen in e.g. this CI run htt ps://github.com/tursodatabase/turso/actions/runs/18459131141/job/5258630 5749?pr=3702 of PR #3702 EDIT: I realized the _actual_ problem is in `GTValue` when it decides to make the string longer, it uses a random char value from `0..255` which can include null terminators etc. Fixed that too. I think in general this PR's approach is a bit more predictable so let's keep it. ## Solution Restrict string mutations to ascii string characters so that the mutation always results in another ascii string character. Closes #3708