[no-ci] Register pytest.mark authorship markers, add matching AGENTS.md instructions#2245
Open
rwgk wants to merge 3 commits into
Open
[no-ci] Register pytest.mark authorship markers, add matching AGENTS.md instructions#2245rwgk wants to merge 3 commits into
pytest.mark authorship markers, add matching AGENTS.md instructions#2245rwgk wants to merge 3 commits into
Conversation
This was referenced Jun 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This adds repository-wide
AGENTS.mdguidance for marking the provenance of newly added unit tests using pytest markers, and registers those markers in the pytest config roots.The marker system is intentionally minimal. The design goal is to keep agents and humans choosing from no more than three clear states:
@pytest.mark.agent_authored(model="<model>")for tests authored by an agent and not yet materially reviewed or rewritten by a human.@pytest.mark.human_reviewedfor agent-authored tests that a human has materially reviewed or rewritten.@pytest.mark.human_authoredfor tests authored by a human, or rewritten enough that the authorship is primarily human.The guidance keeps markers local to the tests they describe: markers should be placed immediately above each test function, with class-level markers only when every test method in the class has the same provenance. It also says not to use module-level
pytestmarkfor authorship provenance, because that is easy to miss in large files and makes later per-test provenance changes ambiguous.The pytest marker registrations include sync comments so future edits keep the copies aligned across pytest config roots.
Relationship to #2232
This is an alternative to #2232. PR #2232 uses lightweight comment tags; this version uses formal pytest markers so tests can be selected by provenance with
pytest -m, for examplepytest -m agent_authored.