Skip to content

test: TIP-1011 enhanced access key permissions coverage#3430

Open
decofe wants to merge 2 commits intomainfrom
georgen/tip1011-coverage
Open

test: TIP-1011 enhanced access key permissions coverage#3430
decofe wants to merge 2 commits intomainfrom
georgen/tip1011-coverage

Conversation

@decofe
Copy link
Copy Markdown
Member

@decofe decofe commented Apr 2, 2026

Targets mutation test survivors from TIP-1011 (#3384). Adds 19 compact
unit tests covering branches that cargo-mutants flagged as unkilled:

  • call_scope_allows_call: 10 tests exercising all 12 branches (None/empty scopes,
    create tx, target mismatch, selector match/mismatch, short input, recipient
    check, dirty ABI padding)
  • validate_t3_key_authorization_restrictions: 5 tests for too-many selector
    rules, duplicate selectors, too-many recipients, zero-address recipient,
    non-constrained selector with recipients
  • Pre-T3 gates: 2 tests for periodic limits and call scopes rejected before T3
  • KeyAuthorization helpers: 2 tests for has_periodic_limits and
    has_call_scopes branch coverage

Co-Authored-By: grandizzy 38490174+grandizzy@users.noreply.github.com

Prompted by: georgen

Adds 19 unit tests targeting mutation test survivors in key_authorization,
call_scope_allows_call, and validate_t3_key_authorization_restrictions.

Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019d4d32-4300-71d9-8d91-632c2147c49d
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

⚠️ Changelog not found.

A changelog entry is required before merging. We've generated a suggested changelog based on your changes:

Preview
---
tempo-primitives: patch
tempo-transaction-pool: patch
---

Added tests for `has_periodic_limits` and `has_call_scopes` helpers in key authorization, and exhaustive branch coverage for `call_scope_allows_call`, T3 key authorization restriction rejections, and pre-T3 gating of periodic limits and call scopes in the transaction pool validator.

Add changelog to commit this to your branch.

Group call_scope tests into single test_call_scope_allows_call_branches,
t3 restriction tests into test_t3_key_authorization_restriction_rejections,
and pre-T3 gate tests into test_pre_t3_rejects_tip1011_fields. Extract
allows() and abi_input() helpers plus t3_validate() to reduce boilerplate.

Co-Authored-By: grandizzy <38490174+grandizzy@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019d4d32-4300-71d9-8d91-632c2147c49d
@grandizzy grandizzy marked this pull request as ready for review April 2, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants