Skip to content

test(flow): cover workflow handlers and playback seams - #173

Draft
Vittuu wants to merge 1 commit into
alvarorichard:devfrom
Vittuu:pr3-flow-handlers-playback
Draft

test(flow): cover workflow handlers and playback seams#173
Vittuu wants to merge 1 commit into
alvarorichard:devfrom
Vittuu:pr3-flow-handlers-playback

Conversation

@Vittuu

@Vittuu Vittuu commented May 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add hermetic coverage for download workflow routing, handler entrypoints, and playback smoke paths
  • introduce small seam wrappers so workflow and playback logic can be tested without mpv, network, or interactive TUI dependencies
  • keep the slice self-contained against dev by using local compatibility wrappers instead of depending on pending PRs

Why

This is the next flow-oriented slice after the API/source work. It covers the high-value routing paths that were still under-tested: download workflow dispatch, handler request plumbing, and playback orchestration before the mpv boundary.

Validation

  • go test ./internal/download ./internal/handlers ./internal/playback -count=1
  • go test ./internal/download ./internal/handlers ./internal/playback -cover -count=1
  • go build ./cmd/goanime
  • go run ./cmd/goanime --version

Notes

  • Interactive playback selection tests stay opt-in by requiring GOANIME_INTERACTIVE_TESTS=1 and a real TTY.
  • This remains draft while GitHub checks run.

@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 20 medium

Alerts:
⚠ 20 issues (≤ 0 issues of at least minor severity)

Results:
20 new issues

Category Results
UnusedCode 20 medium

View in Codacy

🟢 Metrics -13 complexity · -11 duplication

Metric Results
Complexity -13
Duplication -11

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@deepsource-io

deepsource-io Bot commented May 2, 2026

Copy link
Copy Markdown
Contributor

DeepSource Code Review

We reviewed changes in 39317fe...3575f94 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Go May 2, 2026 2:12a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@codecov

codecov Bot commented May 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 46.15385% with 56 lines in your changes missing coverage. Please review.
✅ Project coverage is 27.13%. Comparing base (d333714) to head (3575f94).
⚠️ Report is 21 commits behind head on dev.

Files with missing lines Patch % Lines
internal/playback/common.go 37.14% 21 Missing and 1 partial ⚠️
internal/download/workflow.go 56.75% 16 Missing ⚠️
internal/playback/movie.go 0.00% 7 Missing ⚠️
internal/handlers/media.go 0.00% 5 Missing ⚠️
internal/handlers/playback.go 0.00% 2 Missing ⚠️
internal/playback/series.go 81.81% 2 Missing ⚠️
internal/handlers/download.go 75.00% 0 Missing and 1 partial ⚠️
internal/handlers/update.go 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #173      +/-   ##
==========================================
+ Coverage   24.18%   27.13%   +2.94%     
==========================================
  Files          93       93              
  Lines       21097    21466     +369     
==========================================
+ Hits         5102     5824     +722     
+ Misses      15412    14993     -419     
- Partials      583      649      +66     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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