Skip to content

Conversation

@MrKeiKun
Copy link
Contributor

Summary

The Sietch add operation was incorrectly using filepath.Base(pair.Source) for manifest storage, causing files with identical names from different directories to overwrite each other's manifests.

AI Assistance

  • I used AI assistance (generate code, write tests, refactor, or docs)
    • If yes, briefly describe where and how:

Scope & Risk

  • Adds tests or updates existing tests
  • Security/privacy reviewed where applicable
  • Performance/complexity considered

Hacktoberfest Notes

  • Link the issue this PR resolves (required for consideration): add operation not storing the name of the file correctly. #138
  • Explain the problem and your approach in your own words (1-3 sentences):
    There was a typo on add.go line 257. It should have used destFileName rather filepath.Base(pair.Source) making files with identical names from different directories were overwriting each other's manifests. I also added a test there just to be safe.

Checklist

  • PR title is descriptive
  • Commits are meaningful (no bulk AI dumps)
  • No generated files or lockfile-only changes unless justified

@codecov
Copy link

codecov bot commented Oct 15, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/add.go 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

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.

1 participant