Skip to content

fix: originalKeys values include the full source path prefix when Options.Root is set,#49

Merged
Azhovan merged 1 commit into
mainfrom
fix/include-full-source-path-prefix
Mar 4, 2026
Merged

fix: originalKeys values include the full source path prefix when Options.Root is set,#49
Azhovan merged 1 commit into
mainfrom
fix/include-full-source-path-prefix

Conversation

@asadijabar
Copy link
Copy Markdown
Collaborator

Address copilot reviews here

Copilot AI review requested due to automatic review settings March 4, 2026 15:22
@asadijabar asadijabar self-assigned this Mar 4, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes provenance key mapping for sourcefile when Options.Root is used, so originalKeys reports the full dot-path within the source file (even though returned flattened keys remain relative to the selected subtree).

Changes:

  • Prefix originalKeys values with Options.Root when Root is set.
  • Update TestFileSource_Load_Root expectations to assert the full original dot-path for returned keys.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
sourcefile/file.go Adjusts LoadWithKeys to prepend Options.Root to originalKeys values, preserving full source-path provenance.
sourcefile/file_test.go Updates root-loading test to validate the new originalKeys behavior for multiple keys.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Azhovan Azhovan merged commit a6bf4a0 into main Mar 4, 2026
9 checks passed
@github-actions github-actions Bot deleted the fix/include-full-source-path-prefix branch March 4, 2026 15:26
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.

3 participants