Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Signup nudge eligibility treats subscribed-then-unsubscribed members as never subscribed

オープン
#2,920 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rails, ruby
領域
backend, database

調査の方向性

Start with app/services/signup_nudge_email_service.rb#never_subscribed and app/controllers/subscriptions_controller.rb#destroy, then inspect the subscription and activity data model. Confirm which persistence direction maintainers choose before implementing it. Done means a member who subscribed and later unsubscribed is not treated as never subscribed, while group-specific eligibility and followup behavior remain correct.

索引モデルが issue の本文から書いたものです。

説明

bug

Summary

SignupNudgeEmailService#never_subscribed defines eligibility as "has no row in subscriptions". But SubscriptionsController#destroy deletes the subscription row when a member unsubscribes from a chapter group. A member who subscribed and later left is therefore indistinguishable from a member who never subscribed at all — and becomes nudge-eligible again.

Real production case

Member 31302 (dump of 2026-09-24), full timeline from activities + workshop_invitations:

Time (2026-09, UTC) Event
09-02 11:16 Signs up
09-02 11:18 RSVPs as Coach (2 minutes after signup)
09-09 18:30 Attends London workshop
09-17 09:16 RSVPs to the next London workshop
09-17 09:34 Unsubscribes from London Coaches group (subscription.removed activity, id 569)
09-17 13:04 Receives a "Let's get you connected with codebar!" signup nudge

Four hours after choosing to leave the chapter group, this actively engaged coach got an email whose premise is "you never connected with codebar". The unsubscribe made him eligible again; the nudge arrived same-day.

Two compounding facts:

  1. subscription.created activity tracking only started 2026-09-13 (65 events / 41 members) and subscription.removed on 2026-09-14 (61 events / 45 members). His subscription predates tracking, so its removal left no "was subscribed" evidence — only the removal event exists.
  2. In the dump, 37 of the 45 members with a tracked unsubscribe now have zero subscription rows — i.e. the nudge service currently classifies all 37 as "never subscribed". One of them is inside the current nudge window and not banned.

Why this is separate from #2919

The daily duplicate-send bug (#2919, .merge clobbering the delivery anti-join) causes the same member to be emailed repeatedly, but fixing it does not fix this: a subscribe-then-unsubscribe member with no prior nudge is genuinely selected by the corrected query. The eligibility rule itself needs to account for unsubscribes.

Scope of the wrongness

  • Messaging mismatch: the nudge copy assumes a dormant lurker; unsubscribers made an active choice to leave. Re-pitching them risks reading as ignoring their opt-out.
  • Same-day turnarounds are possible for any churn event shortly before the daily 12:00 UTC run, as the timeline shows.
  • The unsubscribe may have been from one group only (e.g. left Coaches, still interested in Students) — naive "any unsubscribe = never eligible" would over-correct. Today's schema can't tell, because the row is gone.

Possible directions (for discussion)

  1. Tombstone subscriptions — soft-delete/discards (discarded_at) or a state column, so history survives; eligibility then reads "never had an active subscription". Most robust; biggest change.
  2. Eligibility excludes members with a subscription.removed activity — cheap, but blind to all pre-2026-09-13 subscriptions, and depends on activity rows never being cleaned (nothing prunes activities today, but nothing guarantees that).
  3. Member-level flag set on unsubscribe (mirroring the received_student/coach_welcome_email pattern) — simple, but loses which group/chapter was left.

Happy to take whichever direction maintainers prefer; option 1 is the only one that also preserves the data for the followup email logic (which keys off member_email_deliveries.created_at and would otherwise send a followup to someone who already left).

Environment

  • app/services/signup_nudge_email_service.rb (never_subscribed) and app/controllers/subscriptions_controller.rb#destroy at a50b5214
  • Rails 8.1 / Ruby 4.0, verified against codebar_production_dump 2026-09-24
主要言語
Ruby
スター
104
フォーク
205
平均マージ
1日 6時間
マージ済み PR(30日)
70

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

codebar/planner のほかの issue

codebar/planner の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。