Randomize notification email markers behind a feature flag

What does this MR do and why?

Use a random hidden footer marker when the default-off, project-scoped randomize_notification_email_marker flag is enabled. This prevents same-second marker collisions between notifications for different recipients. Disabling the flag preserves timestamps.

References

Closes #630361 (closed)

Rollout: #630387 (closed)

Screenshots or screen recordings

In a controlled Gmail test, repeated markers caused the second notification to collapse; random markers kept it visible. Visible HTML is unchanged.

test email A test email B (random markers)
image image

How to set up and validate locally

bundle exec rspec spec/mailers/emails/merge_requests_spec.rb --format documentation

117 examples pass. The frozen-time regression failed before the fix and passes afterward. Both flag states are covered.

MR acceptance checklist

Acceptance checklist

  • Mailer specs, RuboCop, and Haml lint pass.
  • Local independent review completed.
  • Changelog omitted: change is behind a default-off flag.

Merge request reports

Loading
Loading