Skip to content

test(mail): characterize production email contracts - #2526

Open
niemyjski wants to merge 6 commits into
mainfrom
feature/email-template-contract-tests
Open

test(mail): characterize production email contracts#2526
niemyjski wants to merge 6 commits into
mainfrom
feature/email-template-contract-tests

Conversation

@niemyjski

@niemyjski niemyjski commented Aug 25, 2026

Copy link
Copy Markdown
Member

Summary

  • restructures mailer tests around Arrange, Act, Assert and three-part test names
  • characterizes all nine production email templates without changing production code or output
  • validates rendered content, every extracted href and JSON-LD action, and current application routes
  • asserts external links by host allowlist (not full URLs) so marketing/wiki URL changes do not break characterization

Verification

  • dotnet test tests/Exceptionless.Tests/Exceptionless.Tests.csproj -- --filter-class Exceptionless.Tests.Mail.MailerTests (26 passed)
  • git diff --check

Post-Deploy Monitoring & Validation

No additional operational monitoring is required because this PR changes tests only; production email code and rendered output are unchanged.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 18157c9300

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/Exceptionless.Tests/Mail/MailerTests.cs Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d64336d454

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/Exceptionless.Tests/Mail/MailerTests.cs Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5b6a0805ea

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/Exceptionless.Tests/Mail/MailerTests.cs Outdated
Comment thread tests/Exceptionless.Tests/Mail/MailerTests.cs Outdated
@niemyjski niemyjski self-assigned this Aug 27, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2c4d518c2d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


private static string BuildMailtoHref(string emailAddress, string? body)
{
string href = $"mailto:{Uri.EscapeDataString(emailAddress)}";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the @ delimiter in mailto links

For every event notice containing a user email address, Uri.EscapeDataString(emailAddress) escapes the structural @ as %40, producing links such as mailto:victim%40example.com. A mailto recipient is an addr-spec whose separator must remain literal, and clients that do not decode the entire scheme-specific address before parsing can reject it or treat it as an invalid recipient. Encode unsafe address components without escaping the @ delimiter, while continuing to encode the query-body value.

Useful? React with 👍 / 👎.

@github-actions

Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Complexity Health
Exceptionless.Insulation 37% 35% 286
Exceptionless.Core 76% 67% 10273
Exceptionless.Web 85% 69% 7974
Exceptionless.AppHost 38% 41% 147
Summary 78% (25383 / 32364) 68% (11955 / 17704) 18680

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.

1 participant