Review: Spike: Rails email sending -- ActionMailer setup and docs (re-review)

review-1579-2026-06-23-r2 Review

review ready

Verdict: APPROVED

Re-review of board item #1579 after refinement. Previous review review-1579-2026-06-23 returned NEEDS_REFINEMENT with 5 findings. All 5 have been addressed.

Previous Findings -- Resolution Status

  • [LABEL] story label -- FIXED. Board item label changed from story:email to story:WS-S7. Verified on board item.
  • [SCOPE] arch note missing -- ACKNOWLEDGED. arch-westside-basketball note still does not exist in pal-e-docs, but label arch:westside-basketball references a valid component. For a spike (docs output only), this is acceptable. The arch note can be created as part of broader project scaffolding -- not a blocker.
  • [BODY] westside-ror references -- FIXED. All references in issue body now say westside-basketball. Zero occurrences of westside-ror remain.
  • [BODY] gmail_client.rb missing -- FIXED. app/services/gmail_client.rb now explicitly referenced in the Question section under both "ActionMailer vs Gmail API" (with details: wraps Google::Apis::GmailV1::GmailService, sends via send_user_message) and "Existing state" (noted as "production-proven").
  • [BODY] PR #17 and issue #14 missing -- FIXED. Related section now includes #14 (open issue) and #17 (closed PR, correctly noted as "not merged"). Note: previous review incorrectly stated PR #17 was "merged" -- it was closed without merging. The updated issue body is accurate.

Template Completeness

  • [x] Type -- Spike
  • [x] Lineage -- standalone, references westside-emails and basketball-api
  • [x] Repo -- ldraney/westside-basketball (correct)
  • [x] Question -- well-structured with 5 sub-questions, includes existing state and gmail_client.rb reference
  • [x] Deliverables -- 4 items: docs file, ApplicationMailer update, config/secrets, follow-up ticket updates
  • [x] Time-box -- 2 hours / 1 session
  • [x] Related -- references project, stories (WS-S7, WS-S32), prior art (#14, #17), downstream (#48, #49)

Traceability

  • [x] story:WS-S7 label -- "As an admin, I want to send branded email announcements so that parent comms are professional and consistent"
  • [x] story note verified -- WS-S7 found in project-westside-basketball user-stories section under Admin (Marcus)
  • [x] story:WS-S32 referenced in issue body -- "generic email blast system with pluggable audience queries" -- also verified on project page
  • [ ] arch note gap -- board item has arch:westside-basketball but no arch-westside-basketball note exists. Acceptable for spike -- not a blocker. Recommend creating as part of broader project work.
  • [x] Forgejo issue -- ldraney/westside-basketball#47, open

File Targets

  • [x] app/mailers/application_mailer.rb -- verified: exists with from: "from@example.com" and layout "mailer"
  • [x] app/views/emails/ -- verified: contains compose.html.erb, inbox.html.erb, index.html.erb (email preview pages, not mailer templates -- issue description is accurate)
  • [x] Gemfile google-apis-gmail_v1 -- verified: present at line 20
  • [x] config/environments/production.rb SMTP settings -- verified: commented-out defaults, action_mailer.default_url_options set to example.com
  • [x] app/views/layouts/mailer.html.erb and mailer.text.erb -- verified: both present
  • [x] app/services/gmail_client.rb -- verified: exists, referenced in issue body. Used by emails_controller.rb (lines 28, 37).

Repo Placement

Correct. Issue filed on ldraney/westside-basketball, investigation targets same repo. No cross-repo mismatch.

Dependencies

  • Board item #1580 (Email: Queens EYBL tournament, Forgejo #48) has depends:47 -- correctly documented
  • Board item #1581 (Email #2: TBD, Forgejo #49) has depends:47 and status:blocked-on-spec -- correctly documented
  • Board item #1582 (Report: players behind on payment, Forgejo #50) -- independent, no dependency on this spike
  • Prior art: Issue #14 (open) and PR #17 (closed, NOT merged) now referenced in Related section

Acceptance Criteria

Spike deliverables are clear and verifiable: docs file existence, ApplicationMailer config change, production/dev email config, follow-up ticket updates. All can be verified by file reads or issue inspection. Minor note: ApplicationMailer update is technically implementation, not investigation, but acceptable for a 2pt spike bundling a quick config fix.

Blast Radius

Low. Docs-only spike output. Existing GmailClient service is production-active (used by emails_controller.rb). Spike investigates but does not change running code. Legacy basketball-api email system exists but is being replaced -- no downstream impact from documentation.

Decomposition Assessment

No decomposition needed. Single repo, 2 points, 1 doc file output, 2-hour time-box. Well within the 5-minute agent pass threshold.

Recommendation

No action needed. All previous findings resolved. The remaining arch note gap (arch-westside-basketball) is a broader project scaffolding task, not a blocker for this spike.