Skip to content

Commit c87b405

Browse files
authored
docs: resolve contributing.md docstring/CI-enforcement wording (#104)
contributing.md contradicted conventions.md on whether public-method docstrings are unconditionally required, and understated what CI machine-checks vs. overview.md's finer breakdown. Per maintainer ruling: docstring requirement is unconditional, and both sections now link to their truth-home files instead of restating them.
1 parent b48e4de commit c87b405

3 files changed

Lines changed: 52 additions & 9 deletions

File tree

docs/dev/contributing.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@ just test # pytest with coverage
2525
- `ruff format` enforces formatting; do not hand-format.
2626
- Type-check with `ty` (Astral). Use `# ty: ignore[<rule>]` for suppressions, not `# type: ignore`.
2727
- Do NOT use `from __future__ import annotations`. Python 3.11+ is the floor.
28-
- Module docstrings are required; per-method docstrings only when types alone are insufficient.
28+
- Module, class, and public-method docstrings are required (PEP 257); see
29+
[`architecture/conventions.md`](https://github.com/modern-python/httpware/blob/main/architecture/conventions.md).
2930

3031
## Architecture invariants
3132

32-
These are project invariants. The CI lint pass (`just lint-ci``ruff` + `ty`)
33-
catches what the linters can see (e.g. `print()` via ruff `T201`); the rest are
34-
enforced in code review. Do not break them in pull requests:
33+
These are project invariants — see
34+
[`architecture/overview.md`](https://github.com/modern-python/httpware/blob/main/architecture/overview.md) for exactly which
35+
ones CI machine-checks, partially checks, or leaves to review. Do not break
36+
them in pull requests:
3537

3638
- No `httpx2._*` (private API) usage anywhere in the library.
3739
- No `from __future__ import annotations`.

planning/audits/2026-07-13-docs-comments-audit.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,14 @@ Verified against source: the `try/except Exception: raise DecodeError(...)` live
6363
`contributing.md`: `"Module docstrings are required; per-method docstrings only when types alone are insufficient."` (conditional)
6464
`conventions.md`: `"Module / class / public-method docstrings are required ..."` (unconditional)
6565
*Fix:* pick one policy and make both files say it — recommend keeping `conventions.md`'s unconditional wording since it's the capability truth home, and updating `contributing.md` to match.
66+
**Resolved** (`2026-07-13.08`) — maintainer ruled unconditional; `contributing.md` now links to `conventions.md` instead of restating.
6667

6768
**I3 — `docs/dev/contributing.md:32-34` understates what CI machine-checks, vs `architecture/overview.md:9`.**
6869
`contributing.md`: `"The CI lint pass (...) catches what the linters can see (e.g. print() via ruff T201); the rest are enforced in code review."` — reads as "only `print()` is machine-checked."
6970
`overview.md`: documents two more checks contributing.md omits — `PGH003` (blanket `# type: ignore`) is machine-checked, and `SLF001` partially checks the `httpx2._` ban (attribute access, not import).
7071
This is a fresh drift, not a re-flag of the 2026-06-13 audit's I1 (that finding was about a since-removed "CI grep gates" phrase, already fixed) — `overview.md`'s finer breakdown was apparently added after `contributing.md`'s wording was last touched.
7172
*Fix:* replace `contributing.md`'s "the rest are enforced in code review" with the same three-tier breakdown `overview.md` uses (machine-checked / partially-checked / review-only), or have it link to `overview.md` instead of restating.
73+
**Resolved** (`2026-07-13.08`) — maintainer ruled link-instead-of-restate, per the repo's truth-home principle.
7274

7375
**I4 — `docs/testing.md:110` says `httpx` where it means `httpx2`.**
7476
`"MockTransport is the public test seam in httpx — supported by the maintainers, stable across versions ... respx patches private internals and has historically broken across httpx major versions."`
@@ -98,14 +100,12 @@ Same argument, ~3 near-identical sentences in each. Bundle this cleanup with the
98100
- **`2026-07-13.07-docs-comments-audit-fixes`** (lightweight) — fixes C1, C2,
99101
I1, I4. Verified against source; `just lint-ci`, `mkdocs build --strict`,
100102
and `just test` (780 passed, 100% coverage) all clean.
103+
- **`2026-07-13.08-contributing-docstring-ci-wording`** (lightweight) — fixes
104+
I2, I3 per maintainer ruling (unconditional docstrings; link instead of
105+
restate). Verified: `mkdocs build --strict`, `just lint-ci` clean.
101106

102107
## Deferred / next steps
103108

104-
- **Needs your call:** I3's fix direction (restate the three-tier breakdown in
105-
`contributing.md`, or replace it with a link to `overview.md`) and I2's
106-
policy choice (unconditional vs conditional method-docstring requirement) —
107-
both are wording contradictions where either side could be "the fix,"
108-
not a clear code-vs-doc mismatch. Not yet scheduled.
109109
- **Compaction:** D1 (`ResponseTooLargeError` triplication) and D2 (bundled
110110
with I4's `httpx`/`httpx2` fix — the "why not respx" duplication itself
111111
wasn't touched by `2026-07-13.07`, only the terminology slip within it) are
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
summary: Fixed 2 verified wording contradictions from the docs-and-comments audit — contributing.md's docstring requirement now matches conventions.md (unconditional), and its CI-enforcement claim links to overview.md instead of restating a stale subset.
3+
---
4+
5+
# Change: Resolve contributing.md wording contradictions (I2, I3)
6+
7+
**Lane:** lightweight — 1 file, docs-only, no code, no public-API change.
8+
9+
Spec: [`planning/audits/2026-07-13-docs-comments-audit.md`](../../audits/2026-07-13-docs-comments-audit.md)
10+
(findings I2, I3). Both were policy-wording calls, not code-vs-doc mismatches,
11+
resolved by the maintainer:
12+
13+
- **I2**`contributing.md` said per-method docstrings are required "only
14+
when types alone are insufficient"; `conventions.md` says public-method
15+
docstrings are unconditionally required. Maintainer ruling: unconditional
16+
wins — `conventions.md` is the capability truth home.
17+
- **I3**`contributing.md` implied only `print()` is CI-machine-checked;
18+
`overview.md` documents a finer 3-tier breakdown (machine-checked /
19+
partially-checked / review-only). Maintainer ruling: link instead of
20+
restate, per the repo's own truth-home principle (the same one D1/D2 in the
21+
audit flagged when violated the other way).
22+
23+
## Approach
24+
25+
`docs/dev/contributing.md`'s "Code style" and "Architecture invariants"
26+
sections now point at `architecture/conventions.md` and
27+
`architecture/overview.md` respectively instead of carrying their own
28+
(drifted) copies of the same facts.
29+
30+
## Files
31+
32+
- `docs/dev/contributing.md` — I2 docstring-requirement line now unconditional
33+
+ links to `conventions.md`; I3 CI-enforcement paragraph now links to
34+
`overview.md` instead of restating a stale subset.
35+
36+
## Verification
37+
38+
- [x] `mkdocs build --strict` succeeds (relative links resolve).
39+
- [x] `just lint-ci` — clean.
40+
- [x] Final read-through — no residual "only when types alone are
41+
insufficient" / "the rest are enforced in code review" wording remains.

0 commit comments

Comments
 (0)