-
Notifications
You must be signed in to change notification settings - Fork 9
feat: [LC-1350] - Add OBv3 Support to Boost Templates: evidence, alignment, source #831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
π¦ Changeset detectedLatest commit: 74de342 The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
β Deploy Preview for learncarddocs canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
β¨ PR Review
The PR successfully adds Open Badges v3 support with evidence, alignment, and source fields to boost templates. The implementation follows OBv3 specifications and includes proper conditional spreading logic.
1 issues detected:
π Bug - Empty objects could be spread into credentials when alignment or source are empty but truthy
Details: The conditional spreading for alignment and source fields will include empty objects in the credential if they are truthy but empty. This could result in credentials with empty alignment/source objects that may not conform to Open Badges v3 specifications.
File:packages/plugins/vc-templates/src/templates.ts (152-154)
Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using. We'd love your feedback! π
...(alignment && { alignment }), | ||
}, | ||
...(source && { source }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π Bug - Empty Object Spreading: Add checks to ensure alignment and source objects have meaningful content before spreading them, similar to the evidence array check that verifies both existence and length.
...(alignment && { alignment }), | |
}, | |
...(source && { source }), | |
...(alignment && Object.keys(alignment).length > 0 && { alignment }), | |
}, | |
...(source && Object.keys(source).length > 0 && { source }), |
π₯· Code experts: TaylorBeeston gerardopar, TaylorBeeston have most π©βπ» activity in the files. See details
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame: β¨ Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
β¨ PR Review
The PR successfully adds OBv3 support fields (evidence, alignment, source) to Boost templates. However, there's a critical type mismatch between the alignment field definition and its expected usage pattern based on the PR description.
2 issues detected:
π Bug - Type definition doesn't match the expected usage pattern and OBv3 specification requirements.
Details: The alignment field is defined as a single Alignment object, but the PR description and OBv3 specification indicate it should be an array of Alignment objects. This mismatch could cause runtime errors and non-compliance with OBv3 standards.
File:packages/plugins/vc-templates/src/types.ts (138-138)
π§Ή Maintainability - Inconsistent type safety patterns across related interface definitions reduce code maintainability.
Details: The Evidence interface uses a tuple type to ensure at least one element, while Source and Alignment use simple string arrays that could be empty. This inconsistency makes the codebase harder to maintain and could lead to OBv3 compliance issues.
File:packages/plugins/vc-templates/src/types.ts
Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using. We'd love your feedback! π
Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com>
Overview
π Relevant Jira Issues
π What is the context and goal of this PR?
This PR extends our core Boost credential templates (boost, boostID) to support additional Open Badges v3 fields β aligning more closely with OBv3 interoperability standards and enriching issued credentials with deeper context.
classifications.
π₯΄ TL; RL:
π‘ Feature Breakdown (screenshots & videos encouraged!)
π Important tradeoffs made:
π Types of Changes
π³ Does This Create Any New Technical Debt? ( If yes, please describe and add JIRA TODOs )
Testing
π¬ How Can Someone QA This?
β’ evidence
β’ alignment
β’ source
π± π₯ Which devices would you like help testing on?
π§ͺ Code Coverage
Documentation
π Gitbook
π Storybook
β PR Checklist
π Ready to squash-and-merge?:
β¨ PR Description
Purpose: Add Open Badges v3 support to Boost Templates by implementing evidence, alignment, and source fields according to OBv3 specification.
Main changes:
Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using. We'd love your feedback! π