source_monitor 0.7.1 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/.claude/commands/release.md +18 -6
  3. data/.claude/skills/sm-configure/SKILL.md +10 -1
  4. data/.claude/skills/sm-configure/reference/configuration-reference.md +44 -0
  5. data/.claude/skills/sm-host-setup/reference/initializer-template.md +17 -0
  6. data/.claude/skills/sm-host-setup/reference/setup-checklist.md +2 -0
  7. data/.claude/skills/sm-job/reference/job-conventions.md +26 -0
  8. data/.claude/skills/sm-upgrade/reference/version-history.md +22 -0
  9. data/.gitignore +10 -0
  10. data/AGENTS.md +1 -1
  11. data/CHANGELOG.md +45 -0
  12. data/CLAUDE.md +24 -3
  13. data/Gemfile.lock +1 -1
  14. data/README.md +6 -4
  15. data/Rakefile +0 -2
  16. data/VERSION +1 -1
  17. data/app/assets/builds/source_monitor/application.css +43 -0
  18. data/app/assets/builds/source_monitor/application.js +127 -0
  19. data/app/assets/builds/source_monitor/application.js.map +3 -3
  20. data/app/assets/javascripts/source_monitor/application.js +2 -0
  21. data/app/assets/javascripts/source_monitor/controllers/notification_container_controller.js +138 -0
  22. data/app/assets/javascripts/source_monitor/controllers/notification_controller.js +11 -0
  23. data/app/controllers/source_monitor/source_favicon_fetches_controller.rb +38 -0
  24. data/app/controllers/source_monitor/sources_controller.rb +11 -0
  25. data/app/helpers/source_monitor/application_helper.rb +51 -0
  26. data/app/jobs/source_monitor/favicon_fetch_job.rb +71 -0
  27. data/app/jobs/source_monitor/import_opml_job.rb +9 -0
  28. data/app/jobs/source_monitor/source_health_check_job.rb +10 -0
  29. data/app/models/source_monitor/source.rb +2 -0
  30. data/app/views/layouts/source_monitor/application.html.erb +23 -2
  31. data/app/views/source_monitor/import_sessions/steps/_preview.html.erb +7 -2
  32. data/app/views/source_monitor/shared/_toast.html.erb +1 -0
  33. data/app/views/source_monitor/sources/_details.html.erb +34 -5
  34. data/app/views/source_monitor/sources/_row.html.erb +11 -6
  35. data/config/routes.rb +1 -0
  36. data/docs/configuration.md +1 -1
  37. data/docs/upgrade.md +22 -0
  38. data/lib/generators/source_monitor/install/templates/source_monitor.rb.tt +15 -1
  39. data/lib/source_monitor/configuration/favicons_settings.rb +42 -0
  40. data/lib/source_monitor/configuration/http_settings.rb +1 -1
  41. data/lib/source_monitor/configuration/scraping_settings.rb +1 -1
  42. data/lib/source_monitor/configuration.rb +3 -1
  43. data/lib/source_monitor/favicons/discoverer.rb +196 -0
  44. data/lib/source_monitor/fetching/feed_fetcher/source_updater.rb +21 -0
  45. data/lib/source_monitor/fetching/feed_fetcher.rb +1 -0
  46. data/lib/source_monitor/http.rb +5 -3
  47. data/lib/source_monitor/version.rb +1 -1
  48. data/lib/source_monitor.rb +4 -0
  49. data/source_monitor.gemspec +1 -1
  50. metadata +6 -106
  51. data/.vbw-planning/PROJECT.md +0 -51
  52. data/.vbw-planning/ROADMAP.md +0 -53
  53. data/.vbw-planning/SHIPPED.md +0 -63
  54. data/.vbw-planning/STATE.md +0 -27
  55. data/.vbw-planning/codebase/ARCHITECTURE.md +0 -147
  56. data/.vbw-planning/codebase/CONCERNS.md +0 -99
  57. data/.vbw-planning/codebase/CONVENTIONS.md +0 -97
  58. data/.vbw-planning/codebase/DEPENDENCIES.md +0 -100
  59. data/.vbw-planning/codebase/INDEX.md +0 -86
  60. data/.vbw-planning/codebase/META.md +0 -42
  61. data/.vbw-planning/codebase/PATTERNS.md +0 -262
  62. data/.vbw-planning/codebase/STACK.md +0 -101
  63. data/.vbw-planning/codebase/STRUCTURE.md +0 -324
  64. data/.vbw-planning/codebase/TESTING.md +0 -154
  65. data/.vbw-planning/config.json +0 -53
  66. data/.vbw-planning/discovery.json +0 -26
  67. data/.vbw-planning/milestones/default/ROADMAP.md +0 -115
  68. data/.vbw-planning/milestones/default/STATE.md +0 -82
  69. data/.vbw-planning/milestones/default/phases/01-coverage-analysis-quick-wins/PLAN-01-SUMMARY.md +0 -56
  70. data/.vbw-planning/milestones/default/phases/01-coverage-analysis-quick-wins/PLAN-01.md +0 -187
  71. data/.vbw-planning/milestones/default/phases/01-coverage-analysis-quick-wins/PLAN-02-SUMMARY.md +0 -64
  72. data/.vbw-planning/milestones/default/phases/01-coverage-analysis-quick-wins/PLAN-02.md +0 -137
  73. data/.vbw-planning/milestones/default/phases/02-critical-path-test-coverage/PLAN-01-SUMMARY.md +0 -67
  74. data/.vbw-planning/milestones/default/phases/02-critical-path-test-coverage/PLAN-01.md +0 -142
  75. data/.vbw-planning/milestones/default/phases/02-critical-path-test-coverage/PLAN-02-SUMMARY.md +0 -64
  76. data/.vbw-planning/milestones/default/phases/02-critical-path-test-coverage/PLAN-02.md +0 -138
  77. data/.vbw-planning/milestones/default/phases/02-critical-path-test-coverage/PLAN-03-SUMMARY.md +0 -85
  78. data/.vbw-planning/milestones/default/phases/02-critical-path-test-coverage/PLAN-03.md +0 -147
  79. data/.vbw-planning/milestones/default/phases/02-critical-path-test-coverage/PLAN-04-SUMMARY.md +0 -63
  80. data/.vbw-planning/milestones/default/phases/02-critical-path-test-coverage/PLAN-04.md +0 -129
  81. data/.vbw-planning/milestones/default/phases/02-critical-path-test-coverage/PLAN-05-SUMMARY.md +0 -74
  82. data/.vbw-planning/milestones/default/phases/02-critical-path-test-coverage/PLAN-05.md +0 -154
  83. data/.vbw-planning/milestones/default/phases/03-large-file-refactoring/03-VERIFICATION-wave1.md +0 -303
  84. data/.vbw-planning/milestones/default/phases/03-large-file-refactoring/03-VERIFICATION.md +0 -510
  85. data/.vbw-planning/milestones/default/phases/03-large-file-refactoring/PLAN-01-SUMMARY.md +0 -61
  86. data/.vbw-planning/milestones/default/phases/03-large-file-refactoring/PLAN-01.md +0 -161
  87. data/.vbw-planning/milestones/default/phases/03-large-file-refactoring/PLAN-02-SUMMARY.md +0 -66
  88. data/.vbw-planning/milestones/default/phases/03-large-file-refactoring/PLAN-02.md +0 -132
  89. data/.vbw-planning/milestones/default/phases/03-large-file-refactoring/PLAN-03-SUMMARY.md +0 -59
  90. data/.vbw-planning/milestones/default/phases/03-large-file-refactoring/PLAN-03.md +0 -171
  91. data/.vbw-planning/milestones/default/phases/03-large-file-refactoring/PLAN-04-SUMMARY.md +0 -56
  92. data/.vbw-planning/milestones/default/phases/03-large-file-refactoring/PLAN-04.md +0 -152
  93. data/.vbw-planning/milestones/default/phases/04-code-quality-conventions-cleanup/04-CONTEXT.md +0 -33
  94. data/.vbw-planning/milestones/default/phases/04-code-quality-conventions-cleanup/PLAN-01-SUMMARY.md +0 -42
  95. data/.vbw-planning/milestones/default/phases/04-code-quality-conventions-cleanup/PLAN-01.md +0 -119
  96. data/.vbw-planning/milestones/default/phases/04-code-quality-conventions-cleanup/PLAN-02-SUMMARY.md +0 -52
  97. data/.vbw-planning/milestones/default/phases/04-code-quality-conventions-cleanup/PLAN-02.md +0 -195
  98. data/.vbw-planning/milestones/default/phases/04-code-quality-conventions-cleanup/PLAN-03-SUMMARY.md +0 -79
  99. data/.vbw-planning/milestones/default/phases/04-code-quality-conventions-cleanup/PLAN-03.md +0 -130
  100. data/.vbw-planning/milestones/generator-enhancements/REQUIREMENTS.md +0 -72
  101. data/.vbw-planning/milestones/generator-enhancements/ROADMAP.md +0 -125
  102. data/.vbw-planning/milestones/generator-enhancements/SHIPPED.md +0 -40
  103. data/.vbw-planning/milestones/generator-enhancements/STATE.md +0 -43
  104. data/.vbw-planning/milestones/generator-enhancements/phases/01-generator-steps/01-CONTEXT.md +0 -33
  105. data/.vbw-planning/milestones/generator-enhancements/phases/01-generator-steps/01-VERIFICATION.md +0 -86
  106. data/.vbw-planning/milestones/generator-enhancements/phases/01-generator-steps/PLAN-01-SUMMARY.md +0 -61
  107. data/.vbw-planning/milestones/generator-enhancements/phases/01-generator-steps/PLAN-01.md +0 -380
  108. data/.vbw-planning/milestones/generator-enhancements/phases/02-verification/02-VERIFICATION.md +0 -78
  109. data/.vbw-planning/milestones/generator-enhancements/phases/02-verification/PLAN-01-SUMMARY.md +0 -46
  110. data/.vbw-planning/milestones/generator-enhancements/phases/02-verification/PLAN-01.md +0 -500
  111. data/.vbw-planning/milestones/generator-enhancements/phases/03-docs-alignment/03-VERIFICATION.md +0 -89
  112. data/.vbw-planning/milestones/generator-enhancements/phases/03-docs-alignment/PLAN-01-SUMMARY.md +0 -48
  113. data/.vbw-planning/milestones/generator-enhancements/phases/03-docs-alignment/PLAN-01.md +0 -456
  114. data/.vbw-planning/milestones/generator-enhancements/phases/04-dashboard-ux/04-VERIFICATION.md +0 -129
  115. data/.vbw-planning/milestones/generator-enhancements/phases/04-dashboard-ux/PLAN-01-SUMMARY.md +0 -70
  116. data/.vbw-planning/milestones/generator-enhancements/phases/04-dashboard-ux/PLAN-01.md +0 -747
  117. data/.vbw-planning/milestones/generator-enhancements/phases/05-active-storage-images/05-VERIFICATION.md +0 -156
  118. data/.vbw-planning/milestones/generator-enhancements/phases/05-active-storage-images/PLAN-01-SUMMARY.md +0 -69
  119. data/.vbw-planning/milestones/generator-enhancements/phases/05-active-storage-images/PLAN-01.md +0 -455
  120. data/.vbw-planning/milestones/generator-enhancements/phases/05-active-storage-images/PLAN-02-SUMMARY.md +0 -39
  121. data/.vbw-planning/milestones/generator-enhancements/phases/05-active-storage-images/PLAN-02.md +0 -488
  122. data/.vbw-planning/milestones/generator-enhancements/phases/06-netflix-feed-fix/06-VERIFICATION.md +0 -100
  123. data/.vbw-planning/milestones/generator-enhancements/phases/06-netflix-feed-fix/PLAN-01-SUMMARY.md +0 -37
  124. data/.vbw-planning/milestones/generator-enhancements/phases/06-netflix-feed-fix/PLAN-01.md +0 -345
  125. data/.vbw-planning/milestones/upgrade-assurance/REQUIREMENTS.md +0 -80
  126. data/.vbw-planning/milestones/upgrade-assurance/ROADMAP.md +0 -75
  127. data/.vbw-planning/milestones/upgrade-assurance/STATE.md +0 -29
  128. data/.vbw-planning/milestones/upgrade-assurance/phases/01-upgrade-command/01-VERIFICATION.md +0 -144
  129. data/.vbw-planning/milestones/upgrade-assurance/phases/01-upgrade-command/PLAN-01-SUMMARY.md +0 -43
  130. data/.vbw-planning/milestones/upgrade-assurance/phases/01-upgrade-command/PLAN-01.md +0 -405
  131. data/.vbw-planning/milestones/upgrade-assurance/phases/02-config-deprecation/PLAN-01-SUMMARY.md +0 -27
  132. data/.vbw-planning/milestones/upgrade-assurance/phases/02-config-deprecation/PLAN-01.md +0 -303
  133. data/.vbw-planning/milestones/upgrade-assurance/phases/03-upgrade-skill-docs/03-VERIFICATION.md +0 -380
  134. data/.vbw-planning/milestones/upgrade-assurance/phases/03-upgrade-skill-docs/PLAN-01-SUMMARY.md +0 -36
  135. data/.vbw-planning/milestones/upgrade-assurance/phases/03-upgrade-skill-docs/PLAN-01.md +0 -652
  136. data/.vbw-planning/phases/01-aia-certificate-resolution/.context-dev.md +0 -17
  137. data/.vbw-planning/phases/01-aia-certificate-resolution/PLAN-01-SUMMARY.md +0 -26
  138. data/.vbw-planning/phases/01-aia-certificate-resolution/PLAN-01.md +0 -71
  139. data/.vbw-planning/phases/01-aia-certificate-resolution/PLAN-02-SUMMARY.md +0 -16
  140. data/.vbw-planning/phases/01-aia-certificate-resolution/PLAN-02.md +0 -56
  141. data/.vbw-planning/phases/01-aia-certificate-resolution/PLAN-03-SUMMARY.md +0 -17
  142. data/.vbw-planning/phases/01-aia-certificate-resolution/PLAN-03.md +0 -98
  143. data/.vbw-planning/phases/02-test-performance/.context-dev.md +0 -75
  144. data/.vbw-planning/phases/02-test-performance/.context-lead.md +0 -89
  145. data/.vbw-planning/phases/02-test-performance/.context-qa.md +0 -23
  146. data/.vbw-planning/phases/02-test-performance/02-RESEARCH.md +0 -56
  147. data/.vbw-planning/phases/02-test-performance/02-VERIFICATION.md +0 -51
  148. data/.vbw-planning/phases/02-test-performance/PLAN-01-SUMMARY.md +0 -37
  149. data/.vbw-planning/phases/02-test-performance/PLAN-01.md +0 -156
  150. data/.vbw-planning/phases/02-test-performance/PLAN-02-SUMMARY.md +0 -33
  151. data/.vbw-planning/phases/02-test-performance/PLAN-02.md +0 -120
  152. data/.vbw-planning/phases/02-test-performance/PLAN-03-SUMMARY.md +0 -30
  153. data/.vbw-planning/phases/02-test-performance/PLAN-03.md +0 -154
  154. data/.vbw-planning/phases/02-test-performance/PLAN-04-SUMMARY.md +0 -28
  155. data/.vbw-planning/phases/02-test-performance/PLAN-04.md +0 -133
@@ -1,324 +0,0 @@
1
- # Directory Structure
2
-
3
- ## Top-Level Layout
4
-
5
- ```
6
- source_monitor/
7
- app/ # Rails engine application code
8
- bin/ # Scripts (rubocop, test runners, CI checks)
9
- config/ # Engine configuration (routes, tailwind, feedjira initializer)
10
- db/migrate/ # Engine migrations (24 migration files)
11
- docs/ # Documentation
12
- examples/ # Example configurations and adapters
13
- lib/ # Engine library code and rake tasks
14
- test/ # Test suite
15
- tasks/ # Rake task definitions (aliases)
16
- coverage/ # SimpleCov output (gitignored content)
17
- node_modules/ # NPM packages
18
- pkg/ # Gem build output
19
- tmp/ # Temporary files
20
- ```
21
-
22
- ## App Directory (`app/`)
23
-
24
- ```
25
- app/
26
- assets/
27
- builds/source_monitor/ # Pre-built CSS and JS (committed)
28
- application.css # Built Tailwind CSS output
29
- application.js # Built esbuild JS output
30
- config/
31
- source_monitor_manifest.js
32
- images/source_monitor/ # SVGs and icons
33
- javascripts/source_monitor/
34
- application.js # Stimulus app entry point
35
- turbo_actions.js # Custom Turbo Stream actions
36
- controllers/
37
- async_submit_controller.js
38
- confirm_navigation_controller.js
39
- dropdown_controller.js
40
- modal_controller.js
41
- notification_controller.js
42
- select_all_controller.js
43
- stylesheets/source_monitor/
44
- application.tailwind.css # Tailwind input file
45
- svgs/source_monitor/ # SVG assets
46
- controllers/source_monitor/
47
- application_controller.rb
48
- dashboard_controller.rb
49
- fetch_logs_controller.rb
50
- health_controller.rb
51
- import_sessions_controller.rb
52
- items_controller.rb
53
- logs_controller.rb
54
- scrape_logs_controller.rb
55
- source_bulk_scrapes_controller.rb
56
- source_fetches_controller.rb
57
- source_health_checks_controller.rb
58
- source_health_resets_controller.rb
59
- source_retries_controller.rb
60
- source_turbo_responses.rb
61
- sources_controller.rb
62
- concerns/
63
- sanitizes_search_params.rb
64
- jobs/source_monitor/
65
- application_job.rb
66
- fetch_feed_job.rb
67
- import_opml_job.rb
68
- import_session_health_check_job.rb
69
- item_cleanup_job.rb
70
- log_cleanup_job.rb
71
- schedule_fetches_job.rb
72
- scrape_item_job.rb
73
- source_health_check_job.rb
74
- mailers/source_monitor/
75
- application_mailer.rb
76
- models/source_monitor/
77
- application_record.rb
78
- fetch_log.rb
79
- health_check_log.rb
80
- import_history.rb
81
- import_session.rb
82
- item.rb
83
- item_content.rb
84
- log_entry.rb
85
- scrape_log.rb
86
- source.rb
87
- concerns/
88
- loggable.rb
89
- views/source_monitor/
90
- dashboard/
91
- index.html.erb
92
- _fetch_schedule.html.erb
93
- _job_metrics.html.erb
94
- _recent_activity.html.erb
95
- _stat_card.html.erb
96
- _stats.html.erb
97
- fetch_logs/
98
- show.html.erb
99
- import_sessions/
100
- show.html.erb
101
- show.turbo_stream.erb
102
- _header.html.erb
103
- _sidebar.html.erb
104
- health_check/
105
- _progress.html.erb
106
- _row.html.erb
107
- steps/
108
- _configure.html.erb
109
- _confirm.html.erb
110
- _health_check.html.erb
111
- _navigation.html.erb
112
- _preview.html.erb
113
- _upload.html.erb
114
- items/
115
- index.html.erb
116
- show.html.erb
117
- _details.html.erb
118
- _details_wrapper.html.erb
119
- logs/
120
- index.html.erb
121
- scrape_logs/
122
- show.html.erb
123
- shared/
124
- _toast.html.erb
125
- sources/
126
- index.html.erb
127
- show.html.erb
128
- new.html.erb
129
- edit.html.erb
130
- _bulk_scrape_form.html.erb
131
- _bulk_scrape_modal.html.erb
132
- _details.html.erb
133
- _details_wrapper.html.erb
134
- _empty_state_row.html.erb
135
- _fetch_interval_heatmap.html.erb
136
- _form.html.erb
137
- _form_fields.html.erb
138
- _health_status_badge.html.erb
139
- _import_history_panel.html.erb
140
- _row.html.erb
141
- ```
142
-
143
- ## Lib Directory (`lib/source_monitor/`)
144
-
145
- ```
146
- lib/
147
- source_monitor.rb # Main entry point, requires, module definition
148
- source_monitor/
149
- version.rb # VERSION constant (0.2.1)
150
- engine.rb # Rails::Engine with initializers
151
- configuration.rb # Configuration DSL (655 lines)
152
- events.rb # Event system (dispatch, callbacks)
153
- instrumentation.rb # ActiveSupport::Notifications wrapper
154
- metrics.rb # In-memory counters/gauges
155
- http.rb # Faraday client builder
156
- model_extensions.rb # Dynamic model concern/validation injection
157
- scheduler.rb # Source fetch scheduling with SKIP LOCKED
158
- health.rb # Health module setup
159
- realtime.rb # Realtime broadcasting setup
160
- feedjira_extensions.rb # Feedjira customizations
161
- assets.rb # Asset management utilities
162
-
163
- analytics/ # Query objects for dashboard metrics
164
- source_activity_rates.rb
165
- source_fetch_interval_distribution.rb
166
- sources_index_metrics.rb
167
- assets/ # Asset bundling helpers
168
- dashboard/ # Dashboard presenters and queries
169
- queries.rb
170
- quick_action.rb
171
- quick_actions_presenter.rb
172
- recent_activity.rb
173
- recent_activity_presenter.rb
174
- turbo_broadcaster.rb
175
- upcoming_fetch_schedule.rb
176
- fetching/ # Feed fetching pipeline
177
- feed_fetcher.rb # Core fetcher (627 lines)
178
- fetch_error.rb
179
- fetch_runner.rb
180
- retry_policy.rb
181
- stalled_fetch_reconciler.rb
182
- health/ # Health monitoring
183
- import_source_health_check.rb
184
- source_health_check.rb
185
- source_health_monitor.rb
186
- source_health_reset.rb
187
- import_sessions/ # OPML import support
188
- entry_normalizer.rb
189
- items/ # Item management
190
- item_creator.rb
191
- retention_pruner.rb
192
- jobs/ # Job support modules
193
- cleanup_options.rb
194
- fetch_failure_subscriber.rb
195
- solid_queue_metrics.rb
196
- visibility.rb
197
- logs/ # Unified log system
198
- entry_sync.rb
199
- filter_set.rb
200
- query.rb
201
- table_presenter.rb
202
- models/ # Shared model concerns
203
- sanitizable.rb
204
- url_normalizable.rb
205
- pagination/ # Pagination support
206
- paginator.rb
207
- realtime/ # Realtime broadcasting
208
- adapter.rb
209
- broadcaster.rb
210
- release/ # Release management
211
- changelog.rb
212
- runner.rb
213
- scrapers/ # Scraper adapters
214
- base.rb
215
- readability.rb
216
- fetchers/
217
- http_fetcher.rb
218
- parsers/
219
- readability_parser.rb
220
- scraping/ # Scraping orchestration
221
- bulk_result_presenter.rb
222
- bulk_source_scraper.rb
223
- enqueuer.rb
224
- item_scraper.rb
225
- item_scraper/
226
- adapter_resolver.rb
227
- persistence.rb
228
- scheduler.rb
229
- state.rb
230
- security/ # Security modules
231
- authentication.rb
232
- parameter_sanitizer.rb
233
- setup/ # Installation workflow
234
- bundle_installer.rb
235
- cli.rb
236
- dependency_checker.rb
237
- detectors.rb
238
- gemfile_editor.rb
239
- initializer_patcher.rb
240
- install_generator.rb
241
- migration_installer.rb
242
- node_installer.rb
243
- prompter.rb
244
- requirements.rb
245
- shell_runner.rb
246
- workflow.rb
247
- verification/
248
- action_cable_verifier.rb
249
- printer.rb
250
- result.rb
251
- runner.rb
252
- solid_queue_verifier.rb
253
- telemetry_logger.rb
254
- sources/ # Source-specific support
255
- params.rb
256
- turbo_stream_presenter.rb
257
- turbo_streams/ # Turbo Stream helpers
258
- stream_responder.rb
259
- tasks/ # Rake tasks
260
- recover_stalled_fetches.rake
261
- source_monitor_assets.rake
262
- source_monitor_setup.rake
263
- source_monitor_tasks.rake
264
- test_smoke.rake
265
- ```
266
-
267
- ## Test Directory (`test/`)
268
-
269
- ```
270
- test/
271
- test_helper.rb # Test configuration and shared helpers
272
- test_prof.rb # test-prof integration
273
- source_monitor_test.rb # Module-level tests
274
- fixtures/ # Test fixtures
275
- vcr_cassettes/ # VCR recorded HTTP interactions
276
- dummy/ # Full Rails dummy app for testing
277
- app/
278
- bin/
279
- config/
280
- db/
281
- examples/ # Example integration tests
282
- advanced_template_test.rb
283
- basic_template_test.rb
284
- custom_adapter_example_test.rb
285
- docker_config_test.rb
286
- integration/ # Integration tests
287
- engine_mounting_test.rb
288
- host_install_flow_test.rb
289
- navigation_test.rb
290
- release_packaging_test.rb
291
- lib/source_monitor/ # Unit tests mirroring lib/ structure
292
- configuration_test.rb
293
- feedjira_configuration_test.rb
294
- instrumentation_test.rb
295
- health/
296
- pagination/
297
- release/
298
- scraping/
299
- security/ (implicitly tested)
300
- setup/
301
- turbo_streams/
302
- mailers/
303
- models/source_monitor/ # Model tests
304
- system/ # System/browser tests
305
- dashboard_test.rb
306
- dropdown_fallback_test.rb
307
- items_test.rb
308
- logs_test.rb
309
- mission_control_test.rb
310
- sources_test.rb
311
- tasks/ # Rake task tests
312
- ```
313
-
314
- ## Key File Counts
315
-
316
- | Category | Count |
317
- |----------|-------|
318
- | Ruby files (.rb) | ~324 |
319
- | ERB templates (.erb) | ~48 |
320
- | JavaScript files (.js) | ~14 |
321
- | YAML configs (.yml) | ~16 |
322
- | Test files (*_test.rb) | ~124 |
323
- | Migrations | 24 |
324
- | Stimulus controllers | 6 |
@@ -1,154 +0,0 @@
1
- # Testing
2
-
3
- ## Framework & Tools
4
-
5
- - **Test Framework**: Minitest (Rails default)
6
- - **System Tests**: Capybara + Selenium WebDriver (Chrome)
7
- - **HTTP Mocking**: WebMock (disables all external connections) + VCR (recorded cassettes)
8
- - **Coverage**: SimpleCov with branch coverage enabled
9
- - **Profiling**: test-prof (TagProf, EventProf) + StackProf
10
- - **Parallelization**: Built-in Rails parallel testing (configurable workers via `SOURCE_MONITOR_TEST_WORKERS`)
11
-
12
- ## Test Infrastructure
13
-
14
- ### Test Helper (`test/test_helper.rb`)
15
- - Loads SimpleCov in CI or when `COVERAGE` env is set
16
- - Configures Rails test environment pointing to dummy app
17
- - Sets migration paths to include both engine and dummy migrations
18
- - Uses `:test` ActiveJob queue adapter by default
19
- - Fixtures loaded from `test/fixtures/`
20
- - VCR cassettes stored in `test/vcr_cassettes/`
21
- - WebMock allows localhost only
22
- - Random test ordering enabled
23
- - Configuration reset in every test via `SourceMonitor.reset_configuration!`
24
-
25
- ### test-prof Integration (`test/test_prof.rb`)
26
- - `TestProf::BeforeAll::Minitest` for `before_all` blocks (shared expensive setup)
27
- - `SourceMonitor::TestProfSupport::SetupOnce` -- `setup_once` alias for `before_all`
28
- - `SourceMonitor::TestProfSupport::InlineJobs` -- `with_inline_jobs` helper
29
- - `TestProf::MinitestSample` -- SAMPLE/SAMPLE_GROUPS env var support for focused runs
30
-
31
- ### Shared Test Helpers
32
- - `create_source!(attributes = {})` -- factory method for creating test sources
33
- - `with_queue_adapter(adapter)` -- temporarily switch ActiveJob adapter
34
-
35
- ## Test Categories
36
-
37
- | Category | File Count | Path | Purpose |
38
- |----------|-----------|------|---------|
39
- | Unit (lib) | ~75 | `test/lib/source_monitor/` | Lib module tests |
40
- | Model | ~10 | `test/models/source_monitor/` | Model validation, scopes, behavior |
41
- | System | 6 | `test/system/` | Browser-driven end-to-end tests |
42
- | Integration | 4 | `test/integration/` | Engine mounting, navigation, packaging |
43
- | Example | 4 | `test/examples/` | Template and adapter examples |
44
- | Task | 2 | `test/tasks/` | Rake task tests |
45
- | Mailer | 1 | `test/mailers/` | Application mailer test |
46
- | Module | 1 | `test/source_monitor_test.rb` | Top-level module tests |
47
-
48
- **Total: ~124 test files**
49
-
50
- ## Test Structure
51
-
52
- Tests mirror the source directory structure:
53
-
54
- ```
55
- test/lib/source_monitor/
56
- configuration_test.rb
57
- feedjira_configuration_test.rb
58
- instrumentation_test.rb
59
- health/
60
- health_module_test.rb
61
- source_health_check_test.rb
62
- source_health_monitor_test.rb
63
- source_health_reset_test.rb
64
- pagination/
65
- paginator_test.rb
66
- scraping/
67
- bulk_result_presenter_test.rb
68
- bulk_source_scraper_test.rb
69
- enqueuer_test.rb
70
- item_scraper_test.rb
71
- item_scraper/
72
- adapter_resolver_test.rb
73
- persistence_test.rb
74
- scheduler_test.rb
75
- state_test.rb
76
- setup/
77
- bundle_installer_test.rb
78
- cli_test.rb
79
- dependency_checker_test.rb
80
- detectors_test.rb
81
- gemfile_editor_test.rb
82
- initializer_patcher_test.rb
83
- install_generator_test.rb
84
- migration_installer_test.rb
85
- node_installer_test.rb
86
- prompter_test.rb
87
- requirements_test.rb
88
- workflow_test.rb
89
- verification/
90
- action_cable_verifier_test.rb
91
- printer_test.rb
92
- runner_test.rb
93
- solid_queue_verifier_test.rb
94
- telemetry_logger_test.rb
95
- turbo_streams/
96
- stream_responder_test.rb
97
- release/
98
- runner_test.rb
99
- ```
100
-
101
- ## Dummy Application (`test/dummy/`)
102
-
103
- Full Rails application used as the host app for testing:
104
- - PostgreSQL database (`config/database.yml`)
105
- - Solid Queue configuration (`config/solid_queue.yml`, `config/queue.yml`)
106
- - Solid Cable configuration (`config/cable.yml`)
107
- - Mission Control integration
108
- - Custom STI model: `SourceMonitor::SponsoredSource` (tests model extensions)
109
- - Extension concern: `DummySourceMonitor::SourceExtensions`
110
- - `User` model for testing authentication
111
- - Source Monitor initializer exercising the full configuration API
112
-
113
- ## CI Pipeline
114
-
115
- ### Test Job
116
- 1. Sets up PostgreSQL 15 service container
117
- 2. Installs Ruby 3.4.4, Node 20
118
- 3. Builds frontend assets (`npm run build`)
119
- 4. Creates and migrates test database
120
- 5. Runs full test suite with coverage (`bin/test-coverage`)
121
- 6. Enforces diff coverage (`bin/check-diff-coverage`)
122
- 7. Uploads coverage artifact
123
- 8. Captures system test screenshots on failure
124
-
125
- ### Release Verification Job
126
- - Depends on lint, security, test jobs
127
- - Runs `test/integration/release_packaging_test.rb` specifically
128
- - Enforces diff coverage again
129
-
130
- ### Profiling Job (Nightly)
131
- - Runs on schedule (`cron: "30 6 * * *"`)
132
- - TagProf by type
133
- - EventProf on `sql.active_record`
134
- - StackProf on integration tests
135
- - Enforces profiling guardrails (`bin/check-test-prof-metrics`)
136
- - Uploads profiling artifacts
137
-
138
- ## Coverage
139
-
140
- - Branch coverage enabled
141
- - `refuse_coverage_drop :line` prevents regressions
142
- - Coverage baseline tracked in `config/coverage_baseline.json` (lists uncovered lines per file)
143
- - Diff coverage enforcement ensures new code is tested
144
- - `SOURCE_MONITOR_SKIP_COVERAGE` env var to disable coverage collection
145
- - `# :nocov:` annotations used for defensive/fallback code paths
146
-
147
- ## Notable Testing Patterns
148
-
149
- - **Configuration Reset**: Every test resets `SourceMonitor.reset_configuration!` in `setup`
150
- - **WebMock**: All external HTTP disabled; tests use stubs or VCR cassettes
151
- - **Job Testing**: Tests use `:test` adapter; `with_inline_jobs` for synchronous execution
152
- - **Parallel Safety**: Tests designed for parallel execution; use `SecureRandom.hex` for unique fixtures
153
- - **Factory Method**: `create_source!` with `save!(validate: false)` for flexible test data
154
- - **Setup Verification Tests**: `bin/check-setup-tests` ensures all setup files have corresponding tests
@@ -1,53 +0,0 @@
1
- {
2
- "effort": "thorough",
3
- "autonomy": "standard",
4
- "auto_commit": true,
5
- "planning_tracking": "manual",
6
- "auto_push": "never",
7
- "verification_tier": "standard",
8
- "skill_suggestions": true,
9
- "auto_install_skills": false,
10
- "discovery_questions": true,
11
- "context_compiler": true,
12
- "visual_format": "unicode",
13
- "max_tasks_per_plan": 5,
14
- "prefer_teams": "always",
15
- "branch_per_milestone": false,
16
- "plain_summary": true,
17
- "active_profile": "default",
18
- "custom_profiles": {},
19
- "model_profile": "quality",
20
- "model_overrides": {},
21
- "agent_max_turns": {
22
- "scout": 15,
23
- "qa": 25,
24
- "architect": 30,
25
- "debugger": 80,
26
- "lead": 50,
27
- "dev": 75
28
- },
29
- "qa_skip_agents": [
30
- "docs"
31
- ],
32
- "v3_delta_context": false,
33
- "v3_context_cache": false,
34
- "v3_plan_research_persist": false,
35
- "v3_metrics": false,
36
- "v3_contract_lite": false,
37
- "v3_lock_lite": false,
38
- "v3_validation_gates": false,
39
- "v3_smart_routing": false,
40
- "v3_event_log": false,
41
- "v3_schema_validation": false,
42
- "v3_snapshot_resume": false,
43
- "v3_lease_locks": false,
44
- "v3_event_recovery": false,
45
- "v3_monorepo_routing": false,
46
- "v2_hard_contracts": false,
47
- "v2_hard_gates": false,
48
- "v2_typed_protocol": false,
49
- "v2_role_isolation": false,
50
- "v2_two_phase_completion": false,
51
- "v2_token_budgets": false,
52
- "compaction_trigger": 130000
53
- }
@@ -1,26 +0,0 @@
1
- {
2
- "answered": [
3
- {
4
- "question": "What matters most in the conventions cleanup?",
5
- "answer": "All of the above: Model conventions, Controller patterns, Dead code removal",
6
- "category": "scope",
7
- "phase": "4",
8
- "date": "2026-02-10"
9
- },
10
- {
11
- "question": "How should we handle convention violations that would change public API behavior?",
12
- "answer": "Fix everything -- rename/restructure even if it changes method signatures or route patterns",
13
- "category": "api-policy",
14
- "phase": "4",
15
- "date": "2026-02-10"
16
- }
17
- ],
18
- "inferred": [
19
- "User wants comprehensive cleanup, not surface-level",
20
- "Public API changes are acceptable for convention alignment",
21
- "Tests should be updated to match any changes, not removed",
22
- "All layers: models, controllers, services, dead code",
23
- "Generator should be maximally helpful -- create files rather than just warn",
24
- "Target Rails 8 defaults (queue.yml) rather than supporting legacy naming"
25
- ]
26
- }
@@ -1,115 +0,0 @@
1
- <!-- VBW ROADMAP TEMPLATE (ARTF-07) -- Phase-based project roadmap -->
2
- <!-- Created by Architect agent during /vbw scope -->
3
-
4
- # SourceMonitor Roadmap
5
-
6
- ## Overview
7
-
8
- This roadmap focuses on stabilizing and improving the existing SourceMonitor codebase through test coverage improvements and refactoring for maintainability. 4 phases progressing from analysis to coverage to refactoring to cleanup.
9
-
10
- ## Phases
11
-
12
- - [x] Phase 1: Coverage Analysis & Quick Wins
13
- - [x] Phase 2: Critical Path Test Coverage
14
- - [x] Phase 3: Large File Refactoring
15
- - [x] Phase 4: Code Quality & Conventions Cleanup
16
-
17
- ## Phase Details
18
-
19
- ### Phase 1: Coverage Analysis & Quick Wins
20
-
21
- **Goal:** Analyze the coverage baseline, identify the highest-impact gaps, and close easy coverage wins (frozen_string_literal, small utility classes).
22
- **Depends on:** None
23
-
24
- **Requirements:**
25
- - REQ-13: Frozen string literal consistency
26
- - REQ-14: RuboCop audit
27
-
28
- **Success Criteria:**
29
- 1. All Ruby files have frozen_string_literal: true
30
- 2. Zero RuboCop violations against omakase ruleset
31
- 3. Coverage baseline shrinks by at least 10%
32
-
33
- **Plans:**
34
- - [x] Plan 01: frozen-string-literal-audit (5f02db8)
35
- - [x] Plan 02: rubocop-audit-and-fix (no changes needed)
36
-
37
- ### Phase 2: Critical Path Test Coverage
38
-
39
- **Goal:** Close the major test coverage gaps in the most critical business logic -- feed fetching, item creation, configuration, dashboard queries, and broadcasting.
40
- **Depends on:** Phase 1
41
-
42
- **Requirements:**
43
- - REQ-01: FeedFetcher coverage
44
- - REQ-02: ItemCreator coverage
45
- - REQ-03: Configuration coverage
46
- - REQ-04: Dashboard::Queries coverage
47
- - REQ-05: Broadcaster coverage
48
- - REQ-06: BulkSourceScraper coverage
49
- - REQ-07: SourcesIndexMetrics coverage
50
-
51
- **Success Criteria:**
52
- 1. Coverage baseline shrinks by at least 50% from original
53
- 2. All critical path files have branch coverage above 80%
54
- 3. CI pipeline passes with no regressions
55
-
56
- **Plans:**
57
- - [x] Plan 01: feed-fetcher-tests (8d4e8d3)
58
- - [x] Plan 02: item-creator-tests (ce8ede4)
59
- - [x] Plan 03: configuration-tests (66b8df2)
60
- - [x] Plan 04: dashboard-and-analytics-tests (a8f2611, 2e50580)
61
- - [x] Plan 05: scraping-and-broadcasting-tests (e497891, 66b8df2)
62
-
63
- ### Phase 3: Large File Refactoring
64
-
65
- **Goal:** Break down the three largest files (FeedFetcher, Configuration, ImportSessionsController) into focused, single-responsibility modules while maintaining all existing tests.
66
- **Depends on:** Phase 2
67
-
68
- **Requirements:**
69
- - REQ-08: Extract FeedFetcher
70
- - REQ-09: Extract Configuration
71
- - REQ-10: Extract ImportSessionsController
72
- - REQ-11: Fix LogEntry table name
73
- - REQ-12: Replace eager requires with autoloading
74
-
75
- **Success Criteria:**
76
- 1. No single file exceeds 300 lines
77
- 2. All existing tests pass without modification (or with minimal adapter changes)
78
- 3. Public API remains unchanged
79
-
80
- **Plans:**
81
- - [x] Plan 01: extract-feed-fetcher (2f00274)
82
- - [x] Plan 02: extract-configuration-settings (ab823a3)
83
- - [x] Plan 03: extract-import-sessions-controller (9dce996)
84
- - [x] Plan 04: fix-log-entry-and-autoloading (fb99d3d)
85
-
86
- ### Phase 4: Code Quality & Conventions Cleanup
87
-
88
- **Goal:** Final pass to ensure all code follows Rails best practices and conventions, clean up any remaining debt.
89
- **Depends on:** Phase 3
90
-
91
- **Requirements:**
92
- - REQ-15: Rails conventions audit
93
-
94
- **Success Criteria:**
95
- 1. All models, controllers, and service objects follow established conventions
96
- 2. No RuboCop violations
97
- 3. Coverage baseline is at least 60% smaller than original
98
- 4. CI pipeline fully green
99
-
100
- **Plans:**
101
- - [x] Plan 01: conventions-audit (44fe6b6, c30a503, f070ea6, 78600b5, ec67c65)
102
- - [x] Plan 02: item-creator-extraction (3d33a71)
103
- - [x] Plan 03: final-verification (cc2e538)
104
-
105
- ## Progress
106
-
107
- | Phase | Plans Complete | Status | Completed |
108
- |-------|---------------|--------|-----------|
109
- | 1 - Coverage Analysis & Quick Wins | 2/2 | complete | 2026-02-09 |
110
- | 2 - Critical Path Test Coverage | 5/5 | complete | 2026-02-09 |
111
- | 3 - Large File Refactoring | 4/4 | complete | 2026-02-10 |
112
- | 4 - Code Quality & Conventions Cleanup | 3/3 | complete | 2026-02-10 |
113
-
114
- ---
115
- *Last updated: 2026-02-10 after Phase 4 completion*