Skip to content

docs(internet): convert bare citations to the issue role in docstrings - #1003

Merged
JarryShaw merged 1 commit into
mainfrom
docs/989-internet-citations
Oct 3, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
docs/989-internet-citations

Conversation

@JarryShaw

@JarryShaw JarryShaw commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Please follow the guide below

What is the purpose of your pull request?

  • docs — documentation only

Description of your pull request and other information

Fourth tranche of #989, alongside #1002. Converts bare #NNN citations under pcapkit/protocols/internet/ and pcapkit/protocols/protocol.py to :issue: roles, continuing #1000's corekit pass.

Scope follows the ruling on #989: plain # comments keep the bare form, so only docstrings and #: autodoc doc-comments convert.

Tokenised by token kind, base e8a60d153 → head:

base head
bare in strings 115 36
bare in #: doc-comments 5 0
bare in plain # comments 58 58, untouched
:issue: roles 0 84

The 36 survivors are RFC packet-diagram labels, not citations — DH GROUP ID #1, HIT #1, Suite ID #2 and the like, all in hip.py. Every one is a single digit, and no 3-or-more-digit bare citation survives, so nothing real was skipped on that boundary.

84 roles across 25 distinct numbers, every one an issue rather than a pull request. 79 of the 84 sit inside docstrings (ast-checked); the other 5 are the #: doc-comments, which ast cannot see. None is a runtime string, so no message text changed, and the #%s caption leaves the rendered text identical. Docs build stays at 61 warnings and the two pre-existing docutils errors.

…docstrings (#989)

- Replace bare `#NNN` citations in docstrings and `#:` doc-comments under
  `pcapkit/protocols/internet/` and `pcapkit/protocols/protocol.py` with
  `:issue:` roles; plain `#` comments keep the bare form per the #989 ruling.
- Leave the 36 RFC packet-diagram labels (`DH GROUP ID #1` and the like) in
  `hip.py` untouched.

Docs build: 61 warnings / 2 errors before and after. tests/protocols/internet
and tests/test_docstring_contract.py pass.
@JarryShaw JarryShaw added docs Pull requests that change documentation only (docs: subject prefix) review: pending No verdict for the current head - never reviewed, or the head moved since the last one labels Oct 3, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at 6f59ff9c5 — opus cross-review, a different model from the sonnet agent that wrote the diff, briefed to falsify. No code defect. It found one real error in my own description, which I have corrected above, and it overturned a correction I had made:

  • I wrote that all 84 role sites are docstrings, ast-checked. Only 79 are. The other 5 are #: attribute doc-comments, which ast cannot see at all, so the check I claimed could not have covered them — and the body's own table lists those 5 separately, so it contradicted itself. Re-derived: 79 roles in string tokens, every one in docstring position, 5 in comment tokens. The substance holds — no role sits in a runtime string — but the wording did not.
  • My note that the authoring agent's "39 distinct numbers" was wrong is itself wrong. Both counts are real and measure different sets: distinct 3-or-more-digit citations across all token kinds, including the 58 plain comments left alone, is 39; across strings and #: only — the converted set — it is 25. Measured both on e8a60d153.

Independently confirmed beyond that: all 36 surviving one-digit citations sit inside .. code-block:: text RFC diagrams in hip.py, 0 outside; a prose-cue scan for short citations in prose returned 0 hits, so nothing real was skipped on the 3-digit boundary; the 58 plain-comment citations match base on file, number and comment text; 25 numbers, 25 issues, 0 PRs; and a base-vs-head comparison with every role collapsed back to #NNN is identical on all 11 files, which proves the diff is pure markup.

One thing worth knowing for the rest of #989: two GH-NNN citations at protocol.py:926,970 survive, both in plain # comments and so out of scope under the ruling. GH- is a spelling the sweep's #NNN framing does not cover.

Not ready to merge yet — CI still finishing, 0 failures so far.

@JarryShaw JarryShaw added review: good-to-go Cross-review at the current head says ready; CI state is separate and removed review: pending No verdict for the current head - never reviewed, or the head moved since the last one labels Oct 3, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Ready to merge at 6f59ff9c5 — closing the "not yet" on the verdict above. CI is complete: 69 CheckRun legs green, 3 skipped, 0 failures, 0 in flight, mergeStateStatus CLEAN. The opus verdict stands at this head, and the description fix it prompted is in place; nothing has been pushed since.

Yours to merge.

@JarryShaw
JarryShaw merged commit d4d0256 into main Oct 3, 2026
73 checks passed
@JarryShaw
JarryShaw deleted the docs/989-internet-citations branch October 3, 2026 13:10
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 3, 2026
@JarryShaw JarryShaw added this to the 1.5 milestone Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Pull requests that change documentation only (docs: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant