Skip to content

Fix folded Path parsing and preserve verification markers - #212

Merged
enteriaza merged 1 commit into
masterfrom
167-bug-protocol-folded-path-is-rejected-and-diagnostics-are-deleted
Oct 19, 2026
Merged

enteriaza merged 1 commit into
masterfrom
167-bug-protocol-folded-path-is-rejected-and-diagnostics-are-deleted

Conversation

@enteriaza

Copy link
Copy Markdown
Collaborator

Summary

Closes #167

Fix Path header validation and canonicalization to accept valid folding whitespace while preserving the verification semantics of !! diagnostic markers.

Changes

  • Accept valid CRLF folding whitespace before Path delimiters, including space and tab continuations.
  • Reject folds after !, folds inside a Path component, bare CR/LF, and malformed continuations.
  • Preserve interior !! verification markers when both associated Path hops survive canonicalization.
  • Prevent tracker deduplication from transferring a verification marker to a different hop when the marker's right-hand hop is removed.
  • Preserve existing organizational tracker deduplication and application-hop traversal behavior.
  • Keep the original article buffer unchanged during Path analysis.
  • Update ArticleRecord.md and add regression coverage for folded Path values, diagnostic markers, tracker deduplication, and invalid inputs.

Validation

  • ArticlePathCanonicalizerTests — 34 passed
  • Parser and materializer tests — 138 passed
  • VectorNNTPD.Common.Tests — 944 passed
  • VectorNNTPD.BackFillerService.Tests — 1,266 passed
  • Release x64 solution build — 0 warnings, 0 errors
  • dotnet format VectorNNTPD.slnx --verify-no-changes — passed
  • Local CodeQL analysis — completed successfully; no findings in changed files

Compatibility and notes

Valid folded Path values are now accepted, while folds in invalid positions are rejected. Interior !! markers retain their verification meaning, and markers are not reassigned when duplicate tracker hops are removed.

The existing handling of diag-other and diag-deprecated forms is unchanged. TryWriteCanonicalPath continues to rely on its caller to enforce the 8,192-byte Path limit.

Local CodeQL results do not replace GitHub code scanning.

Fixes #167

Accept valid Path folding whitespace before delimiters and reject
folds in invalid positions. Preserve interior !! verification
markers without transferring them when duplicate tracker hops
are removed. Add regression coverage for parsing and canonicalization.
@enteriaza enteriaza self-assigned this Oct 19, 2026
@enteriaza enteriaza added the bug Something isn't working label Oct 19, 2026
@enteriaza
enteriaza merged commit 2d51ef8 into master Oct 19, 2026
7 checks passed
@enteriaza
enteriaza deleted the 167-bug-protocol-folded-path-is-rejected-and-diagnostics-are-deleted branch October 19, 2026 20:25
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.

[Bug: Protocol] Folded Path is rejected and !! diagnostics are deleted

1 participant