Skip to content

Changed member welcome email job to run based on config#16

Open
tomerqodo wants to merge 6 commits intoaugment_combined_20260121_augment_sentry_coderabbit_1_base_changed_member_welcome_email_job_to_run_based_on_config_pr246from
augment_combined_20260121_augment_sentry_coderabbit_1_head_changed_member_welcome_email_job_to_run_based_on_config_pr246
Open

Changed member welcome email job to run based on config#16
tomerqodo wants to merge 6 commits intoaugment_combined_20260121_augment_sentry_coderabbit_1_base_changed_member_welcome_email_job_to_run_based_on_config_pr246from
augment_combined_20260121_augment_sentry_coderabbit_1_head_changed_member_welcome_email_job_to_run_based_on_config_pr246

Conversation

@tomerqodo
Copy link

Benchmark PR from qodo-benchmark#246

@augmentcode
Copy link

augmentcode bot commented Jan 21, 2026

🤖 Augment PR Summary

Summary: Move member welcome-email enablement from a Labs flag to a config-driven “test inbox” setting.

Changes:

  • Gate outbox creation and welcome-email processing on memberWelcomeEmailTestInbox from shared config
  • Update the welcome-email job scheduler to check config rather than Labs
  • Refactor integration/unit tests to set/restore config instead of stubbing Labs

Technical Notes: Behavior is now controlled by the presence of a configured inbox value.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

}

if (!hasScheduled.processOutbox && !process.env.NODE_ENV.startsWith('test')) {
if (hasScheduled.processOutbox && !process.env.NODE_ENV.startsWith('test')) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hasScheduled.processOutbox looks inverted here: since it starts as false and is only set to true inside this block, this condition prevents the job from ever being scheduled. Was this meant to be !hasScheduled.processOutbox to ensure it schedules once?

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

if (this._labsService.isSet('welcomeEmails') && WELCOME_EMAIL_SOURCES.includes(source)) {
var member;
const welcomeEmailConfig = config.get('memberWelcomeEmailTestInbox');
if (welcomeEmailConfig || WELCOME_EMAIL_SOURCES.includes(source)) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This if (welcomeEmailConfig || WELCOME_EMAIL_SOURCES.includes(source)) will create an outbox entry even when the config is unset (for allowed sources), and also for all sources when the config is set. That seems to contradict the tests below which expect no outbox entry when config is not set and for imported/admin contexts.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants