Skip to content

fix(engine-core): fix broken test_proxy_upgrade_success blocking CI - #174

Merged
N-thnI merged 1 commit into
mainfrom
fix/engine-core-proxy-upgrade-test
Aug 5, 2026
Merged

fix(engine-core): fix broken test_proxy_upgrade_success blocking CI#174
N-thnI merged 1 commit into
mainfrom
fix/engine-core-proxy-upgrade-test

Conversation

@N-thnI

@N-thnI N-thnI commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • test_proxy_upgrade_success (added in fix(proxy): add reentrancy guards and test coverage to UpgradeableProxy #169) has been failing on every CI run since it merged to main, including on main itself — it passes an arbitrary, never-uploaded Wasm hash to UpgradeableProxy::upgrade, which panics with HostError: Error(Storage, MissingValue) because update_current_contract_wasm requires the hash to correspond to Wasm already present in ledger storage.
  • Fix: upload an empty Wasm via env.deployer().upload_contract_wasm(Bytes::new(&env)) to get a real, valid hash. soroban-env-host explicitly supports zero-byte uploads under the testutils feature for exactly this kind of storage-focused test (it skips real Wasm parsing/instantiation, which the test doesn't need).
  • This is a test-only fix; no behavior in UpgradeableProxy itself changed.

Test plan

  • cargo test -p engine-core — 83/83 pass (was 82 passed / 1 failed before this fix)
  • cargo build --workspace --all-targets — clean

update_current_contract_wasm requires the target Wasm hash to already
be present in ledger storage (uploaded via Deployer::upload_contract_wasm),
but the test passed an arbitrary unregistered hash and failed with
"Wasm does not exist" on every run since it was introduced (#169), which
broke CI on main. Upload an empty Wasm, the pattern soroban-env-host
supports under testutils for cases like this, to get a valid hash.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@N-thnI
N-thnI merged commit 7b6fd89 into main Aug 5, 2026
3 checks passed
@N-thnI
N-thnI deleted the fix/engine-core-proxy-upgrade-test branch August 5, 2026 11:42
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