Empty pr#791
Closed
Jumongweb wants to merge 4 commits into
Closed
Conversation
Contributor
|
this is the same bundled branch as #790 (near-identical diff, same files) which i just merged, so closing this one as the dup. thanks @Jumongweb - and no worries about the issue-tracking hiccup 🙏 |
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 #783
I am making this empty PR because the system is not picking issue 783 as in review. i made the changes together in a single branch. Below are the changes for this particular issue which are in the first pr.
Added the bootstrap-guard suite in insurance/src/test.rs, wired it into insurance/src/lib.rs, and documented the behavior in docs/insurance-bootstrap-guards.md.
The contract now also matches the requested safe pre-init read behavior: get_policy returns None, get_active_policies returns an empty page, and get_total_monthly_premium returns 0 before init. The tests cover single-shot init, pre-init rejection for every mutator, current init auth behavior, and post-init owner-only privilege enforcement.
Verification:
cargo test -p insurance --lib -- --nocapture passed
cargo clippy -p insurance --lib -- -D warnings passed
I also checked the package-wide command. cargo test -p insurance -- --nocapture is still failing, but from pre-existing stale integration tests under insurance/tests/ that reference APIs and constants this contract no longer exposes, not from the new bootstrap work.