ChrisTimperley / RepairChain

AIxCC: automated vulnerability repair via LLMs, search, and static analysis
Apache License 2.0
3 stars 0 forks source link

Delta-debug the triggering commit strategy. #14

Closed clegoues closed 2 months ago

clegoues commented 2 months ago

FUN FACT, the ...-> Pull(rebase) does NOT do what I thought it did in VSCode, you need to go ...-> Branch -> Rebase Branch...

Anyway. Implements patch minimization action. Can minimize with respect to either "positive" or "negative" behavior. I have not performed an end-to-end test with ACTUAL patch validation enabled. minimize_diff also includes several dummy minimizers for the purposes of testing.

CommitDD implements the commit minimization patch generation strategy. Takes the triggering commit, minimizes it, rebases the minimal change on top of the current state of the world, takes the resulting diff, returns it.

Does validate while minimizing, does not validate post patch production, since that happens after patch generation.

I have tested this to ensure that it does minimize with respect to some criterion and that it produces the patch in the correct direction. I have not done an end-to-end test on an actual (mock-) cp.