Skip to content

docs(const,vendor): FEATCode's docstring cites RFC 5797 "#secion-3", a typo that renders a wrong anchor #942

Closed

Description

@JarryShaw

Describe the bug

FEATCode's class docstring cites :rfc:5797#secion-3`` — secion, missing the `t`. Sphinx's `:rfc:` role does not validate the fragment, so it renders a live link to a wrong anchor and no build warns: nitpicky mode only checks `py:` targets.

It is in two places because one generates the other:

  • pcapkit/vendor/ftp/command.py:68 — inside the LINE f-string template at :40, i.e. the source of truth
  • pcapkit/const/ftp/command.py:28 — the generated copy

Reproduction

$ grep -n "secion-3" pcapkit/const/ftp/command.py pcapkit/vendor/ftp/command.py
pcapkit/const/ftp/command.py:28:    c.f., :rfc:`5797#secion-3`.
pcapkit/vendor/ftp/command.py:68:    c.f., :rfc:`5797#secion-3`.

Expected behavior

:rfc:5797#section-3``. Observed anchor #secion-3 (does not exist), expected `#section-3`.

Notes

  • Found while cross-reviewing docs(conventions,const): resolve part B's unresolved cross-references (#934) #941, which added FEATCode to docs/source/pcapkit/const/ftp.rst — so this docstring is now rendered on a published API page, which is why it is worth fixing rather than leaving.
  • This is the third pre-existing FEATCode docstring defect; docs(conventions,const): resolve part B's unresolved cross-references (#934) #941's body records the other two.
  • §3 is the right section (Initial Contents of Registry, where the keywords are listed). Deliberately leave get()'s :rfc:5797#section-2`` alone — it quotes §2.2's Registry Format wording verbatim and is correct as it stands.
  • Do not regenerate to fix this. Regenerating means a live IANA crawl; the line is a literal in the template, so editing both files identically is exactly what regeneration would produce.

System information

  • pcapkit commit: 1bd576ec1, Python 3.14.7, CPython, Linux.

Activity

  1. added
    bugIssues reporting a defect (set by the bug report template; a default, not an assessment)
    docsPull requests that change documentation only (docs: subject prefix)
    constRegenerated IANA or vendor constant tables; members keep their numeric values
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Sep 30, 2026
  2. JarryShaw commented on Sep 30, 2026

    @JarryShaw
    OwnerAuthor

    Fixed by #943, merged as cbd451097. Closing.

    That commit carries this issue's fix verbatim in both files:

    $ git show cbd451097 -- pcapkit/vendor/ftp/command.py pcapkit/const/ftp/command.py | grep -E '^[-+].*secion'
    -    c.f., :rfc:`5797#secion-3`.
    -        #: c.f., :rfc:`5797#secion-2.2`.
    -    c.f., :rfc:`5797#secion-3`.
    -        #: c.f., :rfc:`5797#secion-2.2`.
    

    (Four lines, not two: the template and its generated copy each carry both citations.)

    Verified on main at d7489c61c:

    • grep -rn secion pcapkit/ — no matches, repo-wide, so this class of typo is gone rather than just fixed here.
    • pcapkit/const/ftp/command.py:28 and pcapkit/vendor/ftp/command.py:68 both now read ``:rfc:`5797#section-3```, byte-identical between template and generated copy — which is what a regeneration would have produced, without the IANA crawl this issue said to avoid.
    • get()'s ``:rfc:5797#section-2``` was left alone as this issue asked. The secion-2.2` sibling at `:269`/`:257` was also corrected, which this issue did not ask for but docs(const,vendor): fix RFC anchor typos and missing section- prefixes #943 swept up.

    #943's new tests/project/test_rfc_anchor_fragments.py rejects secion-3 as malformed, so the typo cannot come back through a regeneration.

  3. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Sep 30, 2026
  4. added this to the 1.5 milestone on Oct 6, 2026
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

    bugIssues reporting a defect (set by the bug report template; a default, not an assessment)constRegenerated IANA or vendor constant tables; members keep their numeric valuesdocsPull requests that change documentation only (docs: subject prefix)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions