Skip to content

fix(markdown): preserve multi-dot filenames during resource parsing#1875

Open
zexuyann wants to merge 3 commits intovolcengine:mainfrom
zexuyann:fix-second-stem-only
Open

fix(markdown): preserve multi-dot filenames during resource parsing#1875
zexuyann wants to merge 3 commits intovolcengine:mainfrom
zexuyann:fix-second-stem-only

Conversation

@zexuyann
Copy link
Copy Markdown
Contributor

@zexuyann zexuyann commented May 6, 2026

Description

Fix a resource naming issue in OpenViking add_resource flow when generating filesystem folder names for filenames containing multiple dots.

Previously, Path(...).stem was applied twice during resource name generation. For filenames such as:

access.dns.a_b_c.yaml
access.dns.a_b_d.yaml

the second stem operation incorrectly truncated the semantic suffix, causing generated filesystem folder names to collapse to values such as:

accessdns
accessdns_1

This affected the directory name used when storing parsed resources on disk during the add_resource process.

This change removes the second Path(...).stem call and preserves the already-derived name to ensure stable filesystem folder naming.

Related Issue

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  • Remove the second Path(...).stem call in add_resource naming logic
  • Preserve semantic filename derived from original resource title
  • Fix incorrect filesystem folder name generation for multi-dot filenames

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

N/A

Additional Notes

Example naming flow after this change:

access.dns.app_a_b_c.yaml
access.dns.app_a_b_c
accessdnsapp_a_b_c

This ensures consistent filesystem folder naming during add_resource processing.

@zexuyann zexuyann changed the title Preserve multi-dot resource names during add_resource fix(markdown): preserve multi-dot filenames during resource parsing May 6, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🏅 Score: 90
🧪 No relevant tests
🔒 No security concerns identified
✅ No TODO sections
🔀 No multiple PR themes
⚡ No major issues detected

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

PR Code Suggestions ✨

No code suggestions found for the PR.

@zexuyann zexuyann force-pushed the fix-second-stem-only branch from bf19ac5 to 65cb844 Compare May 6, 2026 14:40
@zexuyann zexuyann force-pushed the fix-second-stem-only branch from 65cb844 to 416368e Compare May 6, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant