Skip to content

Repair-TestEnvironment: put back what verification found missing - #46

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

fadwen merged 2 commits into
mainfrom
feat/repair-environment

Conversation

@fadwen

@fadwen fadwen commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Stacked on #45.

What

Repair-TestEnvironment runs the verifier against the active provider, works out from the failed checks which seed steps own the missing objects, re-runs those steps alone through the provider's own orchestrator (everything else passed to -Skip), and verifies again. Every seed step is idempotent, so what exists is reused; a name that came back wrong is repaired where the provider's user step updates an existing user.

Each provider declares $script:<Provider>RepairStep in its Initialize.ps1: Step, check name to seed step, and Always, the steps every repair needs around it (the units and the containment pass on Entra, the OU structure on AD). Memberships map to the step that applies them: groups on Entra, Okta and AD; users on Authentik, FreeIPA and PingOne.

What is there that the data does not describe is reported and left alone; removing an object the module owns stays teardown's job. -WhatIf names the steps and runs none.

Tests

Tests/Unit/Public/Repair-TestEnvironment.Tests.ps1: nothing runs when every check passes; only the owning steps run, everything else skipped by name; -WhatIf names and runs none; an unexpected object is reported and left; and a contract that reads each verifier's source and fails a map that does not cover every judged check, with steps the orchestrator knows.

Gates

Unit suite 2,715 passed shuffled on 7 (1 skipped) and 2,716 on 5.1, 0 failed. Analyzer clean. MAML rebuilt. Rehearsal passes. Docs page, index, README, about topic, CHANGELOG, Tests/README and a CLAUDE.md paragraph. A live repair on the PingOne sandbox follows in a docs commit.

…t verification found missing

Runs the verifier, maps each failed check to the seed step that owns it through the
$script:<Provider>RepairStep map every provider declares in its Initialize.ps1, re-runs those
steps alone through the provider's orchestrator with everything else passed to -Skip, and
verifies again. The steps every repair needs run alongside: the units and containment on
Entra, the OU structure on AD. What the data does not describe is reported and left for
teardown; -WhatIf names the steps and runs none.

The suite reads each verifier's source and fails a map that does not cover every judged
check, so a new check has to say which step puts it back.
Base automatically changed from feat/compare-environment to main September 14, 2026 18:41
@fadwen
fadwen merged commit f75e89b into main Sep 14, 2026
@fadwen
fadwen deleted the feat/repair-environment branch September 14, 2026 18:41
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