Skip to content

Conversation

@grvillic
Copy link
Collaborator

Context

We are experimenting with a new component type for C++ SDK version detection.

Copilot AI review requested due to automatic review settings December 17, 2025 01:34
@grvillic grvillic requested a review from a team as a code owner December 17, 2025 01:34
@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

❌ Patch coverage is 98.64865% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.0%. Comparing base (f254244) to head (906c026).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...on.Contracts/BcdeModels/TypedComponentConverter.cs 0.0% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1599   +/-   ##
=====================================
  Coverage   90.0%   90.0%           
=====================================
  Files        435     437    +2     
  Lines      37107   37181   +74     
  Branches    2299    2306    +7     
=====================================
+ Hits       33426   33498   +72     
- Misses      3209    3210    +1     
- Partials     472     473    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

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 introduces a new CppSdk component type to support C++ SDK version detection in the Component Detection system. The implementation follows established patterns for TypedComponent classes and includes all necessary registrations for JSON serialization.

Key changes:

  • Added CppSdk enum value (20) to ComponentType enum
  • Created CppSdkComponent class with Name and Version properties, using "generic" PackageURL type with a "cppsdk" qualifier
  • Registered the new component in TypedComponent JSON polymorphic serialization and TypedComponentConverter for Newtonsoft.Json compatibility

Reviewed changes

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

Show a summary per file
File Description
ComponentType.cs Added CppSdk = 20 enum value with [EnumMember] attribute
CppSdkComponent.cs New component class with Name/Version validation, generic PURL with "type=cppsdk" qualifier
TypedComponent.cs Registered CppSdkComponent in [JsonDerivedType] attributes for System.Text.Json polymorphic serialization
TypedComponentConverter.cs Added CppSdk to component type mapping dictionary for Newtonsoft.Json compatibility
CppSdkComponentTests.cs Comprehensive unit tests covering constructor validation, property initialization, and PackageURL format

@grvillic grvillic enabled auto-merge (squash) December 17, 2025 01:49
@grvillic grvillic merged commit 601ebcd into main Dec 17, 2025
25 of 26 checks passed
@grvillic grvillic deleted the users/grvillic/IntroduceNewComponentType branch December 17, 2025 01:54
@github-actions
Copy link

👋 Hi! It looks like you modified some files in the Detectors folder.
You may need to bump the detector versions if any of the following scenarios apply:

  • The detector detects more or fewer components than before
  • The detector generates different parent/child graph relationships than before
  • The detector generates different devDependencies values than before

If none of the above scenarios apply, feel free to ignore this comment 🙂

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