Skip to content

dir-sim: a provisioning plane separate from delivery - #1477

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

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

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

Decision 1(c): the observed address claims, provisioning conflicts and delivery resolution are kept as three separate questions. This PR adds the provisioning one without touching delivery.

  • validate::provisioning_conflicts(view) reports every key claimed by more than one present directory object: each present user's UPN, primary and secondary SMTP and routing address, and each live group's primary SMTP, whatever the object's enabled or recipient state. Entra keeps UPN and proxyAddresses unique tenant-wide, so a disabled account or a mailbox-less account's leftover SMTP still claims its value.
  • Claimants are listed, not judged: Entra quarantines the duplicate on the object whose sync brought it, and the simulator observes no sync order.
  • address_owner, address_recipient and validate are unchanged. address_rows becomes rows_over(owners, mail_owners) and the delivery path passes the same planes it computed before.
  • Fidelity limit, recorded in the docs: contacts, public folders and other object kinds also claim proxy addresses in a real tenant and are not observed.

Tests

tests/provisioning.rs:

  • a leftover address on a non-mail-enabled account conflicts in provisioning, while the owner and recipient stay the group and validate reports no AddressConflict;
  • a disabled account's UPN is still claimed;
  • distinct claims, and one object claiming one key under two roles, report nothing.

Red against an empty stub, green after. Disable runs: feeding the owner planes instead of the present plane turns two tests red; dropping the distinct-claimant filter turns all three red.

cargo test -p lance-graph-dir-sim --all-features green; clippy --all-targets --all-features -D warnings clean.

Board: STATUS_BOARD.md gains D-DSV-1; D-DSP-0/1/3 marked shipped in #1473.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg


Generated by Claude Code

validate::provisioning_conflicts reports every key claimed by more than
one present directory object: each present user's UPN, primary and
secondary SMTP and routing address, and each live group's primary SMTP,
whatever the object's enabled or recipient state. Entra keeps UPN and
proxyAddresses unique across the whole tenant, so a disabled account or
a mailbox-less account's leftover SMTP claims its value too.

It is a separate plane: address_owner, address_recipient and validate
read the owner planes as before, so a provisioning conflict changes
neither who holds an address nor where mail to it is delivered.
address_rows becomes rows_over(owners, mail_owners); the delivery call
passes the same planes it computed before.

The claimants are listed, not judged: Entra quarantines the duplicate on
the object whose sync brought it, and the simulator observes no sync
order. Contacts, public folders and other object kinds also claim proxy
addresses in a real tenant and are not observed; recorded as a fidelity
limit in the function's docs.

tests/provisioning.rs: a leftover address conflicts in provisioning and
leaves owner/recipient and validate unchanged; a disabled account's UPN
is still claimed; distinct claims and one object under two roles are
silent. Red against an empty stub, green after.

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 09:18
@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-11T09:23:40.344557Z a42379a 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

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 573cf4db-e07b-4eb3-b258-e42712e02fba

📥 Commits

Reviewing files that changed from the base of the PR and between 5a9e8f4 and a42379a.


📒 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

 ____________________________________________
< 99 little bugs in the code... I filed 100. >
 --------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

  • 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.

@AdaWorldAPI
AdaWorldAPI merged commit c6cf39b into main Oct 11, 2026
10 of 11 checks passed

@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: a42379a2c8

ℹ️ 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
AdaWorldAPI pushed a commit that referenced this pull request Oct 11, 2026
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
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