-
Notifications
You must be signed in to change notification settings - Fork 14
refactor: Refactor dataset order tag ignoring code #332
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
Conversation
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.
Pull request overview
This PR refactors the dataset order tag ignoring code by extracting the bit masking logic into a reusable private function _ignoreTeeFramework in the Solidity contract, and by expanding test coverage to validate all combinations of TEE tags. The refactoring improves code maintainability by eliminating duplicated masking logic, enhances documentation with clear examples, and increases test coverage from 4 to 25 test cases for cross-framework compatibility.
Key changes include:
- Extraction of tag masking logic into
_ignoreTeeFrameworkfunction - Enhanced documentation with inline examples showing tag compatibility
- Comprehensive test coverage for all TEE tag combinations (5×5 matrix)
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| contracts/facets/IexecPoco1Facet.sol | Extracts duplicated tag masking logic into reusable _ignoreTeeFramework function and improves documentation with examples |
| utils/constants.ts | Adds helper arrays (ALL_TEE_TAGS) and mappings (TAG_NAMES) to support comprehensive test iteration and updates comments to reference Solidity implementation |
| test/byContract/IexecPoco/IexecPoco1.test.ts | Refactors tests to use nested forEach loops with ALL_TEE_TAGS, expanding coverage from 4 specific cases to 25 comprehensive combinations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #332 +/- ##
=======================================
Coverage 96.39% 96.39%
=======================================
Files 33 33
Lines 1136 1137 +1
Branches 228 228
=======================================
+ Hits 1095 1096 +1
Misses 41 41 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
matchOrders:assertDatasetDealCompatibility: