Skip to content

Conversation

@Le-Caignec
Copy link
Contributor

@Le-Caignec Le-Caignec commented Sep 29, 2025

No description provided.

Le-Caignec and others added 20 commits September 26, 2025 15:55
Added a new public view function `isDatasetCompatibleWithDeal` to verify the compatibility of a dataset order with a deal. This function includes multiple checks such as deal existence, dataset order owner signature, and restrictions on app, workerpool, and requester. Removed the `Matching` struct from `IexecPoco1Facet` and moved it to the `IexecPoco1` interface.
…ility

Removed redundant comment in `IexecPoco1Facet` and added comprehensive tests for the new `isDatasetCompatibleWithDeal` function. The tests cover various scenarios including compatibility checks, invalid signatures, and restrictions on dataset orders.
Introduced a new script to deploy and update the IexecPocoAccessorsFacet and IexecPoco1Facet. The script handles the deployment of new facets, removal of old facets, and updates the diamond proxy accordingly. It includes checks for required deployment options and logs the process for better traceability.
Refactored tests for the `isDatasetCompatibleWithDeal` function to improve clarity and coverage. Removed the creation of an incompatible dataset order and added checks for non-existent deals and deals that already have datasets. Updated test cases to ensure accurate validation of dataset order compatibility, including scenarios for incompatible app restrictions and tags.
@Le-Caignec Le-Caignec changed the title feat: enhance isDatasetCompatibleWithDeal function to revert with det… feat: enhance isDatasetCompatibleWithDeal function to revert with a reason Sep 29, 2025
…feature/add-isDatasetCompatibleWithDeal-function-part2
@codecov
Copy link

codecov bot commented Sep 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.83%. Comparing base (f7c634b) to head (b66c6bc).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #267      +/-   ##
==========================================
+ Coverage   83.66%   84.83%   +1.17%     
==========================================
  Files          38       37       -1     
  Lines        1218     1240      +22     
  Branches      227      235       +8     
==========================================
+ Hits         1019     1052      +33     
+ Misses        199      188      -11     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Le-Caignec Le-Caignec changed the title feat: enhance isDatasetCompatibleWithDeal function to revert with a reason feat: enhance isDatasetCompatibleWithDeal function to revert with a reason Sep 29, 2025
@Le-Caignec Le-Caignec requested a review from Copilot September 29, 2025 16:20
Copy link
Contributor

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 enhances the isDatasetCompatibleWithDeal function to return both a boolean result and a string reason for why compatibility checks fail, improving error reporting and debugging capabilities.

  • Modifies function signature to return a tuple (bool result, string memory reason) instead of just bool
  • Updates all compatibility check failure points to return specific error messages
  • Updates all tests to verify both the boolean result and the specific error reason

Reviewed Changes

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

File Description
contracts/interfaces/IexecPoco1.v8.sol Updates interface signature to return both result and reason
contracts/interfaces/IexecPoco1.sol Updates interface signature to return both result and reason
contracts/facets/IexecPoco1Facet.sol Implements enhanced function with specific error messages for each failure case
test/byContract/IexecPoco/IexecPoco1.test.ts Updates all test cases to destructure and verify both result and reason values

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Le-Caignec Le-Caignec changed the title feat: enhance isDatasetCompatibleWithDeal function to revert with a reason feat: enhance isDatasetCompatibleWithDeal function to return with a reason Sep 30, 2025
…feature/add-isDatasetCompatibleWithDeal-function-part2
Base automatically changed from feature/add-isDatasetCompatibleWithDeal-function to main September 30, 2025 13:40
@Le-Caignec Le-Caignec requested a review from zguesmi September 30, 2025 14:54
Copy link
Member

@zguesmi zguesmi left a comment

Choose a reason for hiding this comment

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

All good 👍

@Le-Caignec Le-Caignec merged commit 165d9d6 into main Oct 1, 2025
4 checks passed
@Le-Caignec Le-Caignec deleted the feature/add-isDatasetCompatibleWithDeal-function-part2 branch October 1, 2025 10:33
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.

4 participants