test: cover Halborn test assurance gaps#447
Open
carrion256 wants to merge 8 commits into
Open
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
51ed421 to
31137e2
Compare
Nexus: 4cb3451f-337d-4592-b11d-b1120fa14be2. Adds coverage proving permissive role policy for public actions does not bypass Soroban native require_auth in production-like contract context.
Nexus: d4706fd9-fc8b-4718-9931-c71f21d80585. Adds mocked-auth coverage proving verify_and_authorize records native auth on success and still preserves role-policy failures.
Nexus: 65436862-bc61-4b3d-91d0-2d2c62b59f01. Covers the production initialize entrypoint and asserts default storage/config onboarding rather than only seeded fixture state.
Nexus: 6c4d6806-a811-43d0-8b6f-9a300397ab7c. Pins allocation helper state against production begin_allocation_internal and covers direct supply allocation completion without helper-only transitions.
Nexus: 01a4c1b0-d06e-48ac-a003-c4d0138d9c87. Reframes the legacy mock-interpreter property to assert no reported growth, and adds production refresh-with-positions coverage for explicit external growth.
Nexus: eece8f19-9cbc-4091-af90-d5fd3a4f114f. Adds proxy-view conversion coverage through the live Soroban path with stored fee config/state instead of duplicating internals with separate semantics.
Nexus: 312a8142-9e1b-44a3-8928-3e029626d060. Marks the proxy-view parity case as intentional high-value Soroban-path coverage for large conversion ranges.
Nexus: a463103a-4082-4557-83b8-0c001983f56d. Adds decoder coverage for truncated, invalid-tag, invalid-UTF8, invalid-bool, invalid nested option, and trailing-byte command payloads.
31137e2 to
7a68d99
Compare
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.
Summary
Adds production-parity test assurance coverage for the Halborn test-harness findings, with one fix commit per finding token:
8d1fd652— #FIND-068 /4cb3451f-337d-4592-b11d-b1120fa14be2: native auth coverage must not be implied by permissive role checks.e9cc5c3d— #FIND-069 /6c4d6806-a811-43d0-8b6f-9a300397ab7c: allocation helper parity with production allocation state transitions.e0d95e3b— #FIND-071 /65436862-bc61-4b3d-91d0-2d2c62b59f01: initialization/onboarding storage/config coverage through the production entrypoint.3c8eb81d— #FIND-073 /01a4c1b0-d06e-48ac-a003-c4d0138d9c87: property-test external-growth wording corrected to reflect mock interpreter behavior, with explicit production growth coverage.1d254e79— #FIND-074 /eece8f19-9cbc-4091-af90-d5fd3a4f114f: fee/preview conversion parity test uses the live proxy view path.d7cb3d2d— #FIND-075 /312a8142-9e1b-44a3-8928-3e029626d060: high-value Soroban proxy-view conversion parity coverage is explicitly documented.31137e26— #FIND-076 /a463103a-4082-4557-83b8-0c001983f56d: malformed vault/governance command decode coverage.75edc6c1— #FIND-081 /d4706fd9-fc8b-4718-9931-c71f21d80585: SorobanAuth tests distinguish nativerequire_authfrom role-policy checks.Verification
cargo fmt --allcargo test -p templar-soroban-runtime verify_and_authorize_requires_native_auth_even_for_public_actions --lib -- --nocapturecargo test -p templar-soroban-runtime verify_and_authorize_records_native_auth_and_preserves_role_errors --lib -- --nocapturecargo test -p templar-soroban-runtime test_initialize_onboards_default_storage_and_config --lib -- --nocapturecargo test -p templar-soroban-runtime test_begin_allocating_helper_matches_production_begin_state --lib -- --nocapturecargo test -p templar-soroban-runtime test_direct_supply_allocation_covers_production_completion_flow --lib -- --nocapturecargo test -p templar-soroban-runtime test_complete_refresh_with_positions_accounts_for_external_growth --lib -- --nocapturecargo test -p templar-soroban-runtime test_proxy_view_uses_fee_aware_kernel_conversions_for_high_values --lib -- --nocapturecargo test -p templar-soroban-shared-types vault_command_decode_rejects_malformed_payloads_by_error_class -- --nocapturecargo test -p templar-soroban-shared-types governance_command_decode_rejects_incomplete_nested_payloads -- --nocapturecargo test -p templar-soroban-shared-types -- --nocapturecargo test -p templar-soroban-runtime --lib -- --nocapture(110 passed)cargo test -p templar-soroban-runtime --test property_tests -- --nocapture(23 passed)git diff --checksize-budget-checkpassed during commits (93961bytes)Notes
Test-only/shared-types unit coverage. No production runtime behavior change.
This change is