Skip to content

Conversation

@liuw
Copy link
Member

@liuw liuw commented Jun 18, 2025

This script is written by an AI agent. I checked the code to ensure that's something I would have written myself. I ran some tests to make sure it is not obviously broken.

Developers can use this script to check if their changes break bisection.

@liuw liuw requested a review from a team as a code owner June 18, 2025 19:08
@liuw liuw force-pushed the run-on-commits-script branch 3 times, most recently from fa133a8 to feb2705 Compare June 18, 2025 23:12
@liuw liuw force-pushed the run-on-commits-script branch from feb2705 to fb62e3e Compare June 19, 2025 15:09
make sure each commit builds. You can use the in-tree helper script to do that.

```sh
./scripts/run_on_commits.sh $BASE_COMMIT $TIP_COMMIT $BUILD_COMMAND
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's wrong with git rebase -ix "$BUILD_COMMAND" origin/main? It doesn't seem right to implement this in the Cloud Hypervisor repo when it's not specific to Cloud Hypervisor at all…

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git rebase -ix stops where there is a failure. This script does a bit more house keeping and sanity check than that.

I want to integrate this check into the upstream CI system. This script will be useful in that scenario. It is easier to script, and makes it easy for contributor to run the exact same commands that GitHub CI uses.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That might have been useful to note in the commit message then!

With the exception of continuing after failure, which could be achieved by appending || :, I'm still not seeing a huge benefit of this script compared to git rebase --autostash -ix

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with keeping the script to myself.

I do think we should put in a check in the GitHub CI to enforce bisection is not broken.

@alyssais
Copy link
Member

Has there been any discussion within the project about the acceptability of LLM-authored code? QEMU looks set to ban it, and I'm wondering whether Cloud Hypervisor's circumstances are any different to theirs… It should probably be figured out before the ship leaves the harbor, as it were.

@liuw
Copy link
Member Author

liuw commented Jun 23, 2025

Has there been any discussion within the project about the acceptability of LLM-authored code? QEMU looks set to ban it, and I'm wondering whether Cloud Hypervisor's circumstances are any different to theirs… It should probably be figured out before the ship leaves the harbor, as it were.

Yeah this is a fair point. That's something the community should decide.

I wanted to be upfront about where the code came from. In a lot of cases, you won't be able to distinguish LLM generated code from human written code. At the end of the day, there are only a few ways to use git to bisect the tree, or to implement a binary search algorithm, or do some other random things in computer science.

@phip1611
Copy link
Member

phip1611 commented Jun 24, 2025

I wanted to be upfront about where the code came from. In a lot of cases, you won't be able to distinguish LLM generated code from human written code.

At least for smaller code snippets, agree.

Has there been any discussion within the project about the acceptability of LLM-authored code? QEMU looks set to ban it,

IMHO (as an external contributor and not an project owner): It's hard to draw the line. In fact, I also used LLM code to do my changes in #7066; However, I used a small LLM-generated script helping me to automate my changes and I didn't commit LLM-generated code. See commit message for reference.

@likebreath
Copy link
Member

@alyssais Thank you for bringing-up the discussion and the context for reference.

Let's move the discussion to issue #7162. Marking this PR as a draft for now.

@likebreath likebreath marked this pull request as draft June 24, 2025 17:59
@liuw
Copy link
Member Author

liuw commented Jun 25, 2025

Closing this until we come to a conclusion about AI generated code.

@liuw liuw closed this Jun 25, 2025
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.

4 participants