Skip to content

Add per-instance Seeker settings#565

Merged
Flaminel merged 4 commits into
mainfrom
move_seeker_settings
Apr 15, 2026
Merged

Add per-instance Seeker settings#565
Flaminel merged 4 commits into
mainfrom
move_seeker_settings

Conversation

@Flaminel

Copy link
Copy Markdown
Contributor

Relates to #536

@Flaminel

Copy link
Copy Markdown
Contributor Author

@sourcery-ai review

@Flaminel

Copy link
Copy Markdown
Contributor Author

@greptileai review

@greptile-apps

greptile-apps Bot commented Apr 15, 2026

Copy link
Copy Markdown

Greptile Summary

This PR moves monitoredOnly, useCutoff, and useCustomFormatScore from the global SeekerConfig to per-instance SeekerInstanceConfig, allowing different filter settings per Sonarr/Radarr instance. A data migration copies existing global values to all existing instance rows, and the frontend receives a new per-instance configuration card within the Proactive Search section. The previously flagged Enabled-check inconsistencies in BackgroundJobManager and the controller's previousAnyUseCustomFormatScore snapshot have both been resolved in this branch.

Confidence Score: 5/5

Safe to merge — all remaining findings are P2 style/quality suggestions with no correctness impact on the happy path.

The two previously flagged P1 issues (enabled-check inconsistency in BackgroundJobManager and the controller's previousAnyUseCustomFormatScore snapshot) are both resolved. The migration is correct and reversible. The only remaining findings are: missing server-side bounds validation on per-instance fields (bypassable only via direct API, not through the UI), Moq still used in existing test files being modified, and a minor frontend validation gap. None of these affect runtime correctness for normal use.

code/backend/Cleanuparr.Api/Features/Seeker/Contracts/Requests/UpdateSeekerInstanceConfigRequest.cs — no server-side validation on MinCycleTimeDays / ActiveDownloadLimit bounds.

Important Files Changed

Filename Overview
code/backend/Cleanuparr.Api/Features/Seeker/Controllers/SeekerConfigController.cs Core controller for the feature; enabled-check inconsistencies from prior review are resolved. No per-instance field validation.
code/backend/Cleanuparr.Api/Jobs/BackgroundJobManager.cs Startup CF syncer registration now correctly checks both s.Enabled and s.ArrInstance.Enabled, resolving the prior inconsistency.
code/backend/Cleanuparr.Persistence/Models/Configuration/Seeker/SeekerInstanceConfig.cs Adds monitoredOnly, useCutoff, useCustomFormatScore fields; no Validate() method to enforce server-side bounds on MinCycleTimeDays or ActiveDownloadLimit.
code/backend/Cleanuparr.Persistence/Migrations/Data/20260415192034_MoveSeekerFiltersToInstanceConfig.cs Well-written migration: adds columns with correct defaults, copies global values to existing instance rows, then drops global columns. Down migration is also present.
code/backend/Cleanuparr.Infrastructure/Features/Jobs/Seeker.cs Reads per-instance monitoredOnly/useCutoff/useCustomFormatScore correctly from SeekerInstanceConfig in both Radarr and Sonarr processing paths.
code/backend/Cleanuparr.Api.Tests/Features/Seeker/SeekerConfigControllerTests.cs New test file using NSubstitute + Shouldly correctly; covers CF syncer start/stop, interval reschedule, and instance config sync scenarios.
code/backend/Cleanuparr.Infrastructure.Tests/Features/Jobs/SeekerTests.cs Existing test file modified to add per-instance config tests; continues using Moq instead of NSubstitute per CLAUDE.md standards.
code/frontend/src/app/features/settings/seeker/seeker.component.ts Per-instance state management is clean; dirty tracking snapshot correctly includes all instance fields; minor edge case in instanceError check.
code/backend/Cleanuparr.Api/Features/Seeker/Contracts/Requests/UpdateSeekerInstanceConfigRequest.cs New per-instance request contract; no server-side validation for MinCycleTimeDays (min 1) or ActiveDownloadLimit (min 0) bounds.

Reviews (2): Last reviewed commit: "fixed enabled checks" | Re-trigger Greptile

Comment thread code/backend/Cleanuparr.Api/Jobs/BackgroundJobManager.cs Outdated
Comment thread code/backend/Cleanuparr.Api/Features/Seeker/Controllers/SeekerConfigController.cs Outdated
@Cleanuparr Cleanuparr deleted a comment from SourceryAI Apr 15, 2026
@Cleanuparr Cleanuparr deleted a comment from sourcery-ai Bot Apr 15, 2026
@Flaminel

Copy link
Copy Markdown
Contributor Author

@greptileai review

@codecov

codecov Bot commented Apr 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.31373% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ackend/Cleanuparr.Api/Jobs/BackgroundJobManager.cs 0.00% 4 Missing ⚠️
.../Cleanuparr.Infrastructure/Features/Jobs/Seeker.cs 73.33% 0 Missing and 4 partials ⚠️

📢 Thoughts on this report? Let us know!

@Flaminel Flaminel merged commit d875d88 into main Apr 15, 2026
13 checks passed
@Flaminel Flaminel deleted the move_seeker_settings branch April 15, 2026 20:16
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