astral-sh / ruff

An extremely fast Python linter and code formatter, written in Rust.
https://docs.astral.sh/ruff
MIT License
32.02k stars 1.07k forks source link

Use ruff_fix_validity to catch regressions in CI not detected by unit tests #4972

Open addisoncrump opened 1 year ago

addisoncrump commented 1 year ago

The fuzzers added in #4822 can be used to catch regressions for which there exists no unit tests (see: #4863 as an example of this; caught by ruff_fix_validity within ~30 seconds). PRs should include a short fuzz run (5-10m) before merging. Failure cases can then be added to the unit test suite.

Before that happens, the following issues (discovered by fuzzing currently and will cause this CI step to fail) should be resolved:

This change should include the following:

In the future, when parser idempotency is more stable or new fuzzers exist (such as for formatting), this should be included as well.

addisoncrump commented 1 year ago

I am happy to craft these changes. :slightly_smiling_face: I just want to make sure that this implementation is sane for the maintainers.

T-256 commented 4 months ago
addisoncrump commented 4 months ago

The list here is now very old. There are likely new bugs caught by this beyond what is tracked; the issue is about making sure that the fuzzer is not enabled constantly unnecessarily.

T-256 commented 4 months ago

Correct, sorry for misreading discription.

PRs should include a short fuzz run (5-10m) before merging. Failure cases can then be added to the unit test suite.

I think it's better to use cron jobs workflow instead.

addisoncrump commented 4 months ago

As in, a scheduled workflow? Makes sense.