Skip to content

fakeserver, yenc: corpus cases from the pynntp review (#166) - #17

Merged
go-while merged 3 commits into
mainfrom
corpus-pynntp-166
Nov 13, 2026
Merged

go-while merged 3 commits into
mainfrom
corpus-pynntp-166

Conversation

@go-while

@go-while go-while commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Corpus cases for the open findings of greenbender/pynntp#166, so other client projects get the same tests. pynntp-cc-1 contributed concrete cases from the pynntp fixes.

pynntp finding new cases
#156 POST takes the first <...> in the 240 text post-240-address-in-text, post-240-empty-brackets (WantAccept)
#158 HDR/XHDR/XPAT first token hdr-msgid-unclosed-row, hdr-msgid-empty-row, hdr-negative-row, hdr-underscore-row, hdr-non-ascii-digit-row (WantError); hdr-msgid-row-for-range, hdr-plus-sign-row (WantEither)
#164 OVERVIEW.FMT names list-overview-fmt-empty-name, list-overview-fmt-bare-full (WantError); list-overview-fmt-space-before-colon, list-overview-fmt-leading-space (WantEither)
#159 stray =yend yenc.Corpus: stray-yend-after-block, plus text-after-yend, bad-crc32, bad-size, no-yend

API additions:

  • ReplyCase.Final: Lines replace the reply after the article of POST or IHAVE (Faults.OverrideFinal). Apply and ApplyLine both set it.
  • yenc.Case, yenc.Corpus(), yenc.CaseByName(), using the outcome classes of the reply corpus.

The reply corpus goes from 112 to 125 cases. An independent review's fixes are in (split OVERVIEW.FMT cases, softer +1, unshared yEnc Data, Why wording). README and fakeserver/doc.go are updated. go vet ./... and go test ./... pass.

Already covered, no change needed: #157 (11 broken-211 cases) and #161 (Faults.Trailing). Left for later: XZVER/XZHDR and XFEATURE COMPRESS GZIP in the fake server (#154, #155, #160).

🤖 Generated with Claude Code

go-while and others added 3 commits November 13, 2026 22:12
Reply corpus, 112 -> 123 cases:
- ReplyCase.Final: Lines replace the reply after the article of POST or
  IHAVE (Faults.OverrideFinal); Apply and ApplyLine set it.
- post-240-address-in-text, post-240-empty-brackets (accept): no
  message-id in the free 240 text.
- hdr-msgid-row-for-range, hdr-msgid-unclosed-row, hdr-msgid-empty-row,
  hdr-negative-row, hdr-plus-sign-row, hdr-underscore-row,
  hdr-non-ascii-digit-row (error).
- list-overview-fmt-empty-name (error), list-overview-fmt-padded-name
  (either).

yenc.Corpus: broken and odd posts for decoder test suites, with the
reply corpus outcome classes: stray-yend-after-block, text-after-yend,
bad-crc32, bad-size, no-yend.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- OVERVIEW.FMT: split the padded-name case into bare-full (error),
  space-before-colon and leading-space (either).
- hdr-plus-sign-row is WantEither (common parsers read the right
  number); the 1_0 Why says it reads 10.
- The 240 Why no longer claims the text holds no message-id; the two
  Final cases get their own comment group; Final docs say the corpus
  cases need a Store that allows posting.
- yenc: each case gets its own Data; the stray-yend Why says yEnc 1.3
  is silent; WantError for a decoder explained; tests check the =yend
  lines and that no two cases share Data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@go-while
go-while merged commit 8a5513c into main Nov 13, 2026
8 checks passed
@go-while
go-while deleted the corpus-pynntp-166 branch November 13, 2026 22:20
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