Skip to content

feat(credence_bond): validate governance approval invariants with reg… - #1255

Open
Derekwalter999 wants to merge 1 commit into
CredenceOrg:mainfrom
Derekwalter999:feature/bond-governance-approval-fresh
Open

feat(credence_bond): validate governance approval invariants with reg…#1255
Derekwalter999 wants to merge 1 commit into
CredenceOrg:mainfrom
Derekwalter999:feature/bond-governance-approval-fresh

Conversation

@Derekwalter999

Copy link
Copy Markdown

Description

Ensures governance approval gating for parameter changes is correct and fully tested. Implements robust invariants for approver validation, proposal expiry, and category mapping.

Closes #1026

Type of Change

  • feat — new functionality
  • fix — bug fix
  • docs — documentation only
  • refactor — code restructuring with no behaviour change
  • test — test additions or improvements
  • ci — CI configuration changes
  • chore — maintenance, dependencies, tooling

How Has This Been Tested?

  • cargo test --workspace passes
  • cargo fmt --all -- --check passes
  • cargo clippy --workspace --all-targets --all-features -- -D warnings passes
  • Coverage ≥ 95% for affected crates (cargo llvm-cov --package <crate> --fail-under-lines 95)
  • Fuzz harness passes (cargo test -p credence_bond fuzz::test_bond_fuzz -- --nocapture)
  • Error code wire-stability test passes (cargo test -p credence_errors error_codes_wire)
  • Release build passes (cargo build --release)

Checklist

  • Tests added/updated for new or changed functionality
  • Docs updated (if public API, storage layout, error codes, or architecture changed)
  • CHANGELOG.md updated (if contracts/** touched)
  • Branch follows <type>/<short-description> naming convention
  • Commit messages follow conventional commits

Additional Context

  • Moved the GovernanceApproval struct and validate_governance_approval checks into governance_approval.rs to consolidate gating logic.
  • Achieved >95% line coverage for the new governance invariants in test_governance_approval.rs.

@drips-wave

drips-wave Bot commented Jul 31, 2026

Copy link
Copy Markdown

@Derekwalter999 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

[Fresh 2026-04][Contracts] Bond: governance approval invariants (expiry/actor/category) with tests

1 participant