fix: get main compiling and tests passing for Render deploy - #200
Merged
Conversation
main had accumulated several compile errors (missing Claims.jti field, a type mismatch in sponsor.rs, a missing build() arg in state.rs) plus an uncommitted non-custodial cutover (withdraw now tombstoned to 410 Gone) that several tests hadn't been updated for. Fixes: - crates/api/src/auth.rs: add missing `jti` field to two Claims literals - crates/api/src/routes/sponsor.rs: fix master_key_for_scheme arg type - crates/api/src/state.rs: pass missing master_key_next arg to build() - crates/api/src/routes/withdrawals.rs: custodial withdraw -> 410 Gone tombstone (client now signs and posts to /submit-signed instead) - crates/store/src/lib.rs, crates/wallet-core/src/signer.rs: drop unused imports flagged by clippy - crates/ingest/Cargo.toml, bin/backfill-operation-index/Cargo.toml: pin wiremock to 0.6.2 (edition2024 floor) and add clap's `env` feature Test fixes (all against the now-required non-custodial `public_key` on wallet creation, or the withdraw tombstone): - api_tests.rs, authz_matrix_tests.rs, malformed_body_tests.rs: wallet creation helpers now send a real generated public_key - drift_tests.rs: wallet creation is 201 not 200; withdraw is 410 not 422 - malformed_body_tests.rs: drop withdraw from the malformed-body route matrix (it 410s before parsing a body); use a non-empty JSON array for the "wrong shape" case ([] is valid for all-optional structs) - session_revocation_tests.rs: double-logout is a documented idempotent no-op (200), not a 401 - resume_replay_tests.rs: scope the test's stellar_tx_hash per run so reruns don't collide with earlier rows under the global (stellar_tx_hash, operation_index) unique constraint - api_tests.rs: remove custodial_trustline_is_gone (stale duplicate of already-removed withdraw-idempotency tests) and its now-dead post_json_auth_with_header helper Verified: cargo check/clippy/test --workspace all clean, and a release build of the server binary (matching Render's build command) succeeds. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Keep only fmt/clippy/test and the frontend typecheck/lint/build/test job.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mainfailed to build on Render (StellarNetwork::Standaloneand other compile errors). Root cause:mainhad accumulated several broken changes — a few outright compile errors, plus an uncommitted non-custodial cutover (custodialwithdrawnow tombstoned to410 Gone) that several tests hadn't caught up to.jtifield on twoClaimsliterals (auth.rs), a type mismatch insponsor.rs, a missingmaster_key_nextarg toAppState::build()instate.rs, unused imports flagged by clippy (store/src/lib.rs,wallet-core/src/signer.rs), and twoCargo.tomldependency fixes (wiremockpinned to0.6.2for the edition2024 floor,clap'senvfeature for#[arg(env = "DATABASE_URL")]).withdrawtombstone:POST /v1/wallets/:id/withdrawnow returns410 Gone— clients sign the payment client-side and POST to/submit-signedinstead (matches the non-custodial model already onfeat/non-custodial-v2).public_key-required wallet creation and the withdraw tombstone): updated wallet-creation helpers acrossapi_tests.rs,authz_matrix_tests.rs,malformed_body_tests.rs; fixed stale status-code expectations indrift_tests.rsandsession_revocation_tests.rs; excluded the tombstonedwithdrawroute from the malformed-body matrix; fixed a test-hygiene bug inresume_replay_tests.rswhere a hardcodedstellar_tx_hashcollided with leftover rows from an earlier run under the global(stellar_tx_hash, operation_index)unique constraint; removed a stale duplicate test block and its now-dead helper.Test plan
cargo check --workspace --all-targets— cleancargo clippy --workspace --all-targets --locked -- -D warnings— zero warningscargo test --workspace --locked— all tests pass (exit 0)cargo build --release -p octo-server— succeeds (matches Render's build command)🤖 Generated with Claude Code