internal: Require rustc citation for analysis changes when using AI - #23233
internal: Require rustc citation for analysis changes when using AI#23233ChayimFriedman2 wants to merge 2 commits into
Conversation
|
I think we should impose it to maintainers as well, not only because the fairness but also b/c when we scrutinize the implementation status quo later on, it would be helpful to look into the cited rustc code with the exact revision as they change from time to time. BTW, should we separate the new paragraph from This policy was adapted from uv's AI policy. part? |
| When using AI to author changes to *analysis* - the code responsible for analyzing Rust code and not for implementing IDE features, including | ||
| but not limited to: type inference, MIR, name resolution, macro expansion - generally anything in the crates `parser`, `mbe`, `hir-expand`, `hir-def`, `hir-ty`, | ||
| although there are exceptions; **including when using AI only to analyze bugs and not to write code**, you are required to include a citation | ||
| of the rustc code responsible for the change you did, along with an explanation of how your change follows from it in case this is not immediately clear. |
There was a problem hiding this comment.
to be honest I fail to see how this is AI specific, if I make the change manually myself I'd assume I would need to back the change up with citations all the same?
There was a problem hiding this comment.
Like I said, it isn't AI specific; it's just that for human-authored changes I am more willing to do that myself (seeing this as part of my job as a reviewer), and that people are sending AI-generated PRs in too big volumes.
There was a problem hiding this comment.
In fact, I think we should move or duplicate this into our agents.md file as a hard rule. That will make the LLM dig into rustc sources immediately.
There was a problem hiding this comment.
I wanted to have a policy so I can require that from contributors; and this is the place from that. Putting this in AGENTS.md is helpful but not my goal.
There was a problem hiding this comment.
Yea, moving it is the wrong call sorry, duplicating would be beneficial though. Or frankly we should probably just hard link the policy in the agents file with read instructions to also force-feed it to the llm.
| how to fix bugs in analysis without looking at the rustc code. When not using AI, the maintainers agree to take the responsibility to verify that | ||
| (although of course providing this information is still appreciated). When using AI, partially due to trusting it less (especially for new contributors) |
There was a problem hiding this comment.
I guess due to this, but that also confuses me. Authoring with AI does not free you from responsibility of the code change?
There was a problem hiding this comment.
That said, I follow now, but I think the wording of this paragraph should be touched up
There was a problem hiding this comment.
I welcome suggestions.
There was a problem hiding this comment.
I think I would just drop the
When not using AI, the maintainers agree to take the responsibility to verify that
(although of course providing this information is still appreciated). When using AI, partially due to trusting it less (especially for new contributors)
and partially due to the easiness and amount of the process when AI is used, we require the contributor to do that instead.
part altogether. I don't see a reason to justify this in the text. We just require the contributor to backup their AI generated claims.
d0c9b90 to
b50f891
Compare
We already made some changes from uv's policy, so maybe we should just drop it, or mention it only as inspiration? |
|
Yea I think we can reword it as inspiration or so |
…d by" We've diverged quite a bit by now.
|
I think I've got enough agreements so merging. |
As I asked on Zulip.
Do you think we should exempt maintainers from this? I have no problem with doing that (due to the higher trust), and I myself barely use AI at all, but treating maintainers differently might seem unfair to some.