Skip to content

Raise Codecov target to reflect actual coverage baseline #83

@nanotaboada

Description

@nanotaboada

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

  1. Add #[cfg(not(tarpaulin_include))] exclusions on the six infrastructure error branches above
  2. Run cargo tarpaulin locally and upload via codecovcli to confirm the new baseline
  3. Raise codecov.yml target to match the confirmed baseline

Acceptance Criteria

  • Infrastructure error branches excluded from tarpaulin instrumentation
  • codecov.yml target updated to reflect the confirmed baseline
  • Codecov reports 100% (or as close as meaningfully achievable) on the included paths
  • No legitimate business logic is excluded from the report
  • No regressions in existing tests

References

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestpriority:mediumPlanned enhancement. Queue for upcoming work.rustA language empowering everyone to build reliable and efficient software

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions