.vbw-planning/ROADMAP.md
Milestone: rails-audit-and-modal
Goal: Fix high-priority security issues and low-effort quick wins from the Rails audit (findings M1, M3, M5, M12, C6, C9, V2, V8, V10, V11).
Success Criteria:
Plans:
Goal: Fix model-level issues: N+1 callbacks, missing scopes, raw SQL extraction, date range scopes (findings M4, M6, M7, M8, M9).
Success Criteria:
Plans:
Goal: Improve CRUD compliance and controller patterns (findings C1-C5, C7, C8, C10).
Success Criteria:
Requirements: C1 (ItemScrapesController), C2 (favicon cooldown), C4 (sources metrics), C5 (step dispatch), C7 (pluralizer decoupling), C8 (logging), C10 (redirect validation)
Plans:
Goal: Improve error handling, retry logic, and service patterns in jobs and pipeline (findings S1-S6).
Success Criteria:
Requirements: S1 (deadlock), S2 (retry extraction), S3 (job logic), S4 (Result pattern), S5 (error logging), S6 (error classification)
Goal: Extract view logic into ViewComponents, presenters, and helpers (findings V1-V15).
Success Criteria:
Requirements: V1 (filter extraction), V3 (N+1 documentation), V4 (targeted Turbo Streams), V5 (FilterButtonGroup), V6 (dropdown async), V7 (dropdown isolation), V9 (icon system), V12 (frame naming), V13 (namespace pollution), V14 (SourceDetailsPresenter), V15 (ModalComponent)
Goal: Consolidate test patterns, shared factories, and improve coverage discipline (findings T1-T17).
Success Criteria:
Requirements: T1 (VCR docs), T2 (fixture coupling), T3 (sub-module tests), T4 (integration gaps), T5 (system test coverage), T6 (shared factories), T7 (mocking), T8 (WebMock stubs), T9 (system test base), T10 (error paths), T11 (time tests), T12 (job naming), T13 (counter cache), T14 (test naming), T15 (shared behavior), T16 (wait config), T17 (temp cleanup)
Goal: Address 44 remaining findings from the 2026-03-14 Rails best practices audit. Focuses on job shallowness (extracting business logic from 4 jobs), data integrity (LogCleanupJob orphaned records), model correctness (health_status validation/default mismatch), controller DRY patterns (shared concerns), view layer improvements (StatusBadgeComponent, presenters, accessibility), and test parallel-safety.
Success Criteria:
set_source extracted to shared concern across 7 controllers (M6)rescue_from RecordNotFound added to ApplicationController (M5)role="dialog", aria-modal, and focus trapping (M22-M23)Requirements: H1-H6, M1-M14, M17-M26, L1-L5, L7-L12, L14-L23, L27-L28, L30
| Phase | Status | Plans | Done |
|---|---|---|---|
| 01 | ✓ Complete | 3 | 3 |
| 02 | ✓ Complete | 3 | 3 |
| 03 | ✓ Complete | 5 | 5 |
| 04 | ✓ Complete | 3 | 3 |
| 05 | ✓ Complete | 4 | 4 |
| 06 | ✓ Complete | 4 | 4 |
| 07 | ● Done |