Skip to content

[no-ci] Add test authorship tags to AGENTS.md#2232

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

[no-ci] Add test authorship tags to AGENTS.md#2232
rwgk wants to merge 3 commits into
NVIDIA:mainfrom
rwgk:agent_human_authored_tags

Conversation

@rwgk

@rwgk rwgk commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

This adds repository-wide AGENTS.md guidance for marking the provenance of newly added unit tests with lightweight comment tags.

The tag system is intentionally minimal. The design goal is to keep agents and humans choosing from no more than three clear states:

  • AGENT-AUTHORED <model> for tests authored by an agent and not yet materially reviewed or rewritten by a human.
  • HUMAN-REVIEWED for agent-authored tests that a human has materially reviewed or rewritten.
  • HUMAN-AUTHORED for tests authored by a human, or rewritten enough that the authorship is primarily human.

The guidance keeps tags local to the tests they describe: tags should be placed immediately above each test function, with class-level tags only when every test method in the class has the same provenance. It also says to use at most one authorship tag per test and to treat missing tags as legacy or unknown provenance rather than implicit human authorship.

Relationship to #2245

An alternative pytest marker-based version is available in #2245. That version uses formal pytest.mark markers and registers them in the pytest config roots so tests can be selected by provenance. This PR keeps the simpler comment-tag approach for direct comparison.

@rwgk rwgk added this to the cuda.bindings next milestone Jun 16, 2026
@rwgk rwgk self-assigned this Jun 16, 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 16, 2026
@rwgk rwgk requested a review from mdboom June 16, 2026 22:52

@mdboom mdboom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I love this concept, of course.

Rather than comments, we could use pytest.mark, which would then easily provide tools for running a subset of these tests etc.

Here's the info about adding custom markers:

https://docs.pytest.org/en/stable/example/markers.html#registering-markers

rwgk added 2 commits June 23, 2026 14:42
Matches the locality guidance from agent_human_authored_pytest_mark commit c987def.
@rwgk

rwgk commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Rather than comments, we could use pytest.mark, which would then easily provide tools for running a subset of these tests etc.

That's now implemented as an alternative under PR #2245.

I have a slight preference for #2245 over this PR, mostly because the decorators are formally attached.

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 documentation Improvements or additions to documentation P1 Medium priority - Should do

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants