Problem
After #78 (exclusions) and #56 (error type refactor), the remaining coverage gaps in the included paths (src/services/, src/routes/, src/repositories/) are six infrastructure error branches that are only reachable if the database itself fails mid-request — not missing business logic tests:
src/services/player_service.rs
- Lines 88–89:
_ => CreateError::Database(e) — non-unique-violation insert failure
- Line 114:
return Err(UpdateError::NotFound) — TOCTOU race between existence check and update
src/routes/players.rs
- Line 113:
Err(CreateError::Database(_)) => Err(Status::InternalServerError)
- Line 147:
Err(UpdateError::Database(_)) => Err(Status::InternalServerError)
- Line 169:
Err(_) => Err(Status::InternalServerError) (delete)
The codecov.yml target is still at 80%, which no longer reflects the real baseline (~95–96% on included paths after current exclusions).
Proposed Solution
- Add
#[cfg(not(tarpaulin_include))] exclusions on the six infrastructure error branches above
- Run
cargo tarpaulin locally and upload via codecovcli to confirm the new baseline
- Raise
codecov.yml target to match the confirmed baseline
Acceptance Criteria
References
Problem
After #78 (exclusions) and #56 (error type refactor), the remaining coverage gaps in the included paths (
src/services/,src/routes/,src/repositories/) are six infrastructure error branches that are only reachable if the database itself fails mid-request — not missing business logic tests:src/services/player_service.rs_ => CreateError::Database(e)— non-unique-violation insert failurereturn Err(UpdateError::NotFound)— TOCTOU race between existence check and updatesrc/routes/players.rsErr(CreateError::Database(_)) => Err(Status::InternalServerError)Err(UpdateError::Database(_)) => Err(Status::InternalServerError)Err(_) => Err(Status::InternalServerError)(delete)The
codecov.ymltargetis still at 80%, which no longer reflects the real baseline (~95–96% on included paths after current exclusions).Proposed Solution
#[cfg(not(tarpaulin_include))]exclusions on the six infrastructure error branches abovecargo tarpaulinlocally and upload viacodecovclito confirm the new baselinecodecov.ymltargetto match the confirmed baselineAcceptance Criteria
codecov.ymltargetupdated to reflect the confirmed baselineReferences
codecov.ymlexclusions (parent)