@@ -113,6 +113,44 @@ repos/{owner}/{repo}/milestones --jq '.[].title'`, and pick the best match.
113113 end on clarifications unless truly blocked. Every rollout should conclude
114114 with a concrete edit or an explicit blocker plus a targeted question.
115115
116+ ## Test authorship markers
117+
118+ Use pytest markers to make the provenance of newly added unit tests explicit.
119+ Keep this provenance system minimal: choose from only these three markers.
120+ Place the marker immediately above each test function. A class-level marker is
121+ acceptable only when every test method in the class has the same provenance.
122+ Do not use module-level ` pytestmark ` for authorship provenance; it is too easy
123+ to miss in large files and makes later per-test provenance changes ambiguous.
124+
125+ - ` @pytest.mark.agent_authored(model="<model>") ` : the test was authored by an
126+ agent and has not yet been materially reviewed or rewritten by a human.
127+ Agents must add this marker when generating new unit tests, for example:
128+
129+ ``` python
130+ import pytest
131+
132+ @pytest.mark.agent_authored (model = " gpt-5.5" )
133+ def test_something ():
134+ ...
135+ ```
136+
137+ - ` @pytest.mark.human_reviewed ` : a human has materially reviewed or rewritten
138+ an agent-authored test. Prefer replacing
139+ ` @pytest.mark.agent_authored(model="<model>") ` with this marker instead of
140+ keeping both.
141+ - ` @pytest.mark.human_authored ` : the test was authored by a human, or
142+ rewritten enough that the authorship is primarily human.
143+
144+ Use at most one authorship marker per test. Treat missing markers as legacy or
145+ unknown provenance, not as implicit ` @pytest.mark.human_authored ` . Because
146+ these are pytest markers, tests can be selected with ` pytest -m ` , for example
147+ ` pytest -m agent_authored ` .
148+
149+ When an agent notices a human adding a new test or materially modifying an
150+ existing test, suggest adding ` @pytest.mark.human_authored ` or replacing
151+ ` @pytest.mark.agent_authored(model="<model>") ` with
152+ ` @pytest.mark.human_reviewed ` as appropriate.
153+
116154
117155# Editing constraints
118156
0 commit comments