Magic numbers in schedule logic #24

Open
opened 2026-07-25 11:16:57 +00:00 by GKaszewski · 0 comments
Owner

Severity: Low

  • crates/domain/src/services/schedule/mod.rs has .with_limit(10_000) hardcoded inline in media_filter_to_library_search. Should be a named constant or configurable.
  • crates/domain/src/services/schedule/fill.rs has if idx > ordered.len() * 100 { break; } — an undocumented safety valve with a magic multiplier.

Extract these into named constants with comments explaining the rationale.

**Severity: Low** - `crates/domain/src/services/schedule/mod.rs` has `.with_limit(10_000)` hardcoded inline in `media_filter_to_library_search`. Should be a named constant or configurable. - `crates/domain/src/services/schedule/fill.rs` has `if idx > ordered.len() * 100 { break; }` — an undocumented safety valve with a magic multiplier. Extract these into named constants with comments explaining the rationale.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GKaszewski/k-tv#24