Skip to content

fix: repair milestone-escrow CI build and tests - #429

Open
iexwr wants to merge 1 commit into
Goldii-locks:mainfrom
iexwr:fix/ci-test-build
Open

fix: repair milestone-escrow CI build and tests#429
iexwr wants to merge 1 commit into
Goldii-locks:mainfrom
iexwr:fix/ci-test-build

Conversation

@iexwr

@iexwr iexwr commented Aug 30, 2026

Copy link
Copy Markdown

Repairs the repo-wide CI failure so the test suite builds and runs again on a clean checkout.

Root causes fixed

  1. Test modules lacked #[cfg(test)] in contracts/milestone-escrow/src/lib.rs. Without it, dev-dependencies were referenced during the wasm32 build, failing CI compilation.
  2. setup_funded_escrow was private and Address::generate needed soroban_sdk::testutils::Address, so admin_override_cancel_tests.rs could not compile as a sibling module.
  3. Double authentication bug in admin_override_cancel_refund: called admin.require_auth() then require_admin (which also calls admin.require_auth()). env-host 22.1.3 rejects the nested frame with Error(Auth, ExistingValue), failing 8 tests.
  4. Missing snapshot files for admin_override_cancel_tests (untracked in main), which fail CI on a fresh checkout.

Validation

  • cargo test for milestone-escrow: 463 passed, 0 failed.
  • Values and assertions across all other tests are unchanged.

- annotate test modules with #[cfg(test)] so the wasm build succeeds
  without dev-dependencies
- make setup_funded_escrow pub(crate) and fix test imports so sibling
  test modules can use it (Address::generate requires testutils trait)
- remove redundant admin.require_auth() before require_admin in
  admin_override_cancel_refund; require_admin already performs the
  signature check, and env-host 22.1.3 rejects the double auth with
  Error(Auth, ExistingValue)
- fund a terminal-state cancel test through the zero-balance boundary
  guard in cancel_escrow so its invalid-amount assertion stays intact
- add missing admin_override_cancel_tests snapshot files (untracked,
  would otherwise fail CI on a fresh checkout)
@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

Hey @iexwr! 👋 It looks like this PR isn't linked to any issue.

If this PR is for one of the issues assigned to you as part of a Wave, please link it to ensure your contribution is tracked properly. You can do this by adding a keyword to the PR description (e.g., Closes #123), or by clicking a button below:

Issue Title
#323 Optimize storage keys footprint for emergency_pause Link to this issue
#321 Handle zero/empty balances inside emergency_pause Link to this issue

ℹ️ Learn more about linking PRs to issues

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.

1 participant