Skip to content

fix: get main compiling and tests passing for Render deploy - #200

Merged
Emmyt24 merged 2 commits into
mainfrom
fix/render-deploy-main-compile
Aug 2, 2026
Merged

fix: get main compiling and tests passing for Render deploy#200
Emmyt24 merged 2 commits into
mainfrom
fix/render-deploy-main-compile

Conversation

@Emmyt24

@Emmyt24 Emmyt24 commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

main failed to build on Render (StellarNetwork::Standalone and other compile errors). Root cause: main had accumulated several broken changes — a few outright compile errors, plus an uncommitted non-custodial cutover (custodial withdraw now tombstoned to 410 Gone) that several tests hadn't caught up to.

  • Compile fixes: missing jti field on two Claims literals (auth.rs), a type mismatch in sponsor.rs, a missing master_key_next arg to AppState::build() in state.rs, unused imports flagged by clippy (store/src/lib.rs, wallet-core/src/signer.rs), and two Cargo.toml dependency fixes (wiremock pinned to 0.6.2 for the edition2024 floor, clap's env feature for #[arg(env = "DATABASE_URL")]).
  • withdraw tombstone: POST /v1/wallets/:id/withdraw now returns 410 Gone — clients sign the payment client-side and POST to /submit-signed instead (matches the non-custodial model already on feat/non-custodial-v2).
  • Test fixes (all downstream of the non-custodial public_key-required wallet creation and the withdraw tombstone): updated wallet-creation helpers across api_tests.rs, authz_matrix_tests.rs, malformed_body_tests.rs; fixed stale status-code expectations in drift_tests.rs and session_revocation_tests.rs; excluded the tombstoned withdraw route from the malformed-body matrix; fixed a test-hygiene bug in resume_replay_tests.rs where a hardcoded stellar_tx_hash collided 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 — clean
  • cargo clippy --workspace --all-targets --locked -- -D warnings — zero warnings
  • cargo test --workspace --locked — all tests pass (exit 0)
  • cargo build --release -p octo-server — succeeds (matches Render's build command)

🤖 Generated with Claude Code

Emmyt24 and others added 2 commits August 2, 2026 20:34
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.
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