Skip to content

Document agent pitfalls in AGENTS.md: test coverage, fork-only pushes, doc spell check#1345

Merged
bdraco merged 4 commits into
aio-libs:masterfrom
bdraco:agents-md-test-coverage
May 17, 2026
Merged

Document agent pitfalls in AGENTS.md: test coverage, fork-only pushes, doc spell check#1345
bdraco merged 4 commits into
aio-libs:masterfrom
bdraco:agents-md-test-coverage

Conversation

@bdraco
Copy link
Copy Markdown
Member

@bdraco bdraco commented May 17, 2026

What do these changes do?

Three AGENTS.md additions for failure modes agents keep hitting:

Renumbers the surrounding PR rules and extends Things-not-to-do
with matching bullets.

Are there changes in behavior for the user?

No. Docs-only change to the agent-facing contributor notes.

Is it a substantial burden for the maintainers to support this?

No. All three rules are already enforced (by the coverage
report, by the branch-creation restriction, and by the docs
spelling step in CI); this just writes them down where agents
will read them.

Related issue number

Folds in #1344 (which can be closed in favour of this PR) and
resolves the AGENTS.md side of #1343. References
aio-libs/yarl#1689 as the canonical example for the coverage
section.

Checklist

  • I think the code is well written
  • [N/A] Unit tests for the changes exist
  • Documentation reflects the changes
  • [N/A] If you provide code modification, please add yourself to `CONTRIBUTORS.txt`
  • Add a new news fragment into the `CHANGES/` folder

Drafted with Claude Code (claude-opus-4-7, 1M context); reviewed by @bdraco.

Agent run details (optional, for reviewers)

Docs-only change, no test suite to run. Verification:

  • `pre-commit run --files AGENTS.md CHANGES/1343.contrib.rst CHANGES/1345.contrib.rst docs/spelling_wordlist.txt`
    passed (only the `:user:` role check applied to the changed
    files; ruff/clang/mypy had no targets).
  • `make doc-spelling` flagged `codecov` from the new
    `1345.contrib.rst` fragment; added it to
    `docs/spelling_wordlist.txt`, after which the only remaining
    warnings are 5 pre-existing words (`parametrization`,
    `postfix`, `instantiation`, `init`, `parametrized`) in
    the released `CHANGES.rst` from 6.7.1, unrelated to this PR.

bdraco added 2 commits May 16, 2026 20:54
Adds a section to AGENTS.md explaining that coverage in this
repo is collected over `source = .`, so unreachable lines in
tests (defensive `raise` inside a monkeypatched stub, one-sided
cleanup branches, backend-specific arms the matrix never enters)
show up the same as dead code in `multidict/`. Calls out the
common shapes and points to the patterns that keep tests fully
covered (deterministic fixtures, unconditional restores,
parametrize over both backends, `monkeypatch` auto-revert).
- Adds "Push from a fork, not to upstream" as PR rule aio-libs#3, with
  the commands and a note on the `GH013` error you get for
  trying to push a feature branch to `aio-libs/multidict`.
- Folds in the docs spell check section from aio-libs#1344 as PR rule
  aio-libs#7, so `make doc-spelling` is documented as the pre-push
  gate; adds `codecov` to `docs/spelling_wordlist.txt` for the
  new fragment.
- Renumbers PR rules 3-6 to 4-8, and extends the news fragments
  to cover all three additions.
@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided There is a change note present in this PR label May 17, 2026
Per AGENTS.md, when both an issue and a PR number are in play
the issue-numbered fragment is the real file and the PR-numbered
sibling is a symlink, so both cross-references resolve in
towncrier and on GitHub.

- `CHANGES/1343.contrib.rst` stays as the real fragment for the
  spelling-check section (tied to issue aio-libs#1343).
- `CHANGES/1345.contrib.rst` becomes a symlink to it.
- The coverage + fork content moves to `1345.contrib.1.rst`,
  using the towncrier sequence-number convention since the
  unsuffixed PR slot is now taken by the symlink.
Per maintainer feedback, three contrib fragments for one
docs-only PR is noise. Folds spelling check, test coverage,
and fork-only push into one entry in `CHANGES/1343.contrib.rst`
and keeps `CHANGES/1345.contrib.rst` as the symlink so the PR
number still resolves. Removes the `1345.contrib.1.rst` file
that the earlier split introduced.
@bdraco bdraco marked this pull request as ready for review May 17, 2026 04:05
@bdraco bdraco requested review from asvetlov and webknjaz as code owners May 17, 2026 04:05
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 17, 2026

Merging this PR will not alter performance

✅ 245 untouched benchmarks


Comparing bdraco:agents-md-test-coverage (f317f76) with master (6370ee2)

Open in CodSpeed

@bdraco bdraco enabled auto-merge (squash) May 17, 2026 05:51
@bdraco bdraco merged commit fc6933d into aio-libs:master May 17, 2026
68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant