Skip to content

docs: correct invariant-enforcement claims + readability follow-ups#58

Merged
lesnik512 merged 1 commit into
mainfrom
docs/audit-followups
Jun 14, 2026
Merged

docs: correct invariant-enforcement claims + readability follow-ups#58
lesnik512 merged 1 commit into
mainfrom
docs/audit-followups

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Second batch of follow-ups from the docs audit. The first batch (verified bugs B1/B2/I1/I2/I3) already landed on main; this PR covers the invariant-enforcement claim fix plus the readability/small-gap findings.

Invariant enforcement — fix the overstated claim

The "(CI-enforced) / CI rejects PRs that violate them" heading was wrong. Verified empirically against the real ruff --select ALL ruleset:

Invariant Machine-enforced?
print() ✅ ruff T201
blanket # type: ignore ✅ ruff PGH003
httpx2._ private API ⚠️ partial — SLF001 catches attribute access, not a used private import (from httpx2._x import …)
from __future__ import annotations ❌ review only
logging.basicConfig() / bare getLogger() ❌ review only

Rewrote the heading + intro in CLAUDE.md and architecture/overview.md to state the actual split, and reframed the httpx2._ grep as a review check (it is not wired into CI).

Readability + small-gap findings

  • R3 docs/errors.md — examples used _LOGGER undefined (copy-paste NameError); added import logging + _LOGGER = logging.getLogger("myapp") and a note.
  • G5 docs/errors.md — documented the public STATUS_TO_EXCEPTION mapping (the lone undocumented __all__ export).
  • R2 README.md — glossed "Finagle-style RetryBudget" (token bucket capping the global retry rate) and "PEP 678 note".
  • R1 README.md + docs/resilience.md — de-densified the decoder-resolution sentence and the run-on respect_retry_after table cell.

Verification

  • mkdocs build --strict — clean (no broken refs)
  • just lint — clean (no source touched)

Still open (separate, design-led work)

The structural docs-UX gaps need a design.md, not mechanical edits: G1 why-httpware, G2 base-client migration guide, G3 de-dup README ↔ index.md, G4 runnable quickstart, G6 custom-decoder guide + mkdocstrings API reference, plus nav-ordering nits.

🤖 Generated with Claude Code

Second batch of docs-audit follow-ups (audit: planning/audits/2026-06-13-docs-audit.md).

Invariant enforcement (triage item, option 2 — fix the claim):
Empirically confirmed against ruff --select ALL that the "(CI-enforced) / CI
rejects PRs" heading was overstated. Only print() (T201) and a blanket
# type: ignore (PGH003) are machine-checked; httpx2._ is partial (SLF001 catches
attribute access, not a used private import); the future-import, global-logging,
and # ty:-vs-# type: rules are review-only. Rewrote the heading + intro in
CLAUDE.md and architecture/overview.md to the real split and reframed the
httpx2._ grep as a review check, not a CI gate.

Readability + small-gap findings:
- R3 errors.md: examples used _LOGGER undefined; added import logging +
  _LOGGER = logging.getLogger("myapp") and a note.
- G5 errors.md: documented the public STATUS_TO_EXCEPTION mapping (lone
  undocumented __all__ export).
- R2 README: glossed Finagle-style RetryBudget (token bucket capping global
  retry rate) and PEP 678 note.
- R1 README + resilience.md: de-densified the decoder-resolution sentence and
  the respect_retry_after table cell.

Change bundle: planning/changes/active/2026-06-13.05-docs-audit-followups/
mkdocs build --strict and just lint both clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lesnik512 lesnik512 merged commit a132c1e into main Jun 14, 2026
5 checks passed
@lesnik512 lesnik512 deleted the docs/audit-followups branch June 14, 2026 06:40
lesnik512 added a commit that referenced this pull request Jun 14, 2026
Both docs-audit fix bundles have shipped, so promote them out of active/ per
the planning convention:

- 2026-06-13.04-docs-accuracy-fixes -> archive/ (status: shipped; pushed to main
  as f203821)
- 2026-06-13.05-docs-audit-followups -> archive/ (status: shipped; #58)

Index "Active" is now empty; both lines moved to "Archived (shipped)".
Docs-only/bookkeeping; no code or capability change.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant