Fix/deterministic error ordering#646
Open
afurious wants to merge 694 commits intoJagadeeshftw:devfrom
Open
Conversation
…er-ci-integration PR for Jagadeeshftw#486 Add Tests for Invariant Checker Integration in CI
…ion-flows test: add tests for dispute resolution flows
…cy-audit-and-guards Security/reentrancy audit and guards
…-escrow-dependencies Feat/cross program escrow dependencies
…lation-entrypoints feat(dry-run-simulator)
…als-rounding-policy-consistency feat: standardize token decimals and rounding policy in contracts
…-asset-identifiers Refactor/normalize asset identifiers
…ward-token-support
…ing-critical-flows added gas profiling
…e-scenarios test: add tests for multi-token fee and cross-token scenarios
…tch-with-migration
…applications handlers - Define clear validation precedence hierarchy for all handlers - Reorder validation checks to follow consistent priority: 1. Service Availability (db, config) 2. Input Format Validation (params parsing) 3. Authentication (user verification) 4. Request Body Validation (payload checks) 5. External Account Linking (GitHub account) 6. Resource Existence (project/issue lookup) 7. Database/Internal Errors (unexpected failures) 8. Authorization (permission checks) 9. Business Logic Constraints (business rules) 10. External Service Errors (GitHub API) - Apply() handler: Reordered to check service → input → auth → body → linking → existence → business logic - PostBotComment() handler: Reordered to separate existence, internal errors, authorization, and business logic - Withdraw() handler: Reordered to check existence before authorization, separate internal errors - Assign() handler: Reordered to separate existence, internal errors, authorization, and business logic - Unassign() handler: Reordered to separate existence, internal errors, authorization, and business logic - Reject() handler: Reordered to separate existence, internal errors, authorization, and business logic This change improves debuggability and predictability by ensuring the same inputs always produce the same error, regardless of execution path.
…-switch-with-migration Feat/controlled kill switch with migration
…hanism feat/dry run mechanism and safety checks
Owner
|
@afurious Can you please resolve the conflicts? |
…t-validation-human-readable-identifiers Fix/harden input validation human readable identifiers
…lags feat: add on-chain risk flags for programs and escrows
feat: added Sandbox Mode for Testing New Features with Real Data
…rogram-search-pagination feat: add escrow and program search with pagination
…ward-token-support
…list-modes Feat/blocklist allowlist modes
…e-reward-token-support PR for Jagadeeshftw#570 Support Non-Transferable Reward Tokens in Bounties
Resolved conflicts in contracts/bounty_escrow/contracts/escrow/src/lib.rs: - Combined test module imports (test_risk_flags + error_precedence_tests) - Integrated deterministic error ordering in lock_funds and release_funds - Maintained proper error priority checks from both branches
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.
closes #612
Ensure Deterministic Error Ordering and Prioritization