feat(backend): implement consistency checks for task registration and…#372
Open
OkeyAmy wants to merge 2 commits into
Open
feat(backend): implement consistency checks for task registration and…#372OkeyAmy wants to merge 2 commits into
OkeyAmy wants to merge 2 commits into
Conversation
|
@OkeyAmy Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
pr under review, if i find any wrong implementation i will notify you. |
2 similar comments
Contributor
|
pr under review, if i find any wrong implementation i will notify you. |
Contributor
|
pr under review, if i find any wrong implementation i will notify you. |
… ID allocation Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
8888cba to
a07767b
Compare
…ration Resolved conflict in lib.rs by keeping branch's doc comment format Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Author
|
@ayomideadeniran Check pr |
Author
|
@Henrichy review pr |
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.
Close #275
This PR implements consistency checks for task registration and sequential ID allocation in the SoroTask smart contract, as requested by the maintainer.
Changes Made
1. Documentation (
contract/src/lib.rs)register()function explaining:2. Consistency Check (
contract/src/lib.rs:170-176)register()to verify the newly allocated ID doesn't already have stored task data3. New Public Function (
contract/src/lib.rs:202-213)get_counter(env) -> u64to expose current counter value4. Expanded Test Suite (5 new tests)
test_id_counter_not_incremented_on_invalid_registrationtest_sequential_ids_multiple_registrationstest_id_uniquenesstest_id_not_reused_after_canceltest_id_monotonically_increasingTest Results
Acceptance Criteria Verification
register()andget_counter())