Skip to content

Fix CanonicalV1 double-stuffing during article persistence - #246

Merged
enteriaza merged 2 commits into
masterfrom
fix-materializer
Oct 23, 2026
Merged

enteriaza merged 2 commits into
masterfrom
fix-materializer

Conversation

@enteriaza

Copy link
Copy Markdown
Collaborator

Summary

Fixes double-stuffing of dot-leading article body lines during storage persistence by preserving the existing CanonicalV1 body when rewriting article headers.

Changes

  • Add PreserveCanonicalBody mode to the article canonical materialiser.
  • Update rented and non-rented Path rewrite paths to preserve canonical body bytes while rewriting Path and Date headers.
  • Document the distinction between NNTP transport dot-stuffing, destuffed article content, and CanonicalV1 storage representation.
  • Correct the persistence benchmark's rewrite-mode selection.
  • Add regression coverage for dot-leading body lines, including an end-to-end TAKETHIS → queue → worker → spool test.
  • Preserve existing queue-admission acknowledgement semantics: 239 does not wait for disk persistence.

Validation

  • Release x64 build completed with zero warnings.
  • Full StorageService test suite: 421 passed.
  • Focused regression tests passed.
  • dotnet format --verify-no-changes passed for the touched files.

Preserve CanonicalV1 body bytes when rewriting article Path and Date
headers before spooling. Add explicit body-mode documentation and
regression coverage for dot-leading lines across the TAKETHIS-to-spool
pipeline.

Keep queue-admission acknowledgement semantics unchanged.
@enteriaza enteriaza self-assigned this Oct 23, 2026
@enteriaza enteriaza added the bug Something isn't working label Oct 23, 2026
Remove the redundant CanonicalBodyMode check from the materialiser's
body-copy condition. PreserveCanonicalBody already sets extraDots to
zero, so behaviour remains unchanged while resolving CodeQL alert #2168.
@enteriaza
enteriaza merged commit c782cd6 into master Oct 23, 2026
7 checks passed
@enteriaza
enteriaza deleted the fix-materializer branch October 23, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants