Pocket pay contract 27 - #521
Merged
Merged
Conversation
add a new test case mirroring the existing lock withdrawal test, verifying all vault state remains unchanged when a regular withdraw fails due to SAC token transfer failure
… docs Add a new `contract_error_codes` test module in the savings vault test suite that validates every ContractError variant panics with its assigned u32 numeric discriminant code. Overhaul the `sdk-error-mapping-guide.md` and `error-codes.md` documentation files to formalize the public error code interface, including categorized error ranges, client-side handling best practices, and reference implementation examples for SDKs and mobile apps.
Create new codebase analysis documents covering repository structure, workflows, and quality/debt assessment. Restructure comprehensive-analysis.md as the main entry point for the analysis package. Update the audit evidence index with the new storage audit map entry, remove the duplicate old vault storage audit map document, and update the last updated date for the audit documentation.
Add and update project documentation: - Add CI failure debugging link to CONTRIBUTING.md - Add new guide reference and TOC entry to README.md - Create new docs/reproducing-test-failures.md with steps to reproduce and debug test failures, including proptest seeds and snapshot mismatches
Create the full `docs/contribution-quality-gate.md` document with comprehensive PR quality checklists covering implementation, testing, documentation, and CI/CD requirements. Add a GitHub pull request template that requires contributors to confirm compliance with the quality gate. Update CONTRIBUTING.md to state that PRs must pass the gate before approval, and add references to the quality gate in README.md.
Add new `negative_paths` test module covering unauthorized access, invalid inputs, early withdrawals, uninitialized contract calls, and state consistency after failed operations. Add dedicated `test_withdraw_lock_emits_event` test to validate withdraw_lock event emission, closing the previously documented test coverage gap for this event. Update `docs/test-coverage.md` to fully document all covered test cases and organize the negative path test categories.
6 tasks
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 #489 # Pull Request
Issue Reference
Closes #
Summary
Contract Functions Changed
Tests Added or Updated
docs/testing.mddocs/test-coverage.mdupdated to reflect new or changed testsSecurity Considerations
Security checklist (contract changes only)
docs/accounting-invariants.mddocs/atomicity.mdrequire_auth()called on the correct address in every state-changing functiondocs/storage-change-checklist.mddocs/event-compatibility-policy.mdContractErrorvariants withpanic_with_error!, not barepanic!Commands Run
cargo fmt --check— passedcargo clippy --tests -- -D warnings— passedcargo test --workspace— passedCI Status
Acceptance Criteria Coverage