Skip to content

Compare-TestEnvironment: match the people two connected providers hold - #45

Merged
fadwen merged 2 commits into
mainfrom
feat/compare-environment
Sep 14, 2026
Merged

fadwen merged 2 commits into
mainfrom
feat/compare-environment

Conversation

@fadwen

@fadwen fadwen commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Follows #44, now merged.

What

Compare-TestEnvironment -Provider A, B reads the seeded people from two providers connected in the same session and reports how they line up, the way a hybrid identity match would see them.

  • Matching. By login key first: the login with the provider's additions stripped, so jnino is jnino in every provider that keeps the shared logins (ZZ-TEST-jnino@… on Entra, zz-test-jnino on PingOne, jnino@… on Okta). Then by display name among what is left, folded for case and Unicode normalisation, because the Active Directory data logs its people in as first name and initial and agrees with the others only on the names. What matches in neither way is reported as only on one side, and that is not a fault: the providers hold deliberately different populations.
  • Judging. For every matched pair the names are compared by codepoint, never with -eq: display names where both providers keep one, otherwise given name and surname where both keep those, never a stored display name against one composed from parts (PingOne stores no display name, and a composed one would put the family name last for the Han and Japanese people). A decomposed José in one directory and a precomposed one in the other is found by the folded match and reported as differing. That is the one thing the command judges. The enabled state is compared and reported without a verdict, because the seed hangs different states on the same person on purpose.
  • Shape. Get-<Provider>IdentitySnapshot on each provider reduces the users teardown would find to a TestIdentity (Core/New-TestIdentity.ps1); Core/Compare-TestIdentitySnapshot.ps1 does the matching and judging on identities alone, so it is tested without a directory. A contract test holds every provider folder on disk to having a snapshot reader. Get-EntraSeededObject now also selects givenName and surname, so a tenant compares with a PingOne environment on the parts.

Live

PingOne and Entra seeded and compared both ways from one session: 329 matched by key, none by name, the one PingOne-only account named (pmorel), no name differing, then both torn down clean (the three Entra role definitions kept by design, as before). See the changelog for the parts-compared numbers from the rerun after the rule was widened.

Gates

Unit suite 2,700 passed shuffled on 7 (1 skipped) and 2,701 on 5.1, 0 failed, before the parts rule; the targeted suites and the contract suite after it. Analyzer clean. MAML rebuilt. Rehearsal passes. Docs page, index, README, about topic, CHANGELOG, Tests/README and a CLAUDE.md paragraph.

…ers hold

Reads the seeded people from two providers connected in the same session, matches them by
login key - the login with the provider's additions stripped, so jnino is jnino everywhere
the shared logins are kept - and then by display name folded for case and Unicode
normalisation, because the AD data logs its people in as first name and initial. What matches
in neither way is reported as only on one side and is not a fault. For every matched pair the
names are compared by codepoint: display names where both providers keep one, given name and
surname where both keep those, never a stored display name against a composed one. The
enabled state is reported without a verdict.

Each provider gets Get-<Provider>IdentitySnapshot, reducing the users teardown would find to
a TestIdentity; Compare-TestIdentitySnapshot does the matching on identities alone. A contract
test holds every provider folder to having a snapshot reader. Get-EntraSeededObject also
selects givenName and surname so a tenant compares with a PingOne environment on the parts.
@fadwen
fadwen merged commit 9fd7f99 into main Sep 14, 2026
2 of 4 checks passed
@fadwen
fadwen deleted the feat/compare-environment branch September 14, 2026 18:41
fadwen added a commit that referenced this pull request Sep 14, 2026
… passes

The help gate requires three examples from every exported command and the
Compare page shipped with two, which failed the gate on main once #45 merged.
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