Review: #42 Turbo Streams live delivery + cable fix (decomp:1792)
Verdict: NEEDS_REFINEMENT
Template Completeness
- [x] Type -- Feature (child of #12)
- [x] Lineage -- Parent #12, decomp:1792, dependencies #40 and #6
- [x] Repo -- ldraney/intelligentstaffingsystems
- [x] User Story -- As a lead or admin, real-time messages
- [x] Context -- Good background, cable.yml redis problem stated
- [x] File Targets -- 3 targets listed
- [x] Feature Flag -- None (appropriate for infra fix + first Turbo Streams usage)
- [x] Acceptance Criteria -- 3 criteria from parent #12 AC 6-7
- [x] Test Expectations -- broadcast test, turbo frame response test, run command
- [x] Constraints -- Solid Cable, docs-in-PR, CSRF reference
- [x] Checklist -- 6 items
- [x] Related -- Project, parent, sibling, blockers, US references
Traceability
- [x] story:messaging label -- verified in project-iss user-stories section (Epic 4, US-4.1-4.2, role: Lead/Client/Admin)
- [x] story note verified -- found in project-iss user-stories table
- [ ] arch:rails label -- arch note MISSING -- [SCOPE] Create architecture note arch-rails for the Rails component
- [x] Forgejo issue -- ldraney/intelligentstaffingsystems#42, state: open
File Targets
- [x] config/cable.yml -- verified: exists, production adapter IS redis (line 8) with Redis URL (line 9). Matches ticket claim exactly.
- [x] app/models/message.rb -- does not exist yet. Expected: depends on #40 Message CRUD which creates this file. Dependency is documented.
- [x] app/views/messages/ -- does not exist yet. Same dependency on #40. Documented.
- [x] Gemfile line 33 -- verified: solid_cable gem present at line 33. turbo-rails gem present at line 14.
- [ ] db/cable_migrate/ -- MISSING from File Targets. database.yml (line 35-38) already references this path for the cable database, but the directory does not exist. solid_cable install will create migration here. [BODY] Add to File Targets.
- [x] docs/security.md CSRF (line 200) -- verified: CSRF section at line 198-202 explicitly mentions Turbo Frame submissions for message create #12.
Repo Placement
OK. Issue filed on ldraney/intelligentstaffingsystems, Repo field matches, all file targets are in this repo. Single-repo ticket.
Dependencies
- #40 Message CRUD (board item #1817) -- in backlog. BLOCKER: message.rb and views/messages/ must exist before this ticket can execute. Dependency is documented in the issue.
- #6 Keycloak OIDC auth (board item #1786) -- in validation column. Further along. Dependency documented.
- Parent #12 (board item #1792) -- in backlog, marked decomposed. This ticket is Sub-B of the decomposition.
- Sibling #40 must complete before this ticket. Ordering constraint is clear.
Acceptance Criteria
3 ACs, all verifiable by an agent:
- AC1: Turbo Frame rendering -- testable via integration test (form submit returns turbo_stream response)
- AC2: Real-time broadcast -- testable via ActionCable broadcast test, though multi-client live verification may be limited to manual
- AC3: cable.yml adapter check -- simple file content assertion
Test commands are real (rails test). Criteria are clear and complete.
Blast Radius
Low. Redis references exist ONLY in config/cable.yml (lines 8-9). No other config, deployment, or application files reference Redis. The database.yml cable database entry (lines 35-38) is already prepared for solid_cable. No downstream consumers affected by this change within the repo. This is the first Turbo Streams usage -- no existing broadcast patterns to break.
Decomposition Assessment
No decomposition needed.
- 3 file targets in 1 repo -- within limits
- 3 acceptance criteria -- within limits
- Estimated agent work: under 5 minutes (cable.yml edit, model annotation, view partial update, tests)
- 3 points -- appropriately sized
Recommendations
- [SCOPE] Create architecture note arch-rails for the Rails application component. Many board items carry this label.
- [BODY] Add db/cable_migrate/ to File Targets: "db/cable_migrate/ -- create: solid_cable migration (database.yml line 35-38 already references this path but directory does not exist; run bin/rails solid_cable:install or create migration manually)"
- [BODY] Constraints section says "update docs/messaging.md" but this file does not exist yet. Change to "create docs/messaging.md with real-time delivery section" for clarity.