Skip to content

Change the LLM policy to require attribution - #15446

Merged
diazona merged 1 commit into
pytest-dev:mainfrom
diazona:llm-require-attribution/1/dev
Nov 27, 2026
Merged

diazona merged 1 commit into
pytest-dev:mainfrom
diazona:llm-require-attribution/1/dev

Conversation

@diazona

@diazona diazona commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

In the pytest-localserver plugin we just adopted an LLM policy that requires attribution of LLM-generated content. The discussion that led to that policy made us think that requiring attribution for LLM content in pytest as a whole would also be a good idea. This commit changes the LLM policy for pytest to reflect that.

This doesn't reflect an established community consensus; it's effectively a proposal, which could be accepted or rejected.

Comment thread CONTRIBUTING.rst Resolved

@RonnyPfannschmidt RonnyPfannschmidt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Written by Claude Opus 5.5 via Claude Code for diazona and the #15446 reviewers; I prompted it, it did the work, I read it.

+1 on making it mandatory. "consider" was too soft, and I wrote that text.

Two changes before merging:

  1. Accept either trailer, naming tool and model. Co-authored-by: Claude ... <noreply@anthropic.com> is what Claude Code writes by default. Assisted-by: (kernel style, as @webknjaz suggests) is fine too. A bare Assisted-by: LLM drops the tool and model, which is the part a reviewer actually uses.
  2. Not only commits. Generated PR descriptions, comments and reviews are not commits, and the PR body is what reviewers read first.

For the agent context files @webknjaz asked about: #15054 now carries the full version, ready for review. It adds AGENTS.md plus a CLAUDE.md pointer, mandatory disclosure for maintainers too, a ban for hiding it, and a required PR template checkbox. Whichever of the two lands first, I'll rebase the other.

The pytest-localserver plugin just adopted an LLM policy that requires
attribution of LLM-generated content. The discussion that led to that
policy made us think that requiring attribution for LLM content in
pytest as a whole would also be a good idea. This commit changes the LLM
policy for pytest to reflect that.

Along with that, it also allows "Assisted-by" trailers as an alternative
to the usual "Co-authored-by". This is inspired in part by older
versions of the Linux kernel development guidelines.

Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
@diazona
diazona force-pushed the llm-require-attribution/1/dev branch from ce925a8 to 86b4af5 Compare November 26, 2026 07:13
@diazona

diazona commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

It looks like #15054 makes this PR entirely obsolete, so I think it makes sense to close this and you can focus on doing the policy changes in that other PR. Unless that other one is going to take a long time to prepare, and you want something quick that will make attribution mandatory? If so I'm fine to proceed with this one. I made the suggested changes, just in case.

@pyba-chronographer pyba-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Nov 26, 2026

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@RonnyPfannschmidt

Copy link
Copy Markdown
Member

the bigger one may take longer to get fully in as it adds a lot of extras, so landing this first and then refining is

@diazona
diazona merged commit 72c941a into pytest-dev:main Nov 27, 2026
36 checks passed
@diazona
diazona deleted the llm-require-attribution/1/dev branch November 27, 2026 01:06
@RonnyPfannschmidt

Copy link
Copy Markdown
Member

thanks 👍

@webknjaz

webknjaz commented Nov 28, 2026 •

Copy link
Copy Markdown
Member
  1. Accept either trailer, naming tool and model. Co-authored-by: Claude ... <noreply@anthropic.com> is what Claude Code writes by default. Assisted-by: (kernel style, as @webknjaz suggests) is fine too. A bare Assisted-by: LLM drops the tool and model, which is the part a reviewer actually uses.

Kernel's earlier docs used to ask for the model details, but then they changed their mind because they realized this information was useless and they were becoming an advertisement platform for agent vendors (torvalds/linux@816d9992d9ed). There was an lwn article about their discussions on summit in Prague but I don't have a link at hand..
Anyway, as I was looking at that and with my involvement in the policy research/authoring (pip-tools, aio-libs, ansible), I ended up agreeing and now my current guardrails also require a generic Assisted-by tailer: ansible/pylibssh@68f4e9c.

While writing this comment, I found out that kernel actually dropped said trailer a 6 weeks ago: torvalds/linux@1e03529. So it's no longer there: https://docs.kernel.org/process/coding-assistants.html

Still, the Co-Authored-By style remains a sketchy marketing stunt that the vendors use to self-advertise by showing their agent logos in commits. But really probabilistic machines aren't authoring content so let's not encourage this kind of abuse.

  1. Not only commits. Generated PR descriptions, comments and reviews are not commits, and the PR body is what reviewers read first.>
    For the agent context files @webknjaz asked about: #15054 now carries the full version, ready for review. It adds AGENTS.md plus a CLAUDE.md pointer, mandatory disclosure for maintainers too, a ban for hiding it, and a required PR template checkbox. Whichever of the two lands first, I'll rebase the other.

I should probably post this in the other PR but I've been experimenting with the context/memory files elsewhere like so:

For PR descriptions, I have a less Git trailery form of disclosure in the guardrails: https://github.com/ansible/pylibssh/blob/66a52439dfb68adce09920a018f7c1f71bb3072b/.agents-ctx/PR_HYGIENE.md#pr-descriptions.
Here's an example of it appearing in the PR description: ansible/pylibssh#941, I probably should make changes for it to show up at the top..

@Pierre-Sassoulas

Copy link
Copy Markdown
Member

To add to that, there's no required trailer in pylint and we even remove it when merging to remove the LLM advertisement. I don't think there's a way to have both the disclosure and no advertisement.

@webknjaz

Copy link
Copy Markdown
Member

@Pierre-Sassoulas I think having an optional Assisted-by: LLM middle ground would be fine, though. As in "I used a probabilistic robot to make this but won't be helping advertise it beyond simple notice". This is where I'm at in my projects. Still, I'm generally fine w/ no disclosure at all. I'm experimenting with having AGENTS.md gently confirm with the operator how deeply involved they feel with each specific change and based on that, only sign change notes and stuff as a human or not, or as something in-between.

@diazona

diazona commented Nov 30, 2026

Copy link
Copy Markdown
Contributor Author

FWIW my stance on this, and motivation for the proposed change, is probably influenced by my academic background: I think it's important to be open about the process and tools used to obtain a result, unless they're "obvious" or generic. And if you use a specific tool to obtain some non-obvious, non-generic result, it's natural that the tool gets some free "advertising", if you want to call it that, for the role it played in helping produce your result. IMO if one is really dedicated to not "advertising" (mentioning) specific LLMs and harnesses in commit messages and PRs, one should not use those LLMs/harnesses in the first place.

Anyway, would it make sense to continue this topic in an actual GH discussion or issue so it can get better exposure, rather than on a closed PR?

@RonnyPfannschmidt

Copy link
Copy Markdown
Member

i'll have a personal discussion with Freya this week after which we are likely to open another discussion and/or change m larger pr

my current personal oppinions is also that harness+model detail isn't that much of marketing but a indicator

@webknjaz

Copy link
Copy Markdown
Member

I don't mind those details in a dedicated trailer, just not in the one meant for human accounts — that one counts as abuse. Also, I don't usually know what it uses so for me it's generic as far as I know. Adding specific information should probably be optional, for those who know how to retrieve it correctly w/o hallucinations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided (automation) changelog entry is part of PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants