Skip to content

feat(sources): add canonical manifest path normalization and validation#48

Open
jony376 wants to merge 1 commit into
aglover1221:mainfrom
jony376:fix/issue-46-manifest-path-normalization
Open

feat(sources): add canonical manifest path normalization and validation#48
jony376 wants to merge 1 commit into
aglover1221:mainfrom
jony376:fix/issue-46-manifest-path-normalization

Conversation

@jony376
Copy link
Copy Markdown

@jony376 jony376 commented May 31, 2026

Related issues

Closes #46

Summary

  • add normalizeManifestLocalPath() to centralize manifest local path normalization + validation
  • derive scope from normalized paths and reuse the helper in classifyScope
  • harden resolveManifestPath with path.relative repo-root checks
  • normalize/filter invalid sources rows in readProductMdManifest
  • add unit tests for normalization, scope derivation, and unsafe traversal rejection

Why this is structural

This introduces a reusable path-normalization layer and rewires manifest ingestion to use it end-to-end, instead of scattered string handling.

Validation

  • Added/updated unit tests in tests/unit/sources.test.ts
  • Could not run Vitest in this environment because local Node is v18.19.0 while project Vitest/rolldown requires newer Node runtime.

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.

sources: add canonical manifest-path normalization + validation helper

1 participant