Skip to content

fix(admin): revalidate ownership transfer candidates - #1300

Merged
Baskarayelu merged 3 commits into
CredenceOrg:mainfrom
Killerjunior:codex/issue-1296-admin-atomic-rollback
Aug 29, 2026
Merged

fix(admin): revalidate ownership transfer candidates#1300
Baskarayelu merged 3 commits into
CredenceOrg:mainfrom
Killerjunior:codex/issue-1296-admin-atomic-rollback

Conversation

@Killerjunior

Copy link
Copy Markdown
Contributor

Closes #1296

Description

Revalidates ownership-transfer candidates immediately before ownership is written. A pending candidate that becomes deactivated, suspended, removed, or demoted during the timelock can no longer accept ownership.

Adds integration-boundary rollback regression tests confirming failed acceptance leaves the owner, pending owner, and event stream unchanged. Documents the atomicity invariant and compatibility impact.

Type of Change

  • fix — bug fix
  • test — test additions or improvements
  • docs — documentation only

How Has This Been Tested?

  • cargo test --workspace passes
  • cargo fmt -p admin -- --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)

cargo test -p admin was attempted but blocked before compiling the admin crate by an existing dependency-resolution conflict in soroban-env-host involving incompatible rand_core versions.

Checklist

  • Tests added/updated for new or changed functionality
  • Docs updated
  • CHANGELOG.md updated
  • Branch follows <type>/<short-description> naming convention
  • Commit messages follow conventional commits

Additional Context

Compatibility: no public API, response-shape, storage-layout, or migration changes. Acceptance now rejects an otherwise pending ownership transfer if its candidate is no longer an active, unsuspended SuperAdmin.

Security/correctness: all eligibility checks execute before the first ownership write. A rejected acceptance therefore preserves the current owner, pending proposal, proposal timestamp, and event stream atomically.

@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@Killerjunior 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

@Baskarayelu
Baskarayelu merged commit 500cfa9 into CredenceOrg:main Aug 29, 2026
12 checks passed
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.

[Quality][High] admin and arbitration controls: atomic rollback — QE-2026-08

2 participants