source_monitor 0.3.3 → 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.
- checksums.yaml +4 -4
- data/.claude/commands/release.md +101 -58
- data/.claude/skills/sm-configure/SKILL.md +13 -2
- data/.claude/skills/sm-configure/reference/configuration-reference.md +33 -0
- data/.claude/skills/sm-host-setup/SKILL.md +18 -2
- data/.claude/skills/sm-host-setup/reference/setup-checklist.md +33 -0
- data/.claude/skills/sm-job/SKILL.md +1 -1
- data/.claude/skills/sm-upgrade/SKILL.md +102 -0
- data/.claude/skills/sm-upgrade/reference/upgrade-workflow.md +92 -0
- data/.claude/skills/sm-upgrade/reference/version-history.md +68 -0
- data/.vbw-planning/SHIPPED.md +35 -0
- data/.vbw-planning/config.json +24 -1
- data/.vbw-planning/discovery.json +3 -1
- data/.vbw-planning/{REQUIREMENTS.md → milestones/generator-enhancements/REQUIREMENTS.md} +22 -0
- data/.vbw-planning/milestones/generator-enhancements/ROADMAP.md +125 -0
- data/.vbw-planning/milestones/generator-enhancements/SHIPPED.md +40 -0
- data/.vbw-planning/milestones/generator-enhancements/STATE.md +43 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/01-generator-steps/01-CONTEXT.md +33 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/01-generator-steps/01-VERIFICATION.md +86 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/01-generator-steps/PLAN-01-SUMMARY.md +61 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/01-generator-steps/PLAN-01.md +380 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/02-verification/02-VERIFICATION.md +78 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/02-verification/PLAN-01-SUMMARY.md +46 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/02-verification/PLAN-01.md +500 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/03-docs-alignment/03-VERIFICATION.md +89 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/03-docs-alignment/PLAN-01-SUMMARY.md +48 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/03-docs-alignment/PLAN-01.md +456 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/04-dashboard-ux/04-VERIFICATION.md +129 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/04-dashboard-ux/PLAN-01-SUMMARY.md +70 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/04-dashboard-ux/PLAN-01.md +747 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/05-active-storage-images/05-VERIFICATION.md +156 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/05-active-storage-images/PLAN-01-SUMMARY.md +69 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/05-active-storage-images/PLAN-01.md +455 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/05-active-storage-images/PLAN-02-SUMMARY.md +39 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/05-active-storage-images/PLAN-02.md +488 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/06-netflix-feed-fix/06-VERIFICATION.md +100 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/06-netflix-feed-fix/PLAN-01-SUMMARY.md +37 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/06-netflix-feed-fix/PLAN-01.md +345 -0
- data/.vbw-planning/milestones/upgrade-assurance/REQUIREMENTS.md +80 -0
- data/.vbw-planning/milestones/upgrade-assurance/ROADMAP.md +75 -0
- data/.vbw-planning/milestones/upgrade-assurance/STATE.md +29 -0
- data/.vbw-planning/milestones/upgrade-assurance/phases/01-upgrade-command/01-VERIFICATION.md +144 -0
- data/.vbw-planning/milestones/upgrade-assurance/phases/01-upgrade-command/PLAN-01-SUMMARY.md +43 -0
- data/.vbw-planning/milestones/upgrade-assurance/phases/01-upgrade-command/PLAN-01.md +405 -0
- data/.vbw-planning/milestones/upgrade-assurance/phases/02-config-deprecation/PLAN-01-SUMMARY.md +27 -0
- data/.vbw-planning/milestones/upgrade-assurance/phases/02-config-deprecation/PLAN-01.md +303 -0
- data/.vbw-planning/milestones/upgrade-assurance/phases/03-upgrade-skill-docs/03-VERIFICATION.md +380 -0
- data/.vbw-planning/milestones/upgrade-assurance/phases/03-upgrade-skill-docs/PLAN-01-SUMMARY.md +36 -0
- data/.vbw-planning/milestones/upgrade-assurance/phases/03-upgrade-skill-docs/PLAN-01.md +652 -0
- data/CHANGELOG.md +48 -0
- data/CLAUDE.md +5 -3
- data/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/app/assets/builds/source_monitor/application.css +9 -0
- data/app/helpers/source_monitor/application_helper.rb +38 -0
- data/app/jobs/source_monitor/download_content_images_job.rb +72 -0
- data/app/models/source_monitor/item_content.rb +2 -0
- data/app/views/source_monitor/dashboard/_recent_activity.html.erb +9 -0
- data/app/views/source_monitor/items/_details.html.erb +2 -2
- data/app/views/source_monitor/logs/index.html.erb +9 -0
- data/app/views/source_monitor/sources/_details.html.erb +2 -2
- data/app/views/source_monitor/sources/_row.html.erb +1 -1
- data/docs/setup.md +10 -1
- data/docs/troubleshooting.md +38 -7
- data/docs/upgrade.md +140 -0
- data/lib/generators/source_monitor/install/install_generator.rb +101 -0
- data/lib/source_monitor/configuration/deprecation_registry.rb +237 -0
- data/lib/source_monitor/configuration/http_settings.rb +7 -1
- data/lib/source_monitor/configuration/images_settings.rb +37 -0
- data/lib/source_monitor/configuration.rb +11 -1
- data/lib/source_monitor/dashboard/queries/recent_activity_query.rb +16 -7
- data/lib/source_monitor/dashboard/recent_activity.rb +1 -0
- data/lib/source_monitor/dashboard/recent_activity_presenter.rb +15 -2
- data/lib/source_monitor/fetching/feed_fetcher/entry_processor.rb +13 -0
- data/lib/source_monitor/http.rb +23 -0
- data/lib/source_monitor/images/content_rewriter.rb +81 -0
- data/lib/source_monitor/images/downloader.rb +82 -0
- data/lib/source_monitor/logs/table_presenter.rb +25 -0
- data/lib/source_monitor/setup/cli.rb +7 -0
- data/lib/source_monitor/setup/procfile_patcher.rb +31 -0
- data/lib/source_monitor/setup/queue_config_patcher.rb +84 -0
- data/lib/source_monitor/setup/skills_installer.rb +1 -0
- data/lib/source_monitor/setup/upgrade_command.rb +59 -0
- data/lib/source_monitor/setup/verification/pending_migrations_verifier.rb +92 -0
- data/lib/source_monitor/setup/verification/recurring_schedule_verifier.rb +102 -0
- data/lib/source_monitor/setup/verification/runner.rb +1 -1
- data/lib/source_monitor/setup/verification/solid_queue_verifier.rb +1 -1
- data/lib/source_monitor/setup/workflow.rb +10 -0
- data/lib/source_monitor/version.rb +1 -1
- data/lib/source_monitor.rb +11 -0
- metadata +51 -2
|
@@ -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
|
+
```
|
data/.vbw-planning/SHIPPED.md
CHANGED
|
@@ -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`
|
data/.vbw-planning/config.json
CHANGED
|
@@ -8,5 +8,28 @@
|
|
|
8
8
|
"visual_format": "unicode",
|
|
9
9
|
"compaction_trigger": 130000,
|
|
10
10
|
"max_tasks_per_plan": 5,
|
|
11
|
-
"agent_teams": true
|
|
11
|
+
"agent_teams": true,
|
|
12
|
+
"model_profile": "quality",
|
|
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
|
|
12
35
|
}
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
"User wants comprehensive cleanup, not surface-level",
|
|
20
20
|
"Public API changes are acceptable for convention alignment",
|
|
21
21
|
"Tests should be updated to match any changes, not removed",
|
|
22
|
-
"All layers: models, controllers, services, dead code"
|
|
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"
|
|
23
25
|
]
|
|
24
26
|
}
|
|
@@ -32,6 +32,28 @@ Core value: Drop-in Rails engine for feed monitoring, content scraping, and oper
|
|
|
32
32
|
- [ ] **REQ-14**: Audit and fix any RuboCop violations against omakase ruleset
|
|
33
33
|
- [ ] **REQ-15**: Ensure all models, controllers, and service objects follow Rails conventions
|
|
34
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
|
+
|
|
35
57
|
## v2 Requirements
|
|
36
58
|
|
|
37
59
|
- [ ] **REQ-XX**: Improve optional dependency loading with clear error messages
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
<!-- VBW ROADMAP -- Phase decomposition with requirement mapping -->
|
|
2
|
+
<!-- Created during /vbw scope -->
|
|
3
|
+
|
|
4
|
+
# SourceMonitor Generator Enhancements Roadmap
|
|
5
|
+
|
|
6
|
+
**Milestone:** generator-enhancements
|
|
7
|
+
**Goal:** Make 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.
|
|
8
|
+
|
|
9
|
+
## Phases
|
|
10
|
+
|
|
11
|
+
1. [x] ~~Phase 0: Documentation Gaps~~ (shipped via quick fix ea788ea)
|
|
12
|
+
2. [x] Phase 1: Install Generator Steps (Procfile.dev + Queue Config)
|
|
13
|
+
3. [x] Phase 2: Recurring Schedule Verifier
|
|
14
|
+
4. [x] Phase 3: Skills & Documentation Alignment
|
|
15
|
+
5. [x] Phase 4: Dashboard UX Improvements
|
|
16
|
+
6. [x] Phase 5: Active Storage Image Downloads
|
|
17
|
+
7. [x] Phase 6: Netflix Feed Investigation
|
|
18
|
+
|
|
19
|
+
## Phase Details
|
|
20
|
+
|
|
21
|
+
### Phase 1: Install Generator Steps
|
|
22
|
+
|
|
23
|
+
**Goal:** Add two new idempotent steps to the install generator: (a) patch `Procfile.dev` with a `jobs:` entry for Solid Queue, and (b) patch the queue config dispatcher with `recurring_schedule: config/recurring.yml`.
|
|
24
|
+
|
|
25
|
+
**Requirements:** REQ-16, REQ-17, REQ-18
|
|
26
|
+
|
|
27
|
+
**Success Criteria:**
|
|
28
|
+
- `bin/rails generate source_monitor:install` patches Procfile.dev when present (idempotent, skip if entry exists)
|
|
29
|
+
- `bin/rails generate source_monitor:install` patches queue.yml dispatcher with recurring_schedule (idempotent)
|
|
30
|
+
- Both steps wired into `Setup::Workflow` for the guided installer
|
|
31
|
+
- Generator tests cover: fresh file, existing file with entry, existing file without entry, missing file
|
|
32
|
+
- `bin/rails test` passes, RuboCop clean
|
|
33
|
+
|
|
34
|
+
### Phase 2: Recurring Schedule Verifier
|
|
35
|
+
|
|
36
|
+
**Goal:** Add a `RecurringScheduleVerifier` to the verification suite that checks whether recurring tasks are actually registered with Solid Queue dispatchers, and enhance the existing `SolidQueueVerifier` to suggest Procfile.dev when workers aren't detected.
|
|
37
|
+
|
|
38
|
+
**Requirements:** REQ-19, REQ-20
|
|
39
|
+
|
|
40
|
+
**Success Criteria:**
|
|
41
|
+
- `bin/source_monitor verify` checks that recurring tasks are registered (not just that workers heartbeat)
|
|
42
|
+
- Warning when no recurring tasks found with actionable remediation message
|
|
43
|
+
- SolidQueueVerifier remediation mentions Procfile.dev for `bin/dev` users
|
|
44
|
+
- Verifier tests with mocked Solid Queue state
|
|
45
|
+
- `bin/rails test` passes, RuboCop clean
|
|
46
|
+
|
|
47
|
+
### Phase 3: Skills & Documentation Alignment
|
|
48
|
+
|
|
49
|
+
**Goal:** Update all `sm-*` skills and docs to reflect that the generator now automatically handles Procfile.dev and recurring_schedule wiring. Remove manual steps that are now automated.
|
|
50
|
+
|
|
51
|
+
**Requirements:** REQ-21
|
|
52
|
+
|
|
53
|
+
**Success Criteria:**
|
|
54
|
+
- sm-host-setup skill reflects new generator capabilities (auto-patching, not manual steps)
|
|
55
|
+
- sm-configure skill references the automatic recurring_schedule wiring
|
|
56
|
+
- docs/setup.md updated to note the generator handles both automatically
|
|
57
|
+
- docs/troubleshooting.md updated with improved diagnostics
|
|
58
|
+
- setup-checklist.md reflects automation (checked by default, not manual)
|
|
59
|
+
|
|
60
|
+
### Phase 4: Dashboard UX Improvements
|
|
61
|
+
|
|
62
|
+
**Goal:** Show source URLs in fetch log entries for both successes and failures on the dashboard, and make links to sources and items clickable (opening in a new tab).
|
|
63
|
+
|
|
64
|
+
**Requirements:** REQ-22, REQ-23
|
|
65
|
+
|
|
66
|
+
**Success Criteria:**
|
|
67
|
+
- Fetch log entries on the dashboard display the source URL alongside the existing summary
|
|
68
|
+
- Both success and failure fetch logs show the URL
|
|
69
|
+
- Source names and item titles are clickable links that open in a new tab
|
|
70
|
+
- Existing dashboard layout is preserved
|
|
71
|
+
- `bin/rails test` passes, RuboCop clean
|
|
72
|
+
|
|
73
|
+
### Phase 5: Active Storage Image Downloads
|
|
74
|
+
|
|
75
|
+
**Goal:** Add a configurable option to download inline images from feed items to Active Storage instead of loading them directly from the source URL. This prevents broken images when sources go offline and improves page load performance.
|
|
76
|
+
|
|
77
|
+
**Requirements:** REQ-24
|
|
78
|
+
|
|
79
|
+
**Success Criteria:**
|
|
80
|
+
- New configuration option (`config.images.download_to_active_storage` or similar) defaults to `false`
|
|
81
|
+
- When enabled, inline images in item content are detected and downloaded to Active Storage
|
|
82
|
+
- Original image URLs are replaced with Active Storage URLs in the stored content
|
|
83
|
+
- Images that fail to download gracefully fall back to original URLs
|
|
84
|
+
- Configuration is documented in sm-configure skill
|
|
85
|
+
- `bin/rails test` passes, RuboCop clean
|
|
86
|
+
|
|
87
|
+
### Phase 6: Netflix Feed Investigation
|
|
88
|
+
|
|
89
|
+
**Goal:** Investigate and fix the failing fetch for `https://netflixtechblog.com/feed`. Determine whether the issue is in the feed parser, HTTP client configuration, or content format, and apply appropriate fixes.
|
|
90
|
+
|
|
91
|
+
**Requirements:** REQ-25
|
|
92
|
+
|
|
93
|
+
**Success Criteria:**
|
|
94
|
+
- Root cause identified and documented
|
|
95
|
+
- Fix applied (parser, HTTP client, or configuration change)
|
|
96
|
+
- Netflix Tech Blog feed fetches successfully
|
|
97
|
+
- No regressions in other feed types
|
|
98
|
+
- `bin/rails test` passes, RuboCop clean
|
|
99
|
+
|
|
100
|
+
## Progress
|
|
101
|
+
|
|
102
|
+
| Phase | Status | Plans |
|
|
103
|
+
|-------|--------|-------|
|
|
104
|
+
| 0 | Complete | - |
|
|
105
|
+
| 1 | Complete | PLAN-01 (5 tasks, 4 commits) |
|
|
106
|
+
| 2 | Complete | PLAN-01 (5 tasks, 1 commit) |
|
|
107
|
+
| 3 | Complete | PLAN-01 (5 tasks, 1 commit) |
|
|
108
|
+
| 4 | Complete | PLAN-01 (5 tasks, 5 commits) |
|
|
109
|
+
| 5 | Complete | PLAN-01 (4 tasks, 5 commits) + PLAN-02 (4 tasks, 4 commits) |
|
|
110
|
+
| 6 | Complete | PLAN-01 (5 tasks, 5 commits) |
|
|
111
|
+
|
|
112
|
+
## Requirement Mapping
|
|
113
|
+
|
|
114
|
+
| REQ | Phase | Description |
|
|
115
|
+
|-----|-------|-------------|
|
|
116
|
+
| REQ-16 | 1 | Generator patches Procfile.dev with jobs: entry |
|
|
117
|
+
| REQ-17 | 1 | Generator patches queue config with recurring_schedule |
|
|
118
|
+
| REQ-18 | 1 | Guided workflow integrates both new steps |
|
|
119
|
+
| REQ-19 | 2 | RecurringScheduleVerifier checks recurring task registration |
|
|
120
|
+
| REQ-20 | 2 | SolidQueueVerifier remediation mentions Procfile.dev |
|
|
121
|
+
| REQ-21 | 3 | Skills and docs reflect automated setup |
|
|
122
|
+
| REQ-22 | 4 | Fetch logs show source URL on dashboard |
|
|
123
|
+
| REQ-23 | 4 | Dashboard links clickable in new tab |
|
|
124
|
+
| REQ-24 | 5 | Download inline images to Active Storage |
|
|
125
|
+
| REQ-25 | 6 | Fix Netflix Tech Blog feed fetch |
|
|
@@ -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,43 @@
|
|
|
1
|
+
<!-- VBW STATE -- Current milestone progress -->
|
|
2
|
+
|
|
3
|
+
# State
|
|
4
|
+
|
|
5
|
+
**Milestone:** generator-enhancements
|
|
6
|
+
**Current Phase:** All phases complete
|
|
7
|
+
**Status:** Ready for archive
|
|
8
|
+
**Date:** 2026-02-12
|
|
9
|
+
|
|
10
|
+
## Progress
|
|
11
|
+
|
|
12
|
+
- Phase 0: Complete (quick fix ea788ea)
|
|
13
|
+
- Phase 1: Complete (1 plan, 5 tasks, 4 commits)
|
|
14
|
+
- Phase 2: Complete (1 plan, 5 tasks, 1 commit)
|
|
15
|
+
- Phase 3: Complete (1 plan, 5 tasks, 1 commit) -- QA PASS
|
|
16
|
+
- Phase 4: Complete (1 plan, 5 tasks, 5 commits) -- QA PASS 23/23
|
|
17
|
+
- Phase 5: Complete (2 plans, 9 tasks, 9 commits) -- QA PASS 34/34
|
|
18
|
+
- Phase 6: Complete (1 plan, 5 tasks, 5 commits) -- QA PASS 18/18
|
|
19
|
+
|
|
20
|
+
## Decisions
|
|
21
|
+
|
|
22
|
+
| Decision | Date | Rationale |
|
|
23
|
+
|----------|------|-----------|
|
|
24
|
+
| Docs-first approach | 2026-02-11 | Shipped doc fixes before code changes to unblock users immediately |
|
|
25
|
+
| 3 phases for code changes | 2026-02-11 | Generator steps, verification, then docs alignment -- each independently testable |
|
|
26
|
+
| Always create/patch Procfile.dev | 2026-02-11 | Maximum hand-holding for host app setup |
|
|
27
|
+
| Target queue.yml only | 2026-02-11 | Rails 8 default, no legacy naming support |
|
|
28
|
+
| External links open new tab with icon | 2026-02-12 | Consistent UX for all external URLs across dashboard, logs, sources, items |
|
|
29
|
+
| Fetch log URL display: domain for RSS, item URL for scrapes | 2026-02-12 | User requested contextual URL display based on event type |
|
|
30
|
+
| Image downloads via background job to ItemContent | 2026-02-12 | Content images only, opt-in via config.images.download_to_active_storage |
|
|
31
|
+
| SSL fix: general cert store config, not Netflix-specific | 2026-02-12 | OpenSSL::X509::Store#set_default_paths on every Faraday connection |
|
|
32
|
+
|
|
33
|
+
## Metrics
|
|
34
|
+
|
|
35
|
+
| Metric | Value |
|
|
36
|
+
|--------|-------|
|
|
37
|
+
| Phases | 7 (Phase 0-6) |
|
|
38
|
+
| Plans completed | 7 (across all phases) |
|
|
39
|
+
| Tasks completed | 34 |
|
|
40
|
+
| Commits | ~26 |
|
|
41
|
+
| Tests | 973 (up from 841) |
|
|
42
|
+
| RuboCop | 389 files, 0 offenses |
|
|
43
|
+
| Brakeman | 0 warnings |
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Phase 1 Context: Install Generator Steps
|
|
2
|
+
|
|
3
|
+
## User Vision
|
|
4
|
+
Enhance the install generator to automatically handle the two most common Solid Queue setup failures in host apps: missing Procfile.dev jobs entry and missing recurring_schedule dispatcher wiring.
|
|
5
|
+
|
|
6
|
+
## Essential Features
|
|
7
|
+
- Generator creates Procfile.dev if missing (with web: and jobs: entries)
|
|
8
|
+
- Generator patches existing Procfile.dev to add jobs: entry (idempotent)
|
|
9
|
+
- Generator patches config/queue.yml dispatcher with recurring_schedule: config/recurring.yml
|
|
10
|
+
- Both steps integrated into the guided Setup::Workflow
|
|
11
|
+
|
|
12
|
+
## Technical Preferences
|
|
13
|
+
- **Procfile.dev:** Always create/patch -- maximum hand-holding. Create if missing, patch if exists.
|
|
14
|
+
- **Queue config:** Target `config/queue.yml` (Rails 8 default). Don't worry about legacy `solid_queue.yml` naming.
|
|
15
|
+
- Follow existing generator patterns (idempotent, skip-if-present, say_status output)
|
|
16
|
+
|
|
17
|
+
## Boundaries
|
|
18
|
+
- Don't modify any other config files (cable.yml, database.yml, etc.)
|
|
19
|
+
- Don't modify the initializer template
|
|
20
|
+
- Don't change existing generator steps (routes, initializer, recurring.yml)
|
|
21
|
+
- Don't add verification logic here (that's Phase 2)
|
|
22
|
+
|
|
23
|
+
## Acceptance Criteria
|
|
24
|
+
- `bin/rails generate source_monitor:install` creates Procfile.dev with web: + jobs: when none exists
|
|
25
|
+
- `bin/rails generate source_monitor:install` adds jobs: line to existing Procfile.dev without duplicating
|
|
26
|
+
- `bin/rails generate source_monitor:install` adds recurring_schedule to queue.yml dispatcher
|
|
27
|
+
- `bin/source_monitor install` (guided) runs both new steps
|
|
28
|
+
- All existing generator tests still pass
|
|
29
|
+
- New tests cover: fresh Procfile.dev, existing with entry, existing without entry, missing queue.yml
|
|
30
|
+
|
|
31
|
+
## Decisions Made
|
|
32
|
+
- Create Procfile.dev if missing (not just warn)
|
|
33
|
+
- Target config/queue.yml only (Rails 8 default), not solid_queue.yml
|
data/.vbw-planning/milestones/generator-enhancements/phases/01-generator-steps/01-VERIFICATION.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# PLAN-01 Verification Report
|
|
2
|
+
|
|
3
|
+
## Verdict: PASS
|
|
4
|
+
|
|
5
|
+
**Verified by:** QA agent (deep tier, 30 checks)
|
|
6
|
+
**Date:** 2026-02-11
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Functional Verification
|
|
11
|
+
|
|
12
|
+
| # | Check | Result | Notes |
|
|
13
|
+
|---|-------|--------|-------|
|
|
14
|
+
| 1 | Generator tests pass | PASS | 20 runs, 109 assertions, 0 failures, 0 errors |
|
|
15
|
+
| 2 | Workflow tests pass | PASS | 8 runs, 22 assertions, 0 failures, 0 errors |
|
|
16
|
+
| 3 | Full test suite passes | PASS | 867 runs, 2898 assertions, 0 failures, 0 errors |
|
|
17
|
+
| 4 | RuboCop clean | PASS | 376 files inspected, no offenses detected |
|
|
18
|
+
| 5 | Brakeman clean | PASS | 0 warnings, 0 errors |
|
|
19
|
+
|
|
20
|
+
## Code Review Checks
|
|
21
|
+
|
|
22
|
+
| # | Check | Result | Notes |
|
|
23
|
+
|---|-------|--------|-------|
|
|
24
|
+
| 6 | Public method order correct | PASS | Order is: `add_routes_mount` (L17), `create_initializer` (L24), `configure_recurring_jobs` (L36), `patch_procfile_dev` (L52), `configure_queue_dispatcher` (L70), `print_next_steps` (L90) |
|
|
25
|
+
| 7 | `patch_procfile_dev` handles 3 cases | PASS | Create (L64-66), append (L62-63), skip (L57-60) |
|
|
26
|
+
| 8 | `configure_queue_dispatcher` handles 4 cases | PASS | Missing file (L73-76), already configured (L80-83), needs patching (L85-87), no dispatchers (L254-256 via `add_recurring_schedule_to_dispatchers!`) |
|
|
27
|
+
| 9 | Private methods/constants in private section | PASS | `PROCFILE_JOBS_ENTRY` (L104), `RECURRING_SCHEDULE_VALUE` (L201), `DEFAULT_DISPATCHER` (L203), `queue_config_has_recurring_schedule?` (L209), `add_recurring_schedule_to_dispatchers!` (L229) -- all after `private` on L102 |
|
|
28
|
+
| 10 | `frozen_string_literal: true` on all new files | PASS | `procfile_patcher.rb` (L1), `queue_config_patcher.rb` (L1) both have it |
|
|
29
|
+
| 11 | Idempotency: both steps safe to run multiple times | PASS | `patch_procfile_dev`: checks `/^jobs:/` before acting; `configure_queue_dispatcher`: checks `has_recurring_schedule?` before acting. Test `test_does_not_duplicate_jobs_entry_when_rerun` explicitly verifies. |
|
|
30
|
+
| 12 | `YAML.safe_load` uses `aliases: true` | PASS | Generator L78: `YAML.safe_load(File.read(queue_path), aliases: true)`. QueueConfigPatcher L24: `YAML.safe_load(path.read, aliases: true)` |
|
|
31
|
+
| 13 | ProcfilePatcher matches `/^jobs:/` regex | PASS | Both generator (L57) and ProcfilePatcher (L17) use `/^jobs:/` regex |
|
|
32
|
+
| 14 | QueueConfigPatcher recursive dispatcher search | PASS | `has_recurring_schedule?` (L36-53) recursively iterates `parsed.each_value`, checks nested hashes, and also checks top-level `dispatchers` key for flat configs |
|
|
33
|
+
| 15 | Workflow has both new kwargs with defaults | PASS | `procfile_patcher: ProcfilePatcher.new` (L40), `queue_config_patcher: QueueConfigPatcher.new` (L41) |
|
|
34
|
+
| 16 | Workflow calls patchers in correct position | PASS | Called at L73-74, after `initializer_patcher.ensure_navigation_hint` (L72) and before devise check (L76) |
|
|
35
|
+
| 17 | Autoload entries in `lib/source_monitor.rb` | PASS | `ProcfilePatcher` (L164), `QueueConfigPatcher` (L165) both present in `Setup` module autoloads |
|
|
36
|
+
| 18 | No hardcoded paths or env-specific assumptions | PASS | Paths are relative to `destination_root` (generator) or injected via constructor kwargs (patcher classes). No absolute paths. |
|
|
37
|
+
| 19 | Test isolation (no cross-test contamination) | PASS | Generator tests use `prepare_destination` in setup. Workflow tests use Spy/Mock objects for all collaborators. No shared state. WORKER_SUFFIX handles parallel workers. |
|
|
38
|
+
| 20 | `say_status` calls use correct symbols | PASS | `:create` (L66), `:append` (L63), `:skip` (L58, L74, L81), `:info` (L91-99) -- all correct |
|
|
39
|
+
|
|
40
|
+
## Edge Case Verification
|
|
41
|
+
|
|
42
|
+
| # | Check | Result | Notes |
|
|
43
|
+
|---|-------|--------|-------|
|
|
44
|
+
| 21 | Procfile.dev has `jobs:` with different content | PASS | Regex `/^jobs:/` matches any line starting with `jobs:` regardless of the command after it. Correctly skips without overwriting. |
|
|
45
|
+
| 22 | queue.yml nested environments with different dispatchers | PASS | `queue_config_has_recurring_schedule?` recursively walks all hash values. `add_recurring_schedule_to_dispatchers!` processes all nested dispatcher arrays under any env key. Both handle flat and nested configs. |
|
|
46
|
+
| 23 | queue.yml empty/nil after parsing | PASS | L78: `|| {}` ensures nil YAML parse result becomes empty hash. `queue_config_has_recurring_schedule?({})` returns false. `add_recurring_schedule_to_dispatchers!({})` adds default dispatcher section. |
|
|
47
|
+
| 24 | Procfile.dev has trailing newlines | PASS | When appending (L62), uses `puts("", PROCFILE_JOBS_ENTRY)` which adds a blank line before the jobs entry. This handles trailing newlines gracefully -- the blank line acts as separator. |
|
|
48
|
+
| 25 | queue.yml dispatchers is empty array | PASS | If `dispatchers: []`, the `any?` check in `has_recurring_schedule?` returns false (no items to check). `add_recurring_schedule_to_dispatchers!` iterates the empty array (no-op) but sets `found_dispatchers = true` since the key exists. This means an empty dispatchers array stays empty with no recurring_schedule added. **Minor note**: This is a debatable edge case -- an empty dispatchers array means the user intentionally has no dispatchers, so not adding one is reasonable behavior. |
|
|
49
|
+
|
|
50
|
+
## Requirements Verification
|
|
51
|
+
|
|
52
|
+
| # | Check | Result | Notes |
|
|
53
|
+
|---|-------|--------|-------|
|
|
54
|
+
| 26 | REQ-16: Generator patches Procfile.dev | PASS | `patch_procfile_dev` creates/appends/skips as needed. 4 tests cover all scenarios. |
|
|
55
|
+
| 27 | REQ-17: Generator patches queue.yml | PASS | `configure_queue_dispatcher` patches/skips/handles-missing as needed. 4 tests cover all scenarios. |
|
|
56
|
+
| 28 | REQ-18: Workflow integrates both | PASS | `workflow.rb` L73-74 calls both patchers. Workflow test L96-97 verifies both are called. |
|
|
57
|
+
| 29 | Test count increased | PASS | Was 841, now 867 (+26 tests: 8 new generator tests + 18 other additions from this phase) |
|
|
58
|
+
| 30 | No regressions in existing tests | PASS | Full suite: 867 runs, 2898 assertions, 0 failures, 0 errors |
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Issues Found
|
|
63
|
+
|
|
64
|
+
### Minor (non-blocking)
|
|
65
|
+
|
|
66
|
+
1. **Empty dispatchers array edge case (Check #25)**: If `queue.yml` has `dispatchers: []`, the code sees `found_dispatchers = true` (the key exists) but doesn't add any recurring_schedule since there are no dispatcher hashes to iterate. This means the empty array is left as-is. This is arguably correct behavior (respecting user intent), but worth documenting.
|
|
67
|
+
|
|
68
|
+
2. **Generator test count**: The plan expected "11 existing + 8 new = 19" but the actual count is 20 (12 existing + 8 new). The plan summary correctly notes 20. The 12th existing test was likely the `test_outputs_next_steps_with_doc_links` test that was already present. No issue -- just a plan estimate mismatch.
|
|
69
|
+
|
|
70
|
+
### None (blocking)
|
|
71
|
+
|
|
72
|
+
No blocking issues found.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Risk Assessment
|
|
77
|
+
|
|
78
|
+
**Risk level: LOW**
|
|
79
|
+
|
|
80
|
+
- All 867 tests pass with 0 failures
|
|
81
|
+
- RuboCop and Brakeman clean
|
|
82
|
+
- Both new generator steps follow established idempotent patterns
|
|
83
|
+
- Workflow integration is minimal (2 unconditional patcher calls)
|
|
84
|
+
- New files are self-contained with no side effects
|
|
85
|
+
- Test coverage includes all happy paths, skip paths, and edge cases
|
|
86
|
+
- No security concerns (file operations are scoped to destination_root)
|
data/.vbw-planning/milestones/generator-enhancements/phases/01-generator-steps/PLAN-01-SUMMARY.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# PLAN-01 Summary: procfile-queue-generator-steps
|
|
2
|
+
|
|
3
|
+
## Status: COMPLETE
|
|
4
|
+
|
|
5
|
+
## What was done
|
|
6
|
+
|
|
7
|
+
### Task 1: Add Procfile.dev generator step
|
|
8
|
+
- Added `patch_procfile_dev` public method to `InstallGenerator` (between `configure_recurring_jobs` and `print_next_steps`)
|
|
9
|
+
- Handles 3 cases: create new file, append to existing, skip if already present
|
|
10
|
+
- Added `PROCFILE_JOBS_ENTRY` private constant
|
|
11
|
+
- Updated `print_next_steps` with Procfile.dev info message
|
|
12
|
+
|
|
13
|
+
### Task 2: Add queue.yml dispatcher step
|
|
14
|
+
- Added `configure_queue_dispatcher` public method to `InstallGenerator` (between `patch_procfile_dev` and `print_next_steps`)
|
|
15
|
+
- Handles 4 cases: missing file, already configured, needs patching, no dispatchers key
|
|
16
|
+
- Added private helpers: `queue_config_has_recurring_schedule?`, `add_recurring_schedule_to_dispatchers!`
|
|
17
|
+
- Added `RECURRING_SCHEDULE_VALUE` and `DEFAULT_DISPATCHER` private constants
|
|
18
|
+
|
|
19
|
+
### Task 3: Add 8 generator tests
|
|
20
|
+
- 4 Procfile.dev tests: create, append, skip, no-duplicate
|
|
21
|
+
- 4 queue.yml tests: patch dispatchers, skip when configured, skip when missing, add default dispatcher
|
|
22
|
+
- All 20 generator tests pass (12 existing + 8 new)
|
|
23
|
+
|
|
24
|
+
### Task 4: Add workflow helpers and integration
|
|
25
|
+
- Created `lib/source_monitor/setup/procfile_patcher.rb` (lightweight Pathname-based helper)
|
|
26
|
+
- Created `lib/source_monitor/setup/queue_config_patcher.rb` (YAML parsing with recursive dispatcher search)
|
|
27
|
+
- Modified `lib/source_monitor/setup/workflow.rb`: added 2 new kwargs, wired into `run` after `initializer_patcher` and before devise check
|
|
28
|
+
- Added autoload entries in `lib/source_monitor.rb`
|
|
29
|
+
- Updated all 8 workflow tests with new collaborator spies
|
|
30
|
+
|
|
31
|
+
### Task 5: Full suite verification
|
|
32
|
+
- 867 test runs, 2898 assertions, 0 failures, 0 errors
|
|
33
|
+
- RuboCop: 376 files, 0 offenses
|
|
34
|
+
- Brakeman: 0 warnings
|
|
35
|
+
|
|
36
|
+
## Files modified
|
|
37
|
+
- `lib/generators/source_monitor/install/install_generator.rb` -- 2 new public methods, 4 private helpers/constants
|
|
38
|
+
- `test/lib/generators/install_generator_test.rb` -- 8 new tests
|
|
39
|
+
- `lib/source_monitor/setup/procfile_patcher.rb` -- NEW
|
|
40
|
+
- `lib/source_monitor/setup/queue_config_patcher.rb` -- NEW
|
|
41
|
+
- `lib/source_monitor/setup/workflow.rb` -- 2 new kwargs, 2 new patcher calls
|
|
42
|
+
- `test/lib/source_monitor/setup/workflow_test.rb` -- added patcher spies to all tests
|
|
43
|
+
- `lib/source_monitor.rb` -- 2 new autoload entries
|
|
44
|
+
|
|
45
|
+
## Commits
|
|
46
|
+
1. `af59468` feat(generator): add Procfile.dev patching step to install generator
|
|
47
|
+
2. `29250af` feat(generator): add queue.yml dispatcher step to install generator
|
|
48
|
+
3. `96365b9` feat(generator): add 8 tests for Procfile.dev and queue.yml steps
|
|
49
|
+
4. `4393d17` feat(generator): add workflow helpers and wire patchers into guided install
|
|
50
|
+
|
|
51
|
+
## Acceptance criteria met
|
|
52
|
+
- Generator creates Procfile.dev with web: + jobs: entries when none exists (REQ-16)
|
|
53
|
+
- Generator appends jobs: entry to existing Procfile.dev without duplicating (REQ-16)
|
|
54
|
+
- Generator skips Procfile.dev when jobs: entry already present (REQ-16 idempotency)
|
|
55
|
+
- Generator patches queue.yml dispatchers with recurring_schedule (REQ-17)
|
|
56
|
+
- Generator skips queue.yml when recurring_schedule already configured (REQ-17 idempotency)
|
|
57
|
+
- Generator handles missing queue.yml gracefully (REQ-17 edge case)
|
|
58
|
+
- Guided workflow runs both patchers after generator step (REQ-18)
|
|
59
|
+
- All existing tests continue to pass (no regressions)
|
|
60
|
+
- 8 new generator tests cover all scenarios
|
|
61
|
+
- RuboCop clean, Brakeman clean
|