Skip to content

dir-sim: a group's secondary SMTP proxies deliver to the group - #1483

Merged
AdaWorldAPI merged 3 commits into
mainfrom
ccr-0455e606-wmtsor
Oct 11, 2026
Merged

AdaWorldAPI merged 3 commits into
mainfrom
ccr-0455e606-wmtsor

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

What

Exchange delivers mail sent to any of a distribution group's SMTP proxies. dir-sim's address space read a group by its primary address only, so mail to a group's secondary proxy resolved to no one.

rows_over now adds each mail-enabled, observed group's secondary SMTP proxies to the Exchange address space. A mail-enabled group is one with a primary SMTP address, which is what View::is_mail_recipient checks. A group without one claims its proxies only in the provisioning plane, so a stale proxy cannot take an address away from a user who legitimately holds it:

  • Delivery: address_owner and address_recipient answer the group for a secondary proxy.
  • Validation: validate's address rules read the same rows, because Exchange refuses an address another object holds, whatever kind that object is.
  • Groups created in a version: such groups carry no secondary proxies (a Change sets none), so only observed groups contribute these rows.

provisioning_conflicts read group proxies in a loop of its own. That loop now lives in rows_over, so the delivery and provisioning planes share one definition of a group's claims. The provisioning results are unchanged.

This is a delivery-fidelity fix. The lookup does not grow to serve validation.

Behaviour change, pinned both ways

  • mail_to_a_groups_secondary_proxy_reaches_the_group (new): a group's secondary proxy is held by the group and delivers to it, and validation stays empty. Before the fix it failed with Ok(None).

  • a_groups_secondary_proxy_claims_its_address (re-pinned): a user and a group both carrying sales@x.test share the key. address_owner and address_recipient now return AddressConflict listing both holders, where this test used to pin the user as owner. This matches how dir-sim already treats every other shared key: no holder is chosen. The test comment records the old expectation.

  • a_non_mail_enabled_groups_proxy_is_only_a_provisioning_claim (new, after Codex P1): a group with no primary address has a stale proxy that a user also holds. The user owns and receives the address, and the provisioning conflict is still reported. Before the gate it failed with AddressConflict.

Disable run: with the new rows removed, both of the first two tests fail and nothing else does. With the mail-enabled gate forced open, only the third test fails.

Checks

cargo +1.99.0 fmt --check, clippy --all-targets -D warnings and cargo test (233 passed, 0 failed) pass on lance-graph-dir-sim. The supersession index is current.

Board: D-DSV-1 marked shipped (#1477, #1480); D-DSV-2 added.

Downstream: Stalwart's dir-sim backend and Spear call address_recipient, so a group's secondary address now resolves to the group's list there too. Stalwart's dir-sim CI builds against lance-graph main.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg


Generated by Claude Code

Exchange delivers mail sent to any of a distribution group's SMTP
proxies, but the address space read a group by its primary address only:
mail to a group's secondary proxy resolved to no one. rows_over now adds
each live, observed group's secondary SMTP proxies, so address_owner and
address_recipient answer the group, and validate's address rules see the
same rows (Exchange refuses an address another object holds).

provisioning_conflicts read the group proxies in a loop of its own; that
loop is now part of rows_over, so the two planes keep one definition of a
group's claims. The provisioning plane is otherwise unchanged.

Behaviour change, pinned both ways: mail_to_a_groups_secondary_proxy_
reaches_the_group (red before: Ok(None)); a_groups_secondary_proxy_
claims_its_address now expects an AddressConflict where it pinned the
user as owner, since the user and the group share the key.

Board: D-DSV-1 shipped (#1477, #1480); D-DSV-2 added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 11, 2026 10:52
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T10:54:26.014913Z 8dfd6f2 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Next included review available in 41 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 64 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 41a52adf-25eb-4938-889c-1d8e9e6fcc6e

📥 Commits

Reviewing files that changed from the base of the PR and between dff342c and f3dd6eb.


📒 Files selected for processing (3)
  • .claude/board/STATUS_BOARD.md
  • crates/lance-graph-dir-sim/src/validate.rs
  • crates/lance-graph-dir-sim/tests/provisioning.rs

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


Comment @coderabbitai help to get the list of available commands.

@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: 8dfd6f2d35

ℹ️ 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 crates/lance-graph-dir-sim/src/validate.rs Outdated
A group with no primary SMTP address is not mail-enabled
(View::is_mail_recipient), so it holds and receives at nothing in
Exchange. The previous commit added every live group's secondary proxies
to the Exchange address space, so a stale proxy on such a group took the
address away from a user who legitimately holds it (AddressConflict).

rows_over takes every_group_proxy: the Exchange rows (address_owner,
address_recipient, validate) keep a group's secondary proxies only when
the group has a primary SMTP address; the provisioning plane keeps every
present group's, since Entra keeps proxy addresses unique whatever the
object.

Test: a_non_mail_enabled_groups_proxy_is_only_a_provisioning_claim (red
before: AddressConflict where the user owns and receives the address;
the provisioning conflict is still reported).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
@AdaWorldAPI
AdaWorldAPI merged commit ac3c8fb into main Oct 11, 2026
11 checks passed
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