You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Gate complexity and test strength with PSComplexity and PSMutant - #119
Measures what the build did not: whether a function has become too
tangled to reason about, and whether a test would notice a fault.
Pin Pester 6.2.0, PSComplexity 0.5.1 and PSMutant 0.5.0 exactly, with
InstallModules.ps1 as the only module list (build.ps1 now calls it).
Complexity: 15 cyclomatic / 15 cognitive per unit, with the 32 units
already over that recorded in complexity-baseline.json (ratchets down).
Mutation: psmutant.config.json maps each source file to the tests that
name its functions, generated and -Check'ed by
Build/Update-MutationConfig.ps1. Floor 75% from the first measurement.
Pull request: QualityChanged judges only the changed files, on the pwsh
leg, after the tests; skips itself when nothing it measures changed.
Weekly: quality-weekly.yml runs both gates on the whole tree and files
(or updates, or closes) a bug per gate.
Measures what the build did not: whether a function has become too
tangled to reason about, and whether a test would notice a fault.
- Pin Pester 6.2.0, PSComplexity 0.5.1 and PSMutant 0.5.0 exactly, with
InstallModules.ps1 as the only module list (build.ps1 now calls it).
- Complexity: 15 cyclomatic / 15 cognitive per unit, with the 32 units
already over that recorded in complexity-baseline.json (ratchets down).
- Mutation: psmutant.config.json maps each source file to the tests that
name its functions, generated and -Check'ed by
Build/Update-MutationConfig.ps1. Floor 75% from the first measurement.
- Pull request: QualityChanged judges only the changed files, on the pwsh
leg, after the tests; skips itself when nothing it measures changed.
- Weekly: quality-weekly.yml runs both gates on the whole tree and files
(or updates, or closes) a bug per gate.
Refs #91
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
It is large CI-gating infrastructure the author notes was never validated on Windows and that carries a confirmed step-summary bug plus several stated open risks, warranting human review.
This PR adds two new CI quality gates to the OmadaWeb.PS PowerShell module (refs #91): complexity (via PSComplexity, with a ratcheting complexity-baseline.json) and test strength / mutation testing (via PSMutant, driven by a generated psmutant.config.json). On a pull request both gates run only on changed files on the pwsh leg; a weekly workflow runs both across the whole tree and files/updates/closes a quality-gate bug per gate. Module installation is consolidated into Build/InstallModules.ps1 with Pester 6.2.0, PSComplexity 0.5.1 and PSMutant 0.5.0 pinned exactly.
Changes:
Consolidate the build's module list into InstallModules.ps1 (pinned versions) and have build.ps1 call it.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
It is a large CI/build change that gates merges on external tools (PSComplexity/PSMutant) whose runtime API and report contracts cannot be verified here, and the author lists open risks (not yet run on Windows, source-mode mutation baseline), so human validation is warranted.
This step-summary/bug-report detail string reads "Source files no test names", which is missing the relative pronoun used elsewhere. The same phrasing was corrected in CONTRIBUTING.md (line 97: "Source files that no test names are listed under _untested"), so this instance is now inconsistent with it. Consider adding "that" for consistency.
The exponential-backoff test measured the gap between attempts, which
holds everything else that ran in between as well. On the Windows
PowerShell leg of PR validation that overhead was about 0.3s on the first
retry, so the first gap (1.32s) came out longer than the second (1.18s)
although the requested delays - [0.5s, 1.0s] and [1.0s, 2.0s] - were in
order. The test now captures what Invoke-OmadaRetryableRequest asks
Start-Sleep for and checks both ranges, as the neighbouring overflow test
already does. It still fails when the backoff stops being exponential,
and no longer sleeps three seconds.
Refs #91
copilot-pull-request-reviewer failed on 0560aa3, and the failure is not caused by this PR. The job hit Copilot's weekly rate limit (HTTP 429, "weekly rate limit … reset on October 12, 2026") before it reviewed anything. No fix exists on this side. The review can be re-requested once the limit resets. Re-running before then would hit the same limit, so the job has not been re-run. PR Validation on 0560aa3 is still running and is tracked separately.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Measures what the build did not: whether a function has become too
tangled to reason about, and whether a test would notice a fault.
InstallModules.ps1 as the only module list (build.ps1 now calls it).
already over that recorded in complexity-baseline.json (ratchets down).
name its functions, generated and -Check'ed by
Build/Update-MutationConfig.ps1. Floor 75% from the first measurement.
leg, after the tests; skips itself when nothing it measures changed.
(or updates, or closes) a bug per gate.
Refs #91