source_monitor 0.4.0 → 0.5.0

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 (58) hide show
  1. checksums.yaml +4 -4
  2. data/.claude/skills/sm-host-setup/SKILL.md +3 -1
  3. data/.claude/skills/sm-upgrade/SKILL.md +102 -0
  4. data/.claude/skills/sm-upgrade/reference/upgrade-workflow.md +92 -0
  5. data/.claude/skills/sm-upgrade/reference/version-history.md +68 -0
  6. data/.vbw-planning/SHIPPED.md +35 -0
  7. data/.vbw-planning/config.json +22 -1
  8. data/.vbw-planning/milestones/generator-enhancements/SHIPPED.md +40 -0
  9. data/.vbw-planning/milestones/upgrade-assurance/REQUIREMENTS.md +80 -0
  10. data/.vbw-planning/milestones/upgrade-assurance/ROADMAP.md +75 -0
  11. data/.vbw-planning/milestones/upgrade-assurance/STATE.md +29 -0
  12. data/.vbw-planning/milestones/upgrade-assurance/phases/01-upgrade-command/01-VERIFICATION.md +144 -0
  13. data/.vbw-planning/milestones/upgrade-assurance/phases/01-upgrade-command/PLAN-01-SUMMARY.md +43 -0
  14. data/.vbw-planning/milestones/upgrade-assurance/phases/01-upgrade-command/PLAN-01.md +405 -0
  15. data/.vbw-planning/milestones/upgrade-assurance/phases/02-config-deprecation/PLAN-01-SUMMARY.md +27 -0
  16. data/.vbw-planning/milestones/upgrade-assurance/phases/02-config-deprecation/PLAN-01.md +303 -0
  17. data/.vbw-planning/milestones/upgrade-assurance/phases/03-upgrade-skill-docs/03-VERIFICATION.md +380 -0
  18. data/.vbw-planning/milestones/upgrade-assurance/phases/03-upgrade-skill-docs/PLAN-01-SUMMARY.md +36 -0
  19. data/.vbw-planning/milestones/upgrade-assurance/phases/03-upgrade-skill-docs/PLAN-01.md +652 -0
  20. data/CHANGELOG.md +17 -0
  21. data/CLAUDE.md +5 -3
  22. data/Gemfile.lock +1 -1
  23. data/VERSION +1 -1
  24. data/docs/upgrade.md +140 -0
  25. data/lib/source_monitor/configuration/deprecation_registry.rb +237 -0
  26. data/lib/source_monitor/configuration.rb +8 -0
  27. data/lib/source_monitor/setup/cli.rb +7 -0
  28. data/lib/source_monitor/setup/skills_installer.rb +1 -0
  29. data/lib/source_monitor/setup/upgrade_command.rb +59 -0
  30. data/lib/source_monitor/setup/verification/pending_migrations_verifier.rb +92 -0
  31. data/lib/source_monitor/setup/verification/runner.rb +1 -1
  32. data/lib/source_monitor/version.rb +1 -1
  33. data/lib/source_monitor.rb +3 -0
  34. metadata +44 -25
  35. /data/.vbw-planning/{REQUIREMENTS.md → milestones/generator-enhancements/REQUIREMENTS.md} +0 -0
  36. /data/.vbw-planning/{ROADMAP.md → milestones/generator-enhancements/ROADMAP.md} +0 -0
  37. /data/.vbw-planning/{STATE.md → milestones/generator-enhancements/STATE.md} +0 -0
  38. /data/.vbw-planning/{phases → milestones/generator-enhancements/phases}/01-generator-steps/01-CONTEXT.md +0 -0
  39. /data/.vbw-planning/{phases → milestones/generator-enhancements/phases}/01-generator-steps/01-VERIFICATION.md +0 -0
  40. /data/.vbw-planning/{phases → milestones/generator-enhancements/phases}/01-generator-steps/PLAN-01-SUMMARY.md +0 -0
  41. /data/.vbw-planning/{phases → milestones/generator-enhancements/phases}/01-generator-steps/PLAN-01.md +0 -0
  42. /data/.vbw-planning/{phases → milestones/generator-enhancements/phases}/02-verification/02-VERIFICATION.md +0 -0
  43. /data/.vbw-planning/{phases → milestones/generator-enhancements/phases}/02-verification/PLAN-01-SUMMARY.md +0 -0
  44. /data/.vbw-planning/{phases → milestones/generator-enhancements/phases}/02-verification/PLAN-01.md +0 -0
  45. /data/.vbw-planning/{phases → milestones/generator-enhancements/phases}/03-docs-alignment/03-VERIFICATION.md +0 -0
  46. /data/.vbw-planning/{phases → milestones/generator-enhancements/phases}/03-docs-alignment/PLAN-01-SUMMARY.md +0 -0
  47. /data/.vbw-planning/{phases → milestones/generator-enhancements/phases}/03-docs-alignment/PLAN-01.md +0 -0
  48. /data/.vbw-planning/{phases → milestones/generator-enhancements/phases}/04-dashboard-ux/04-VERIFICATION.md +0 -0
  49. /data/.vbw-planning/{phases → milestones/generator-enhancements/phases}/04-dashboard-ux/PLAN-01-SUMMARY.md +0 -0
  50. /data/.vbw-planning/{phases → milestones/generator-enhancements/phases}/04-dashboard-ux/PLAN-01.md +0 -0
  51. /data/.vbw-planning/{phases → milestones/generator-enhancements/phases}/05-active-storage-images/05-VERIFICATION.md +0 -0
  52. /data/.vbw-planning/{phases → milestones/generator-enhancements/phases}/05-active-storage-images/PLAN-01-SUMMARY.md +0 -0
  53. /data/.vbw-planning/{phases → milestones/generator-enhancements/phases}/05-active-storage-images/PLAN-01.md +0 -0
  54. /data/.vbw-planning/{phases → milestones/generator-enhancements/phases}/05-active-storage-images/PLAN-02-SUMMARY.md +0 -0
  55. /data/.vbw-planning/{phases → milestones/generator-enhancements/phases}/05-active-storage-images/PLAN-02.md +0 -0
  56. /data/.vbw-planning/{phases → milestones/generator-enhancements/phases}/06-netflix-feed-fix/06-VERIFICATION.md +0 -0
  57. /data/.vbw-planning/{phases → milestones/generator-enhancements/phases}/06-netflix-feed-fix/PLAN-01-SUMMARY.md +0 -0
  58. /data/.vbw-planning/{phases → milestones/generator-enhancements/phases}/06-netflix-feed-fix/PLAN-01.md +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 69576ecf67e1a978b29bbc96f594a01cd33c7e5510600f696bb5aca1cf5c0740
4
- data.tar.gz: a1d42ffe1fc8339e0657c915cdaf1765fe9518659978a20ad8a18a9861823145
3
+ metadata.gz: e63143dd784f79d378752978f534b36c122eec15264e8adf13cfcb994ca222cf
4
+ data.tar.gz: 04caa4a25e233c9520950697729efdad586770d6fba3fa00ba7369cbca9763ec
5
5
  SHA512:
6
- metadata.gz: 2a3a5c00b0803cf7bef974d5b9507519221a00794a6f17398674e089221d1102fe4fef1b2e2d7cdecd30d3b9e9b0f44f50f62b04ebb46c96df7a9f3a52710fac
7
- data.tar.gz: 1ec0ec3676faa8055c984be855b0e89096c47a9b59eabc5aeba5d806e00f70a8e098ad61c4daa707114e0570bd2c655cd853896524f3855e01bedd29491eaade
6
+ metadata.gz: 27bddd52129b5341906ebc67a7b86e259df8d0da671622b9271d1eab83cf214c1478e8674953d0eb20c8bd4bcb9b9257fc03261e4b061bd6f6d8c59d5a591ddb
7
+ data.tar.gz: b74f078deff1add84247e4fd0377d76ef026b1a2cee7b9808a252a2140507057d62a0be5c786c10f8e2e90e327a88717af211502850de797ece0ace895a822f7
@@ -12,7 +12,7 @@ Guides integration of the SourceMonitor engine into a host Rails application.
12
12
 
13
13
  - Adding SourceMonitor to a new or existing Rails 8 host app
14
14
  - Troubleshooting a broken installation
15
- - Re-running setup after upgrading the gem
15
+ - Re-running setup after upgrading the gem (see also: `sm-upgrade` skill for full upgrade workflow)
16
16
  - Rolling back the engine from a host app
17
17
 
18
18
  ## Prerequisites
@@ -202,6 +202,7 @@ config.authentication.user_signed_in_method = :user_signed_in?
202
202
  - `docs/setup.md` -- Complete setup workflow documentation
203
203
  - `docs/configuration.md` -- Configuration reference
204
204
  - `docs/troubleshooting.md` -- Common issues and fixes
205
+ - `sm-upgrade` skill -- Upgrade workflow for gem version updates
205
206
 
206
207
  ## Testing
207
208
 
@@ -209,6 +210,7 @@ After setup, verify with:
209
210
  1. `bin/source_monitor verify` -- Checks Solid Queue and Action Cable
210
211
  2. Visit the mount path in browser -- Dashboard should load
211
212
  3. Create a source and trigger "Fetch Now" -- Validates end-to-end
213
+ 4. For subsequent gem updates, use `bin/source_monitor upgrade` -- see the `sm-upgrade` skill
212
214
 
213
215
  Optional system test for host apps using Devise:
214
216
  ```ruby
@@ -0,0 +1,102 @@
1
+ ---
2
+ name: sm-upgrade
3
+ description: Use when upgrading SourceMonitor to a new gem version, including CHANGELOG review, running the upgrade command, interpreting verification results, and handling configuration deprecations.
4
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
5
+ ---
6
+
7
+ # sm-upgrade: Gem Upgrade Workflow
8
+
9
+ Guides AI agents through upgrading SourceMonitor in a host Rails application after a new gem version is released. Covers CHANGELOG review, running the upgrade command, interpreting verification results, handling deprecation warnings, and resolving common edge cases.
10
+
11
+ ## When to Use
12
+
13
+ - Host app is updating the source_monitor gem version in Gemfile
14
+ - User reports deprecation warnings after a gem update
15
+ - User wants to know what changed between versions
16
+ - Troubleshooting a broken upgrade
17
+ - Migrating configuration after breaking changes
18
+
19
+ ## Prerequisites
20
+
21
+ | Requirement | How to Check |
22
+ |---|---|
23
+ | Existing SourceMonitor installation | `cat .source_monitor_version` or check `config/initializers/source_monitor.rb` |
24
+ | Access to CHANGELOG.md | Bundled with gem: `bundle show source_monitor` then read CHANGELOG.md |
25
+ | Current gem version known | `grep source_monitor Gemfile.lock` |
26
+
27
+ ## Upgrade Workflow
28
+
29
+ 1. **Review CHANGELOG** -- Read `CHANGELOG.md` in the gem source. Identify changes between the current installed version (from `.source_monitor_version` or `Gemfile.lock`) and the target version. Focus on Added, Changed, Fixed, Removed sections. Flag any breaking changes or deprecation notices.
30
+ 2. **Update Gemfile** -- Bump the version constraint in the host app's Gemfile: `gem "source_monitor", "~> X.Y"`. Run `bundle update source_monitor`.
31
+ 3. **Run the upgrade command** -- `bin/source_monitor upgrade`. This automatically: detects the version change via `.source_monitor_version` marker, copies new migrations, re-runs the install generator (idempotent), runs the full verification suite.
32
+ 4. **Run database migrations** -- `bin/rails db:migrate` if the upgrade command copied new migrations.
33
+ 5. **Handle deprecation warnings** -- If the configure block in the initializer uses deprecated options, Rails logger will show warnings at boot. Read each warning, identify the replacement, update the initializer. See `sm-configure` skill for configuration reference.
34
+ 6. **Run verification** -- `bin/source_monitor verify` to confirm all checks pass.
35
+ 7. **Restart processes** -- Restart web server and Solid Queue workers to pick up the new version.
36
+
37
+ ## Interpreting Upgrade Results
38
+
39
+ The upgrade command runs 4 verification checks automatically:
40
+
41
+ | Check | OK | Failure | Fix |
42
+ |---|---|---|---|
43
+ | PendingMigrations | All engine migrations present | Missing migrations need copying | `bin/rails db:migrate` |
44
+ | SolidQueue | Workers running | Workers not detected | Start Solid Queue workers via `Procfile.dev` or `bin/rails solid_queue:start` |
45
+ | RecurringSchedule | Tasks registered | Tasks missing from dispatcher | Re-run generator or check `config/queue.yml` |
46
+ | ActionCable | Adapter configured | No production adapter | Configure Solid Cable or Redis adapter |
47
+
48
+ ## Handling Deprecation Warnings
49
+
50
+ The deprecation framework uses two severity levels:
51
+
52
+ - **`:warning`** -- Option renamed. The old name still works but logs a deprecation message. Update the initializer to use the new option name. The message includes the replacement path.
53
+ - **`:error`** -- Option removed. Using the old name raises `SourceMonitor::DeprecatedOptionError`. You must remove or replace the option before the app can boot.
54
+
55
+ Pattern for fixing deprecations:
56
+
57
+ 1. Read the deprecation message (logged to `Rails.logger` or raised as an error)
58
+ 2. Find the replacement option path in the message
59
+ 3. Update `config/initializers/source_monitor.rb`
60
+ 4. Restart and verify the warning is gone
61
+
62
+ Example deprecation message:
63
+ ```
64
+ [SourceMonitor] DEPRECATION: 'http.old_option' was deprecated in v0.5.0 and replaced by 'http.new_option'.
65
+ ```
66
+
67
+ ## Edge Cases
68
+
69
+ - **First install (no `.source_monitor_version` file):** Upgrade command treats this as a version change and runs the full workflow. Safe to run on first install.
70
+ - **Same version (no change):** Command reports "Already up to date (vX.Y.Z)" and exits cleanly.
71
+ - **Skipped versions (e.g., 0.2.0 to 0.4.0):** Read all CHANGELOG sections between the two versions. Multiple migrations may need running.
72
+ - **Failed verification after upgrade:** Read the verification output. Most common: pending migrations (run `db:migrate`), missing Solid Queue workers (start workers), stale recurring schedule (re-run generator).
73
+ - **Custom scrapers or event handlers:** Check CHANGELOG for API changes in `Scrapers::Base` or event callback signatures.
74
+
75
+ ## Key Source Files
76
+
77
+ | File | Purpose |
78
+ |---|---|
79
+ | `lib/source_monitor/setup/upgrade_command.rb` | Upgrade orchestrator |
80
+ | `lib/source_monitor/setup/cli.rb` | CLI entry point (`bin/source_monitor upgrade`) |
81
+ | `lib/source_monitor/setup/verification/runner.rb` | Verification runner (4 verifiers) |
82
+ | `lib/source_monitor/configuration/deprecation_registry.rb` | Deprecation framework |
83
+ | `CHANGELOG.md` | Version history (Keep a Changelog format) |
84
+ | `.source_monitor_version` | Version marker in host app root |
85
+
86
+ ## References
87
+
88
+ - `docs/upgrade.md` -- Human-readable upgrade guide
89
+ - `docs/setup.md` -- Initial setup documentation
90
+ - `docs/troubleshooting.md` -- Common issues and fixes
91
+ - `sm-host-setup` skill -- Initial installation workflow
92
+ - `sm-configure` skill -- Configuration reference for updating deprecated options
93
+
94
+ ## Checklist
95
+
96
+ - [ ] CHANGELOG reviewed for version range
97
+ - [ ] Gemfile updated and `bundle update source_monitor` run
98
+ - [ ] `bin/source_monitor upgrade` completed successfully
99
+ - [ ] Database migrations applied if needed
100
+ - [ ] Deprecation warnings addressed in initializer
101
+ - [ ] `bin/source_monitor verify` passes all checks
102
+ - [ ] Web server and workers restarted
@@ -0,0 +1,92 @@
1
+ # Upgrade Workflow Reference
2
+
3
+ Detailed step-by-step reference for AI agents guiding host app developers through SourceMonitor gem upgrades.
4
+
5
+ ## Pre-Upgrade Checklist
6
+
7
+ 1. Identify current version: `grep source_monitor Gemfile.lock` or `cat .source_monitor_version`
8
+ 2. Identify target version: check RubyGems or GitHub releases
9
+ 3. Read CHANGELOG.md between those versions (in gem source: `bundle show source_monitor` to find gem path, then read CHANGELOG.md)
10
+ 4. Note any breaking changes, removed options, or new required configuration
11
+
12
+ ## CHANGELOG Parsing Guide
13
+
14
+ - Format: [Keep a Changelog](https://keepachangelog.com)
15
+ - Each version has a `## [X.Y.Z] - YYYY-MM-DD` header
16
+ - Subsections: Added, Changed, Fixed, Removed, Deprecated, Security
17
+ - For multi-version jumps, read ALL sections between current and target
18
+ - Key things to flag:
19
+ - **Removed** entries -- breaking changes, must address before upgrading
20
+ - **Changed** entries -- behavioral changes, review for impact
21
+ - **Deprecated** entries -- action needed now or in a future version
22
+ - Example: To upgrade from 0.3.1 to 0.4.0, read sections [0.3.2], [0.3.3], and [0.4.0]
23
+
24
+ ## Upgrade Command Internals
25
+
26
+ How `bin/source_monitor upgrade` works internally:
27
+
28
+ 1. Reads `.source_monitor_version` from host app root (nil if first run)
29
+ 2. Compares stored version against `SourceMonitor::VERSION` (current gem version)
30
+ 3. If same: returns "Already up to date" with exit 0
31
+ 4. If different:
32
+ a. `MigrationInstaller.install` -- copies new engine migrations to `db/migrate/`
33
+ b. `InstallGenerator.run` -- re-runs the install generator (idempotent: skips existing routes, initializer, etc.)
34
+ c. `Verification::Runner.call` -- runs all 4 verifiers
35
+ d. Writes current version to `.source_monitor_version`
36
+ 5. Prints verification summary and exits (0 = all OK, 1 = any failure)
37
+
38
+ Source: `lib/source_monitor/setup/upgrade_command.rb`
39
+
40
+ ## Post-Upgrade Verification
41
+
42
+ The verification runner (`lib/source_monitor/setup/verification/runner.rb`) executes 4 verifiers in sequence:
43
+
44
+ ### PendingMigrationsVerifier
45
+
46
+ Checks that all SourceMonitor migrations in the gem have corresponding files in host `db/migrate/`. Warns if any are missing or not yet run.
47
+
48
+ **Fix:** `bin/rails db:migrate`
49
+
50
+ ### SolidQueueVerifier
51
+
52
+ Checks that Solid Queue workers are running. Provides remediation guidance mentioning `Procfile.dev` for `bin/dev` users.
53
+
54
+ **Fix:** Start workers via `bin/rails solid_queue:start` or ensure `Procfile.dev` has a `jobs:` entry.
55
+
56
+ ### RecurringScheduleVerifier
57
+
58
+ Checks that SourceMonitor recurring tasks (ScheduleFetchesJob, scrape scheduling, cleanup jobs) are registered in Solid Queue. Verifies that `config/recurring.yml` exists and `config/queue.yml` dispatchers have `recurring_schedule: config/recurring.yml`.
59
+
60
+ **Fix:** Re-run `bin/rails generate source_monitor:install` to patch `config/queue.yml` and create `config/recurring.yml`.
61
+
62
+ ### ActionCableVerifier
63
+
64
+ Checks that Action Cable is configured with a production-ready adapter (Solid Cable or Redis). Development mode uses async adapter by default, which is not suitable for production.
65
+
66
+ **Fix:** Add `solid_cable` gem or configure Redis adapter in `config/cable.yml`.
67
+
68
+ ## Troubleshooting Common Upgrade Issues
69
+
70
+ ### "Already up to date" but expected changes
71
+
72
+ - Check that `bundle update source_monitor` actually pulled the new version
73
+ - Verify `Gemfile.lock` shows the expected version: `grep source_monitor Gemfile.lock`
74
+ - If the `.source_monitor_version` marker was manually edited, delete it and re-run `bin/source_monitor upgrade`
75
+
76
+ ### Migrations fail
77
+
78
+ - Check for conflicting migration timestamps
79
+ - Remove duplicate migration files from `db/migrate/` (keep the newer one)
80
+ - Re-run `bin/rails db:migrate`
81
+
82
+ ### Deprecation errors at boot
83
+
84
+ - Option was removed (`:error` severity)
85
+ - Read the error message for the replacement option path
86
+ - Update `config/initializers/source_monitor.rb` before restarting
87
+ - Consult `docs/configuration.md` if unsure which option to use
88
+
89
+ ### Generator fails
90
+
91
+ - Usually safe to re-run manually: `bin/rails generate source_monitor:install`
92
+ - The generator is idempotent -- it skips existing routes, initializer, and config entries
@@ -0,0 +1,68 @@
1
+ # Version-Specific Upgrade Notes
2
+
3
+ Version-specific migration notes for each major/minor version transition. Agents should reference this file when guiding users through multi-version upgrades.
4
+
5
+ ## 0.3.x to 0.4.0
6
+
7
+ **Released:** 2026-02-12
8
+
9
+ **Key changes:**
10
+ - Install generator now auto-patches `Procfile.dev` and `queue.yml` dispatcher config
11
+ - New Active Storage image download feature (opt-in via `config.images.download_to_active_storage`)
12
+ - SSL certificate store configuration added to HTTPSettings
13
+ - RecurringScheduleVerifier and SolidQueueVerifier enhanced with better remediation messages
14
+ - Netflix Tech Blog VCR cassette regression test added
15
+
16
+ **Action items:**
17
+ 1. Re-run `bin/source_monitor upgrade` (or `bin/rails generate source_monitor:install`) to get Procfile.dev and queue.yml patches
18
+ 2. If using Active Storage image downloads, add `config.images.download_to_active_storage = true` to initializer
19
+ 3. If experiencing SSL certificate errors, new `config.http.ssl_ca_file`, `config.http.ssl_ca_path`, and `config.http.ssl_verify` settings are available
20
+ 4. No breaking changes -- all existing configuration remains valid
21
+
22
+ ## 0.2.x to 0.3.0
23
+
24
+ **Released:** 2026-02-10
25
+
26
+ **Key changes:**
27
+ - Major refactoring: FeedFetcher, Configuration, ImportSessionsController, ItemCreator all extracted into smaller modules
28
+ - Ruby autoload replaces eager requires in `lib/source_monitor.rb`
29
+ - LogEntry no longer uses hard-coded table name
30
+ - Skills system added (14 `sm-*` skills)
31
+ - Upgraded to Ruby 4.0.1 and Rails 8.1.2
32
+
33
+ **Action items:**
34
+ 1. If you monkey-patched or referenced internal classes (FeedFetcher internals, Configuration nested classes), check that your references still resolve
35
+ 2. Run `bin/source_monitor upgrade` to copy any new migrations
36
+ 3. Optionally install skills: `bin/rails source_monitor:skills:install`
37
+ 4. No configuration changes required -- public API unchanged
38
+
39
+ ## 0.1.x to 0.2.0
40
+
41
+ **Released:** 2025-11-25
42
+
43
+ **Key changes:**
44
+ - OPML import wizard added with multi-step flow
45
+ - ImportHistory model and migrations added
46
+ - Health check enqueuing and Turbo Stream updates during wizard
47
+
48
+ **Action items:**
49
+ 1. Copy and run new migrations: `bin/rails railties:install:migrations FROM=source_monitor && bin/rails db:migrate`
50
+ 2. No configuration changes required
51
+
52
+ ## Future Versions
53
+
54
+ Template for documenting future upgrades:
55
+
56
+ ```
57
+ ## X.Y.Z to A.B.C
58
+ Released: YYYY-MM-DD
59
+
60
+ Key changes:
61
+ - ...
62
+
63
+ Action items:
64
+ 1. ...
65
+
66
+ Deprecations:
67
+ - `old_option` replaced by `new_option` (warning in A.B.C, removal planned for D.E.F)
68
+ ```
@@ -26,3 +26,38 @@
26
26
 
27
27
  Location: `.vbw-planning/milestones/default/`
28
28
  Tag: `milestone/default`
29
+
30
+ ---
31
+
32
+ ## upgrade-assurance (2026-02-12 to 2026-02-13)
33
+
34
+ **Goal:** Give host app developers confidence that gem updates go smoothly -- automated migration detection, upgrade command, config validation, and AI-assisted upgrade guidance.
35
+
36
+ ### Metrics
37
+
38
+ | Metric | Value |
39
+ |--------|-------|
40
+ | Phases | 3 |
41
+ | Plans completed | 3 |
42
+ | Tasks completed | 14 |
43
+ | Commits | 12 |
44
+ | Requirements satisfied | 5/5 (REQ-26 through REQ-30) |
45
+ | Tests | 1003 (up from 973) |
46
+
47
+ ### Phases
48
+
49
+ 1. Upgrade Command & Migration Verifier (1 plan, 5 tasks)
50
+ 2. Configuration Deprecation Framework (1 plan, 4 tasks)
51
+ 3. Upgrade Skill & Documentation (1 plan, 5 tasks)
52
+
53
+ ### Key Decisions
54
+
55
+ - 3 phases: command, config, skill -- each independently valuable
56
+ - `.source_monitor_version` marker file for version tracking
57
+ - Deprecation registry with :warning and :error severities
58
+ - sm-upgrade as a consumer skill (installed by default)
59
+
60
+ ### Archive
61
+
62
+ Location: `.vbw-planning/milestones/upgrade-assurance/`
63
+ Tag: `milestone/upgrade-assurance`
@@ -10,5 +10,26 @@
10
10
  "max_tasks_per_plan": 5,
11
11
  "agent_teams": true,
12
12
  "model_profile": "quality",
13
- "model_overrides": {}
13
+ "model_overrides": {},
14
+ "context_compiler": true,
15
+ "v3_delta_context": false,
16
+ "v3_context_cache": false,
17
+ "v3_plan_research_persist": false,
18
+ "v3_metrics": false,
19
+ "v3_contract_lite": false,
20
+ "v3_lock_lite": false,
21
+ "v3_validation_gates": false,
22
+ "v3_smart_routing": false,
23
+ "v3_event_log": false,
24
+ "v3_schema_validation": false,
25
+ "v3_snapshot_resume": false,
26
+ "v3_lease_locks": false,
27
+ "v3_event_recovery": false,
28
+ "v3_monorepo_routing": false,
29
+ "v2_hard_contracts": false,
30
+ "v2_hard_gates": false,
31
+ "v2_typed_protocol": false,
32
+ "v2_role_isolation": false,
33
+ "v2_two_phase_completion": false,
34
+ "v2_token_budgets": false
14
35
  }
@@ -0,0 +1,40 @@
1
+ # Shipped: generator-enhancements
2
+
3
+ **Shipped:** 2026-02-12
4
+ **Tag:** milestone/generator-enhancements
5
+ **Release:** v0.4.0
6
+
7
+ ## Summary
8
+
9
+ Made the install generator and verification suite catch the two most common host-app setup failures: missing Procfile.dev jobs entry and missing recurring_schedule dispatcher wiring. Also added dashboard UX improvements, Active Storage image downloads, and SSL certificate store configuration.
10
+
11
+ ## Metrics
12
+
13
+ | Metric | Value |
14
+ |--------|-------|
15
+ | Phases | 7 (Phase 0-6) |
16
+ | Plans completed | 7 |
17
+ | Tasks completed | 34 |
18
+ | Commits | ~26 |
19
+ | Tests | 973 (up from 841) |
20
+ | New requirements satisfied | 10 (REQ-16 through REQ-25) |
21
+
22
+ ## Phases
23
+
24
+ 1. Phase 0: Documentation Gaps (quick fix)
25
+ 2. Phase 1: Install Generator Steps (Procfile.dev + Queue Config)
26
+ 3. Phase 2: Recurring Schedule Verifier
27
+ 4. Phase 3: Skills & Documentation Alignment
28
+ 5. Phase 4: Dashboard UX Improvements
29
+ 6. Phase 5: Active Storage Image Downloads
30
+ 7. Phase 6: Netflix Feed Investigation (SSL cert store fix)
31
+
32
+ ## Key Decisions
33
+
34
+ - Docs-first approach: shipped doc fixes before code changes
35
+ - Always create/patch Procfile.dev for maximum hand-holding
36
+ - Target queue.yml only (Rails 8 default)
37
+ - External links open new tab with visual indicator icon
38
+ - Fetch log URL display: domain for RSS, item URL for scrapes
39
+ - Image downloads via background job to ItemContent (opt-in)
40
+ - SSL fix: general cert store config, not Netflix-specific
@@ -0,0 +1,80 @@
1
+ <!-- VBW REQUIREMENTS TEMPLATE (ARTF-06) -- Structured requirements with traceability -->
2
+ <!-- Created by Architect agent during /vbw scope -->
3
+
4
+ # SourceMonitor Requirements
5
+
6
+ Defined: 2026-02-09
7
+ Core value: Drop-in Rails engine for feed monitoring, content scraping, and operational dashboards.
8
+
9
+ ## v1 Requirements
10
+
11
+ ### Test Coverage
12
+
13
+ - [ ] **REQ-01**: Close coverage gaps in `FeedFetcher` -- add tests for uncovered branches in the fetch pipeline
14
+ - [ ] **REQ-02**: Close coverage gaps in `ItemCreator` -- add tests for item creation edge cases
15
+ - [ ] **REQ-03**: Close coverage gaps in `Configuration` -- test nested settings classes and edge cases
16
+ - [ ] **REQ-04**: Close coverage gaps in `Dashboard::Queries` -- test dashboard query logic
17
+ - [ ] **REQ-05**: Close coverage gaps in `Broadcaster` -- test realtime broadcasting logic
18
+ - [ ] **REQ-06**: Close coverage gaps in `BulkSourceScraper` -- test bulk scraping workflows
19
+ - [ ] **REQ-07**: Close coverage gaps in `SourcesIndexMetrics` -- test analytics calculations
20
+
21
+ ### Refactoring
22
+
23
+ - [ ] **REQ-08**: Extract `FeedFetcher` (627 lines) into focused single-responsibility classes
24
+ - [ ] **REQ-09**: Extract `Configuration` (655 lines) nested settings classes into separate files
25
+ - [ ] **REQ-10**: Extract `ImportSessionsController` (792 lines) wizard steps into step-specific concerns or service objects
26
+ - [ ] **REQ-11**: Fix `LogEntry` hard-coded table name to use configurable prefix system
27
+ - [ ] **REQ-12**: Replace eager 102+ require statements in `lib/source_monitor.rb` with autoloading
28
+
29
+ ### Code Quality
30
+
31
+ - [ ] **REQ-13**: Ensure frozen_string_literal is consistent across all Ruby files
32
+ - [ ] **REQ-14**: Audit and fix any RuboCop violations against omakase ruleset
33
+ - [ ] **REQ-15**: Ensure all models, controllers, and service objects follow Rails conventions
34
+
35
+ ### Generator Enhancements
36
+
37
+ - [ ] **REQ-16**: Install generator patches `Procfile.dev` with a `jobs:` entry for Solid Queue
38
+ - [ ] **REQ-17**: Install generator patches queue config dispatcher with `recurring_schedule: config/recurring.yml`
39
+ - [ ] **REQ-18**: Guided workflow (`Setup::Workflow`) integrates both new generator steps
40
+ - [ ] **REQ-19**: `RecurringScheduleVerifier` checks that recurring tasks are registered with Solid Queue
41
+ - [ ] **REQ-20**: `SolidQueueVerifier` remediation suggests `Procfile.dev` when workers not detected
42
+ - [ ] **REQ-21**: Skills and documentation updated to reflect automated Procfile.dev and recurring_schedule setup
43
+
44
+ ### Dashboard UX
45
+
46
+ - [ ] **REQ-22**: Fetch logs show source URL for both success and failure entries on the dashboard
47
+ - [ ] **REQ-23**: Dashboard links to sources and items are clickable and open in a new tab
48
+
49
+ ### Active Storage Image Downloads
50
+
51
+ - [ ] **REQ-24**: Configurable option to download inline images from items to Active Storage instead of loading from source
52
+
53
+ ### Feed Compatibility
54
+
55
+ - [ ] **REQ-25**: Investigate and fix failing fetch for Netflix Tech Blog feed (https://netflixtechblog.com/feed)
56
+
57
+ ### Upgrade Assurance
58
+
59
+ - [ ] **REQ-26**: `bin/source_monitor upgrade` command detects version changes, copies new migrations, re-runs generator, and runs verification
60
+ - [ ] **REQ-27**: `PendingMigrationsVerifier` checks for unmigrated SourceMonitor tables in the verification suite
61
+ - [ ] **REQ-28**: Configuration deprecation framework warns on stale, renamed, or removed initializer options at boot time
62
+ - [ ] **REQ-29**: `sm-upgrade` AI skill teaches agents how to handle gem updates with CHANGELOG parsing and step-by-step guidance
63
+ - [ ] **REQ-30**: Upgrade guide documentation (`docs/upgrade.md`) with version-specific instructions
64
+
65
+ ## v2 Requirements
66
+
67
+ - [ ] **REQ-XX**: Improve optional dependency loading with clear error messages
68
+ - [ ] **REQ-XX**: Add database index verification tooling
69
+ - [ ] **REQ-XX**: Document health check endpoint response format
70
+
71
+ ## Out of Scope
72
+
73
+ | Item | Reason |
74
+ |------|--------|
75
+ | Multi-database support (MySQL/SQLite) | PostgreSQL-only simplifies development |
76
+ | Built-in authentication | Host app responsibility |
77
+
78
+ ## Traceability
79
+
80
+ Requirement-to-phase mapping is tracked in ROADMAP.md.
@@ -0,0 +1,75 @@
1
+ <!-- VBW ROADMAP -- Phase decomposition with requirement mapping -->
2
+ <!-- Created during /vbw scope -->
3
+
4
+ # SourceMonitor Upgrade Assurance Roadmap
5
+
6
+ **Milestone:** upgrade-assurance
7
+ **Goal:** Give host app developers confidence that gem updates go smoothly -- automated migration detection, upgrade command, config validation, and AI-assisted upgrade guidance.
8
+
9
+ ## Phases
10
+
11
+ 1. [x] Phase 1: Upgrade Command & Migration Verifier
12
+ 2. [x] Phase 2: Configuration Deprecation Framework
13
+ 3. [x] Phase 3: Upgrade Skill & Documentation
14
+
15
+ ## Phase Details
16
+
17
+ ### Phase 1: Upgrade Command & Migration Verifier
18
+
19
+ **Goal:** Add `bin/source_monitor upgrade` that detects version changes since last install, copies new migrations, re-runs the idempotent generator, runs verification, and reports what changed. Also add a `PendingMigrationsVerifier` to the existing verification suite.
20
+
21
+ **Requirements:** REQ-26, REQ-27
22
+
23
+ **Success Criteria:**
24
+ - `bin/source_monitor upgrade` compares stored version marker against `SourceMonitor::VERSION`
25
+ - If version changed: copies new migrations, re-runs generator, runs `bin/source_monitor verify`
26
+ - If no version change: reports "Already up to date" with current version
27
+ - `PendingMigrationsVerifier` checks `db:migrate:status` for unmigrated SourceMonitor migrations
28
+ - Verifier integrated into `bin/source_monitor verify` and the upgrade flow
29
+ - Version marker stored in host app (e.g., `.source_monitor_version` or DB-backed)
30
+ - `bin/rails test` passes, RuboCop clean
31
+
32
+ ### Phase 2: Configuration Deprecation Framework
33
+
34
+ **Goal:** Add a lightweight framework that warns host app developers when their initializer uses config options that have been renamed, removed, or have changed defaults. Warnings appear at boot time via Rails logger.
35
+
36
+ **Requirements:** REQ-28
37
+
38
+ **Success Criteria:**
39
+ - Engine maintains a deprecation registry (option name, version deprecated, replacement if any)
40
+ - At configuration load time, deprecated option usage triggers a Rails.logger.warn with actionable message
41
+ - Removed options that are still referenced raise a clear error with migration path
42
+ - Framework is opt-in for engine developers (simple DSL to register deprecations)
43
+ - Zero false positives on current valid configuration
44
+ - `bin/rails test` passes, RuboCop clean
45
+
46
+ ### Phase 3: Upgrade Skill & Documentation
47
+
48
+ **Goal:** Create an `sm-upgrade` AI skill that guides agents through post-update workflows, and write a versioned upgrade guide for human developers.
49
+
50
+ **Requirements:** REQ-29, REQ-30
51
+
52
+ **Success Criteria:**
53
+ - `sm-upgrade` skill covers: reading CHANGELOG between versions, running upgrade command, interpreting results, handling edge cases
54
+ - Skill references the upgrade command and verification suite
55
+ - `docs/upgrade.md` includes: general upgrade steps, version-specific notes (0.3.x → 0.4.x), troubleshooting
56
+ - Skills installer updated to include `sm-upgrade` in consumer set
57
+ - Existing `sm-host-setup` skill cross-references upgrade flow
58
+
59
+ ## Progress
60
+
61
+ | Phase | Status | Plans |
62
+ |-------|--------|-------|
63
+ | 1 | Complete | PLAN-01 (5 tasks, 5 commits) |
64
+ | 2 | Complete | PLAN-01 (4 tasks, 3 commits) |
65
+ | 3 | Complete | PLAN-01 (5 tasks, 4 commits) |
66
+
67
+ ## Requirement Mapping
68
+
69
+ | REQ | Phase | Description |
70
+ |-----|-------|-------------|
71
+ | REQ-26 | 1 | Upgrade command with version detection and auto-remediation |
72
+ | REQ-27 | 1 | PendingMigrationsVerifier in verification suite |
73
+ | REQ-28 | 2 | Config deprecation framework with boot-time warnings |
74
+ | REQ-29 | 3 | sm-upgrade AI skill for agent-guided updates |
75
+ | REQ-30 | 3 | Upgrade guide documentation |
@@ -0,0 +1,29 @@
1
+ <!-- VBW STATE -- Current milestone progress -->
2
+
3
+ # State
4
+
5
+ **Milestone:** upgrade-assurance
6
+ **Current Phase:** All phases complete
7
+ **Status:** Ready to archive
8
+ **Date:** 2026-02-13
9
+
10
+ ## Progress
11
+
12
+ - Phase 1: Complete (1 plan, 5 tasks, 5 commits) -- QA PASS 34/34
13
+ - Phase 2: Complete (1 plan, 4 tasks, 3 commits)
14
+ - Phase 3: Complete (1 plan, 5 tasks, 4 commits) -- QA PASS 37/38
15
+
16
+ ## Decisions
17
+
18
+ | Decision | Date | Rationale |
19
+ |----------|------|-----------|
20
+ | 3 phases: command, config, skill | 2026-02-12 | Each independently valuable; command is foundational |
21
+
22
+ ## Metrics
23
+
24
+ | Metric | Value |
25
+ |--------|-------|
26
+ | Phases | 3 |
27
+ | Plans completed | 3 |
28
+ | Tasks completed | 14 |
29
+ | Tests | 1003 |