Background
The Soroban workspace has grown to roughly 33 modules under soroban/src/, but the soroban/tests/ directory contains dedicated integration tests for only a handful of them — asset locking, operator rotation, source trust, threshold window, and version migration. That leaves a number of important modules — for example governance, circuit_breaker, and submission_pause — without dedicated end-to-end coverage of their public behavior.
For on-chain code, "it compiles and the unit assertions pass" is not the same as "its entrypoints behave correctly, enforce the right authorization, honor their guards, and emit the right events." Those properties are what integration tests against the contract's public interface actually verify, and for several modules they currently go unverified.
Why this matters
Contracts are hard to change after deployment and unforgiving when wrong, so the behavioral contract of each module — who may call what, what happens when paused or when a breaker is tripped, and which events observers depend on — deserves explicit tests. Beyond catching regressions, these tests serve as executable documentation of each module's intended behavior, which is invaluable as more contributors touch the code.
What needs to be done
- Pick a focused subset to start with (suggested:
governance, circuit_breaker, submission_pause) so the PR stays reviewable.
- For each chosen module, add integration tests under
soroban/tests/, mirroring the style of the existing suites (e.g. operator_rotation.test.rs, version_migration_tests.rs), that exercise its public entrypoints across:
- the happy path (valid calls produce the expected state),
- authorization enforcement (admin/owner gates reject unauthorized callers),
- guard/pause behavior (operations are correctly blocked when paused or when a breaker is open),
- emitted events (the right events fire with the right data).
- Reuse the shared setup helpers the existing suites already use, rather than duplicating harness code.
- Keep the tests fully deterministic so they run in the standard
cargo test CI job with no special setup.
Where to look
soroban/src/ — the target modules (governance.rs, circuit_breaker.rs, submission_pause.rs, and the rest of the ~33)
soroban/tests/ — existing suites to model the style and setup on
docs/API_REFERENCE.md, docs/EVENTS.md, docs/ERRORS.md — the documented behavior to assert against
Acceptance criteria
Background
The Soroban workspace has grown to roughly 33 modules under
soroban/src/, but thesoroban/tests/directory contains dedicated integration tests for only a handful of them — asset locking, operator rotation, source trust, threshold window, and version migration. That leaves a number of important modules — for examplegovernance,circuit_breaker, andsubmission_pause— without dedicated end-to-end coverage of their public behavior.For on-chain code, "it compiles and the unit assertions pass" is not the same as "its entrypoints behave correctly, enforce the right authorization, honor their guards, and emit the right events." Those properties are what integration tests against the contract's public interface actually verify, and for several modules they currently go unverified.
Why this matters
Contracts are hard to change after deployment and unforgiving when wrong, so the behavioral contract of each module — who may call what, what happens when paused or when a breaker is tripped, and which events observers depend on — deserves explicit tests. Beyond catching regressions, these tests serve as executable documentation of each module's intended behavior, which is invaluable as more contributors touch the code.
What needs to be done
governance,circuit_breaker,submission_pause) so the PR stays reviewable.soroban/tests/, mirroring the style of the existing suites (e.g.operator_rotation.test.rs,version_migration_tests.rs), that exercise its public entrypoints across:cargo testCI job with no special setup.Where to look
soroban/src/— the target modules (governance.rs,circuit_breaker.rs,submission_pause.rs, and the rest of the ~33)soroban/tests/— existing suites to model the style and setup ondocs/API_REFERENCE.md,docs/EVENTS.md,docs/ERRORS.md— the documented behavior to assert againstAcceptance criteria
cargo testCI job