Skip to content

fix(contracts): drop title_badge from the workspace to unbreak Contracts CI - #1186

Merged
chinweobtagaz merged 1 commit into
mainfrom
fix/contracts-ci-title-badge
Sep 11, 2026
Merged

chinweobtagaz merged 1 commit into
mainfrom
fix/contracts-ci-title-badge

Conversation

@chinweobtagaz

@chinweobtagaz chinweobtagaz commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Problem

Contracts CI and the Soroban deploy workflow both run cargo from inside contracts/, which resolves contracts/Cargo.toml's own workspace (a superset of the root Cargo.toml workspace). That workspace includes title_badge, which pins soroban-sdk = "0.10.1" — a version no longer on crates.io (every other contract here uses 21.0.0). This has broken cargo test and cargo build --release --target wasm32-unknown-unknown from contracts/ for every push/PR for weeks:

error: failed to select a version for the requirement `soroban-sdk = "^0.10.1"`
required by package `title_badge v0.1.0`

Fix

Excluded title_badge from contracts/Cargo.toml's members. A version bump alone wouldn't have been enough — title_badge's source (lib.rs, storage.rs) is independently corrupted (mismatched braces, an Erro:: typo, Ok() instead of Ok(()), malformed turbofish generics, an undefined admin reference in revoke()). It needs a rewrite against the current SDK, not a mechanical fix, so it's left out with a comment explaining why. The deploy workflow's title_badge-specific post-deploy step becomes a no-op since no title_badge.wasm is produced.

Cargo.lock is regenerated — dependency resolution had never succeeded long enough to lock gasless_relayer, model_attestation, referral_splitter, or sponsorship_escrow, so those gained real entries for the first time.

Verified locally (matching CI exactly)

  • cargo test from contracts/: 85 passed. One flaky failure (test_reentrancy_guard_payout_tournament, a snapshot-file write Input/output error) that passes in isolation — very likely a WSL-mounted-drive I/O artifact from my local testing, not a real bug; worth watching on the actual Linux CI runner.
  • cargo build --release --target wasm32-unknown-unknown from contracts/: succeeds.

…cts CI

Contracts CI (and the Soroban deploy workflow) run cargo from inside
contracts/, which resolves contracts/Cargo.toml's own workspace rather
than the root one. That workspace's title_badge member pins
soroban-sdk = "0.10.1", a version that no longer exists on crates.io
(every other contract here uses 21.0.0), so dependency resolution has
failed outright for every push and PR for weeks — `cargo test` and
`cargo build --release --target wasm32-unknown-unknown` never got past
"failed to select a version for the requirement `soroban-sdk = "^0.10.1"`".

Bumping the version isn't enough on its own: title_badge's source
(lib.rs, storage.rs) is independently corrupted — mismatched braces, a
stray "Erro::" typo for "Error::", `Ok()` instead of `Ok(())`, malformed
turbofish generics, and a revoke() branch that references an undefined
`admin` variable. It needs a rewrite against the current SDK, not a
mechanical fix, so it's excluded from the workspace with a comment
explaining why (the deploy workflow's title_badge-specific post-deploy
step becomes a no-op, since no title_badge.wasm is produced anymore).

Cargo.lock is regenerated: dependency resolution had never succeeded
long enough to update it for gasless_relayer, model_attestation,
referral_splitter, and sponsorship_escrow, so those gained real lock
entries here for the first time.

Verified locally: `cargo test` (85 passed, plus one flaky snapshot-write
failure that passes in isolation and is very likely a WSL-mounted-drive
I/O artifact, not a real bug) and `cargo build --release --target
wasm32-unknown-unknown` both succeed from contracts/, matching CI.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@chinweobtagaz
chinweobtagaz merged commit 55adc59 into main Sep 11, 2026
1 check 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.

1 participant