The Analyze task in the repository's own build (psakeFile.ps1 line 19, Invoke-ScriptAnalyzer -Path $settings.ModuleOutDir -Recurse ...) intermittently crashes on the windows-latest CI leg with an internal PSScriptAnalyzer exception, failing the job before Pester ever runs. Re-running the job succeeds without any change.
Occurrences so far
| Date |
Run |
Exception |
Diff under test |
| 2026-07-07 |
28897944004 (PR #133) |
Object reference not set to an instance of an object. |
Changelog text only |
| 2026-07-09 |
29055849143 (PR #135) |
Value cannot be null. (Parameter 'name') |
Files under tests/ only |
Why it is a flake, not a regression
- Both failing commits could not have influenced the Analyze task: it scans only the built module output (
ModuleOutDir), and neither diff touched module source
- The identical merge commits passed Analyze on ubuntu and macOS in the same runs
- Both failures disappeared on re-run with no code change
- The two exceptions are different internal PSScriptAnalyzer errors at the same call site, which points at a non-deterministic crash inside PSScriptAnalyzer 1.25.0 (or its interaction with the windows-latest runner image) rather than at anything in this repository
Possible mitigations (not yet decided)
- Add a retry around
Invoke-ScriptAnalyzer in the Analyze task (crude but effective for a known-flaky third-party call)
- Try a newer PSScriptAnalyzer release when one ships, in case the crash is fixed upstream
- Report upstream to PSScriptAnalyzer with the two stack signatures if it keeps recurring
Filed to track recurrence; if it bites again, that is three data points and worth acting on rather than re-running.
The
Analyzetask in the repository's own build (psakeFile.ps1line 19,Invoke-ScriptAnalyzer -Path $settings.ModuleOutDir -Recurse ...) intermittently crashes on the windows-latest CI leg with an internal PSScriptAnalyzer exception, failing the job before Pester ever runs. Re-running the job succeeds without any change.Occurrences so far
Object reference not set to an instance of an object.Value cannot be null. (Parameter 'name')tests/onlyWhy it is a flake, not a regression
ModuleOutDir), and neither diff touched module sourcePossible mitigations (not yet decided)
Invoke-ScriptAnalyzerin the Analyze task (crude but effective for a known-flaky third-party call)Filed to track recurrence; if it bites again, that is three data points and worth acting on rather than re-running.