qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Daniel P . Berrangé" <berrange@redhat.com>,
	"John Snow" <jsnow@redhat.com>, "Kevin Wolf" <kwolf@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Mads Ynddal" <mads@ynddal.dk>
Subject: Re: [PATCH 0/6] tracetool: add mypy --strict checking [AI discussion ahead!]
Date: Wed, 8 Oct 2025 19:41:45 +0200	[thread overview]
Message-ID: <CABgObfYaoJ4-tmdLdbPDiUpheXHigc9pmUAdK1Y6mFhsXo2npg@mail.gmail.com> (raw)
In-Reply-To: <20251008172325.GA181748@fedora>

[-- Attachment #1: Type: text/plain, Size: 3009 bytes --]

Il mer 8 ott 2025, 19:23 Stefan Hajnoczi <stefanha@redhat.com> ha scritto:

> On Wed, Oct 08, 2025 at 08:35:39AM +0200, Paolo Bonzini wrote:
> > In this version, the types were added mostly with the RightTyper tool
> > (https://github.com/RightTyper/RightTyper), which uses profiling to
> detect
> > the types of arguments and return types at run time.  However, because
> > adding type annotations is such a narrow and verifiable task, I also
> developed
> > a parallel version using an LLM, to provide some data on topics such as:
> >
> > - how much choice/creativity is there in writing type annotations?
> >   Is it closer to writing functional code or to refactoring?
> >
> > - how does AI output for such mechanical transformations compare to other
> >   automated tools, whose output is known not to be copyrightable?
> >
> > - what is the kind of time saving that the tool can provide?
> >
> > - how effective is an LLM for this task?  Is the required human help a
> >   pain to provide, or can the human keep the fun part for itself?
>
> Here are my thoughts:
>
> - Type annotations are probably not copyrightable. Although I think AI
>   output contributions should be allowed for non-copyrightable work, I
>   understand the slippery slope argument. Also, at QEMU Summit the
>   consensus was to give it some time and then revisit the AI policy next
>   year. I think we should stick to that so that the QEMU community has
>   time to consider other scenarios involving AI.


I agree. At the same time, rushing a policy change is bad but making an
uninformed one is too. Submitting the non-AI change, recounting the
experience with the AI tool, and explaining how they differed for me,
hopefully helps informing decisions. In fact this is probably at the upper
end of the complexity, for what can still be described as mechanical
transformation.

In other words, I want to be clear that, even though I did rush a bit the
discussion on the policy, I don't want to rush the changes but rather be
prepared for them.

- Markus pointed out why generating them automatically may not result in
>   the same quality as manually-written annotations because the AI
>   doesn't have the context that is missing from the code itself. [...] The
> difference between
>   manually-written type hints and AI-generated ones is probably less
>   significant than with API documentation though, so I think they are
>   sufficiently valuable and high quality enough to merge.
>

Indeed. And also, the nuances are more important for something where type
hints describe an API than if you're doing it only for some extra static
checking.

You can always start with a tool and refine, too. In fact I expect that
*if* an exception is granted for mechanical changes, submissions would
almost never consist of AI-generated changes only. Full isolation may not
always be practical, but separating AI- or tool-generated commits from
human refinements is something we'd ask for anyway, for the sake of
reviewability.

Paolo

>

[-- Attachment #2: Type: text/html, Size: 4269 bytes --]

      reply	other threads:[~2025-10-08 17:43 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-08  6:35 [PATCH 0/6] tracetool: add mypy --strict checking [AI discussion ahead!] Paolo Bonzini
2025-10-08  6:35 ` [PATCH 1/6] tracetool: rename variable with conflicting types Paolo Bonzini
2025-10-08  9:27   ` Daniel P. Berrangé
2025-10-08 18:06   ` Stefan Hajnoczi
2025-10-08  6:35 ` [PATCH 2/6] tracetool: apply isort and add check Paolo Bonzini
2025-10-08  9:29   ` Daniel P. Berrangé
2025-10-08 17:58   ` Stefan Hajnoczi
2025-10-09  7:52     ` Daniel P. Berrangé
2025-10-09  8:22       ` Paolo Bonzini
2025-10-09  8:58         ` Daniel P. Berrangé
2025-10-09 11:26           ` Paolo Bonzini
2025-10-09 12:05             ` Daniel P. Berrangé
2025-10-09  7:58     ` Paolo Bonzini
2025-10-08  6:35 ` [PATCH 3/6] tracetool: "import annotations" Paolo Bonzini
2025-10-08  9:31   ` Daniel P. Berrangé
2025-10-08 18:06   ` Stefan Hajnoczi
2025-10-08  6:35 ` [PATCH 4/6] tracetool: add type annotations Paolo Bonzini
2025-10-08 18:09   ` Stefan Hajnoczi
2025-10-08  6:35 ` [PATCH 5/6] tracetool: complete typing annotations Paolo Bonzini
2025-10-08 18:10   ` Stefan Hajnoczi
2025-10-08  6:35 ` [PATCH 6/6] tracetool: add typing checks to "make -C python check" Paolo Bonzini
2025-10-08  9:32   ` Daniel P. Berrangé
2025-10-08 18:12   ` Stefan Hajnoczi
2025-10-08  7:18 ` [PATCH 0/6] tracetool: add mypy --strict checking [AI discussion ahead!] Markus Armbruster
2025-10-08 10:34   ` Daniel P. Berrangé
2025-10-10 12:38     ` Markus Armbruster
2025-10-10 13:49       ` Paolo Bonzini
2025-10-10 17:41         ` Markus Armbruster
2025-10-08 10:40 ` Daniel P. Berrangé
2025-10-08 17:23 ` Stefan Hajnoczi
2025-10-08 17:41   ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABgObfYaoJ4-tmdLdbPDiUpheXHigc9pmUAdK1Y6mFhsXo2npg@mail.gmail.com \
    --to=pbonzini@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mads@ynddal.dk \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).