Skip to content

fix(agents): two-step admin transfer prevents bricking admin control - #927

Open
raymondidahor-bot wants to merge 1 commit into
Stellar-Ecosystem:mainfrom
raymondidahor-bot:transfer_admin
Open

fix(agents): two-step admin transfer prevents bricking admin control#927
raymondidahor-bot wants to merge 1 commit into
Stellar-Ecosystem:mainfrom
raymondidahor-bot:transfer_admin

Conversation

@raymondidahor-bot

Copy link
Copy Markdown

transfer_admin previously wrote new_admin directly, so a single typo irreversibly lost admin control. Now stores a PendingAdmin that must call accept_admin before promotion; adds cancel_admin_transfer.

Close #314

🤖 Generated with Codebuff

Summary

Closes #(issue-number)

Test Plan

  • Tests pass locally (npm test / cargo test as appropriate)
  • Lint / type-check passes (npm run lint / npx tsc --noEmit)
  • Changes have been tested in the relevant workspace (frontend, backend, contract, agent)

Contract Changes

  • Not applicable — this PR does not change contract code

Storage layout

  • No DataKey variant was added, removed, renamed, or had its payload type changed
  • No #[contracttype] struct changed shape (fields added, removed, reordered, or retyped)
  • Existing stored entries can still be read by this version

Migration plan:

ABI compatibility

  • No public function signature changed (name, parameters, return type)
  • No function was removed
  • Backend, agent, and frontend callers still compile against this ABI

Callers updated:

Deployment

  • No redeploy required — off-chain only
  • New WASM upload required, no state migration
  • New WASM upload and state migration required
  • New contract deployment (new contract ID — dependants must be reconfigured)

Target networks:

Test snapshots

Soroban writes contract/test_snapshots/*.json when tests run. A behavioural change
regenerates them, and stale snapshots hide real diffs.

  • cargo test was run and any changed snapshots are committed
  • Snapshot diffs were reviewed and are explained by this change
  • New tests cover the changed behaviour, including the failure paths

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in hard-to-understand areas
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

Environment

  • Workspace: (frontend / backend / contract / agent)
  • OS:
  • Node.js version (if applicable):

transfer_admin previously wrote new_admin directly, so a single typo
irreversibly lost admin control. Now stores a PendingAdmin that must
call accept_admin before promotion; adds cancel_admin_transfer.

Close Stellar-Ecosystem#314

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@raymondidahor-bot 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

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 08801c72-a384-4bd8-b5dc-15a489f5e94f


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

Agents: transfer_admin is single-step, so one typo permanently bricks admin control

1 participant