Conversation
shahzadhaider1
approved these changes
Mar 16, 2026
rosecodym
approved these changes
Mar 18, 2026
Contributor
rosecodym
left a comment
There was a problem hiding this comment.
This is super cool, thanks! I appreciate the addition of the deprecated wrapper function to ease legacy conversion, but I wanted to note that using it might not end up being any less work than modifying the underlying functions directly once we bring this in.
- pass SourceMetadataInfo by value - remove LegacySourceMetadataFunc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
SourceMetadataFuncfrom a 7-parameter function to a struct-basedSourceMetadataInfoapproachLegacySourceMetadataFuncwrapper for backward compatibility with EE consumersBenefits
Branch) no longer requires changing the function signature across all consumersLegacySourceMetadataFuncallows gradual EE migrationTesting
Checklist:
make test-community)?make lintthis requires golangci-lint)?Note
Low Risk
Low risk type-level refactor, but it touches core git scanning paths; any missed field mapping could degrade metadata (links/line numbers) across sources.
Overview
Refactors git metadata callback plumbing by replacing the 7-parameter
SourceMetadataFuncwith a struct-basedSourceMetadataInfo, making the callback signature extensible without widespread breaking changes.Updates git chunk/commit/staged scanning code to construct and pass
SourceMetadataInfo(includingRepositoryLocalPath/Linewhere relevant), and migrates OSS consumers (github,gitlab,huggingface,github_experimental, andhack/snifftest) to the new callback shape while preserving existing metadata fields/links.Written by Cursor Bugbot for commit b160a79. This will update automatically on new commits. Configure here.