Skip to content

fix: duplicate paths for dotted filenames + validation warnings (#266, #268)#269

Merged
rdmueller merged 1 commit intodocToolchain:mainfrom
raifdmueller:fix/duplicate-paths-266
Feb 7, 2026
Merged

fix: duplicate paths for dotted filenames + validation warnings (#266, #268)#269
rdmueller merged 1 commit intodocToolchain:mainfrom
raifdmueller:fix/duplicate-paths-266

Conversation

@raifdmueller
Copy link
Collaborator

Summary

  • Duplicate paths for files with dots in filename (e.g. version numbers) #266: Files with dots in names (e.g. RESULTS_v0.4.27.md) got duplicate paths because Path.with_suffix("") stripped version-like suffixes (.27). Root cause: MarkdownStructureParser was created without base_path in CLI and MCP server, AND _get_file_prefix used with_suffix("") which strips the last dot-suffix regardless.
    • Fix: New strip_doc_extension() utility that only removes known extensions (.md, .adoc, .asciidoc)
    • Fix: Pass base_path=docs_root to MarkdownStructureParser in both CLI and MCP server
  • Duplicate-path warnings missing from JSON validate output #268: Duplicate-path warnings from index building were only logged to stderr, not included in validate_structure JSON output.
    • Fix: Store build warnings in StructureIndex._build_warnings and emit as "duplicate_path" type in validation results

Fixes #266
Fixes #268

Test plan

🤖 Generated with Claude Code

…gs (docToolchain#266, docToolchain#268)

docToolchain#266: Files with dots in names (e.g. version numbers like v0.4.27.md)
got duplicate paths because Path.with_suffix("") stripped version-like
suffixes. Fix: strip only known doc extensions (.md, .adoc, .asciidoc)
via new strip_doc_extension() utility. Also pass base_path to
MarkdownStructureParser in CLI and MCP server.

docToolchain#268: Duplicate-path warnings from index building were only logged to
stderr, not included in validate_structure JSON output. Fix: store build
warnings in StructureIndex._build_warnings and include them as
"duplicate_path" type in validation results.

Bumps version to 0.4.30.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rdmueller rdmueller merged commit 15584c9 into docToolchain:main Feb 7, 2026
4 checks passed
@raifdmueller raifdmueller deleted the fix/duplicate-paths-266 branch February 7, 2026 21:46
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.

Duplicate-path warnings missing from JSON validate output Duplicate paths for files with dots in filename (e.g. version numbers)

2 participants