Skip to content

docs: harvest every settled design ruling into the convention docs, and split them per category #918

Description

@JarryShaw

Filed on the owner's ask. Verbatim, in two parts:

Another ask, sweep all closed or open issues and PRs and find those cases where we made a design decision to become a house convention. Those items should be documented to the Sphinx docs - and like I mentioned in #913, as there are more conventions settled, we might consider splitting the convention doc into multiple files under a folder, instead of one giant file for all.

And any future conventions to be settled - document them as well.

Why this is its own issue rather than part of #719

#719 is the prose concision-and-accuracy sweep and is held to merge last with #657. This is a different job — harvesting rulings out of issue history and turning them into reference documentation — and it should not wait on the changelog.

Part 1: harvest the settled conventions

Sweep every closed and open issue and PR for a design decision that has become a house rule, and record each in docs/source/contributing/conventions/. The bar is the one the existing page already sets: a ruling that is not derivable from the code, that a future maintainer or automated contributor would otherwise rediscover by reading a closed thread. Each entry names where it was settled and quotes the maintainer.

Known already-documented, for calibration — these are the shape to match, not the scope:

Candidates visible from this session's threads, each to be verified against its own thread before being written down: ESP double-inheriting because IANA marks it an extension header (#891); one commit per changelog entry as an audit trail (#657); breaking meaning a pack-path or public-contract change; every open issue carrying wip/blocked/needs: decision; the @classmethod requirement for any get override that delegates to the base (#908, #915); all meaning core addons only (#910). That list is a starting set, not the answer — the sweep is the work.

Part 2: split the convention doc

docs/source/contributing/conventions.rst is ~440 lines carrying three unrelated rulings, so a reader wanting the sentinel rule reads past two hundred lines on enum minting. Split it into one file per existing .. _label: anchor, which already marks the natural seams:

docs/source/contributing/conventions/index.rst          toctree + the .. important:: preamble
                                     mint-criterion.rst
                                     sentinel-convention.rst
                                     registry-protocol.rst

Every existing :ref: and :doc: target must keep resolving — the anchors are referenced from tests/ and from pcapkit/ docstrings, so a move that breaks them is a regression even though Sphinx will not fail the build without -W.

Part 3: a standing rule, going forward

And any future conventions to be settled - document them as well.

Recorded as an ongoing obligation, not a one-off: when a ruling settles a question that is not derivable from the code, it gets written into the convention docs in the same change that implements it — not left in the issue thread.

Sequencing

Part 2 conflicts with any open PR touching conventions.rst. #913 and #916 both do and are awaiting merge, so the split waits for both. Part 1's harvest can begin immediately, since it is research rather than edits.

gh pr view 913 -R JarryShaw/PyPCAPKit --json state -q .state
gh pr view 916 -R JarryShaw/PyPCAPKit --json state -q .state

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    designA design or decision issue: a pattern being decided rather than a defect or a requestdocsPull requests that change documentation only (docs: subject prefix)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions