Problem
tests/mint_burn_integration.rs contains 27 panic-prone calls (unwrap, expect, or panic!).
Evidence
tests/mint_burn_integration.rs:41 — .expect("DATABASE_URL must be set for integration tests");
tests/mint_burn_integration.rs:42 — PgPool::connect(&url).await.expect("db pool")
tests/mint_burn_integration.rs:47 — Arc::new(MintBurnMetrics::new(®istry).expect("metrics"))
tests/mint_burn_integration.rs:91 — .expect("create processed_events");
tests/mint_burn_integration.rs:105 — .expect("create ledger_cursor");
Proposed fix
Replace non-essential unwrap/expect usages with typed error propagation and contextual logging. Keep explicit panics only where unrecoverable invariants are well-documented.
Acceptance criteria
- All avoidable panic-prone calls in this file are removed or justified with comments/tests.
- Error paths return typed errors and preserve observability context.
- Existing tests pass (or new tests cover changed paths).
Problem
tests/mint_burn_integration.rscontains 27 panic-prone calls (unwrap,expect, orpanic!).Evidence
tests/mint_burn_integration.rs:41—.expect("DATABASE_URL must be set for integration tests");tests/mint_burn_integration.rs:42—PgPool::connect(&url).await.expect("db pool")tests/mint_burn_integration.rs:47—Arc::new(MintBurnMetrics::new(®istry).expect("metrics"))tests/mint_burn_integration.rs:91—.expect("create processed_events");tests/mint_burn_integration.rs:105—.expect("create ledger_cursor");Proposed fix
Replace non-essential
unwrap/expectusages with typed error propagation and contextual logging. Keep explicit panics only where unrecoverable invariants are well-documented.Acceptance criteria