Skip to content

[no-ci] Register pytest.mark authorship markers, add matching AGENTS.md instructions#2245

Open
rwgk wants to merge 3 commits into
NVIDIA:mainfrom
rwgk:agent_human_authored_pytest_mark
Open

[no-ci] Register pytest.mark authorship markers, add matching AGENTS.md instructions#2245
rwgk wants to merge 3 commits into
NVIDIA:mainfrom
rwgk:agent_human_authored_pytest_mark

Conversation

@rwgk

@rwgk rwgk commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

This adds repository-wide AGENTS.md guidance 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_reviewed for agent-authored tests that a human has materially reviewed or rewritten.
  • @pytest.mark.human_authored for 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 pytestmark for 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 example pytest -m agent_authored.

@rwgk rwgk added this to the cuda.bindings next milestone Jun 23, 2026
@rwgk rwgk self-assigned this Jun 23, 2026
@rwgk rwgk added documentation Improvements or additions to documentation P1 Medium priority - Should do cuda.bindings Everything related to the cuda.bindings module labels Jun 23, 2026
@github-actions github-actions Bot added cuda.core Everything related to the cuda.core module cuda.pathfinder Everything related to the cuda.pathfinder module labels Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module cuda.pathfinder Everything related to the cuda.pathfinder module documentation Improvements or additions to documentation P1 Medium priority - Should do

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant