refactor: split 4 files exceeding 800-line limit#118
Merged
forkwright merged 1 commit intomainfrom Mar 18, 2026
Merged
Conversation
Extract test modules from four files that violated the RUST/file-too-long
limit (800 lines):
- harmonia-db: play_history.rs (1575 lines) → play_history/{mod,tests}.rs
- paroche: opds/catalog.rs (1161 lines) → opds/catalog/{mod,tests}.rs
- harmonia-host: tests/acquisition_integration.rs (1116 lines) →
extraction of pipeline_tests and recovery_tests into submodule files
- komide: service.rs (817 lines) → service/{mod,tests}.rs
All public APIs unchanged. Zero RUST/file-too-long violations remain.
All tests pass.
Closes #1613
Contributor
|
Consider splitting into smaller PRs for easier review. Not a blocker, just a signal. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
play_history.rs(1575 lines) →play_history/{mod,tests}.rs; tests extracted as#[cfg(test)] mod tests;submoduleopds/catalog.rs(1161 lines) →opds/catalog/{mod,tests}.rs; same patterntests/acquisition_integration.rs(1116 lines) → pipeline and startup-recovery tests extracted intotests/acquisition_integration/{pipeline_tests,recovery_tests}.rsvia#[path]attributesservice.rs(817 lines) →service/{mod,tests}.rs; same pattern as the db/paroche splitsTest plan
cargo fmt --all -- --checkpassescargo clippy --workspace --all-targets -- -D warningspassescargo test --workspacepasses (all tests pass, verified locally)cargo test --workspace --docpasseskanon lint . --rustreports zeroRUST/file-too-longviolationsCloses #1613
Observations
kanon lintfound exactly 4 at the time of this work. The remaining 41 may be tracked under a different lint rule or were fixed separately.acquisition_integration.rsrequired#[path = "..."]attributes because Rust 2024 module path resolution for integration test root files looks in the same directory, not a subdirectory named after the file. The#[path]attributes are explicit and correct.pipeline_retry_budget_exhaustion_marks_faileddocuments a known bug inSyntaxisServicewhereActiveEntry.retry_countresets to 0 on re-load; this was pre-existing and is preserved as-is.