fix(powershell): retry every RULE_ERROR, not just NullRef/InvalidOp - #41
Merged
Conversation
The per-file PSScriptAnalyzer child only retried the #1708 runspace race when it
surfaced as NullReferenceException/InvalidOperationException, but the same race
also throws CommandNotFoundException ("The term 'Get-Command' is not recognized")
when the crashed runspace loses its core cmdlets - which then failed the lane
outright with no retry. A rule throwing a RULE_ERROR is always a tooling crash,
never a real finding (findings travel on a separate stream), so classify any
RULE_ERROR* as transient regardless of exception type. Non-rule errors (parse,
bad settings) keep a different FullyQualifiedErrorId and still fail fast.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
kyle-sexton
added a commit
to melodic-software/standards
that referenced
this pull request
Jun 26, 2026
…fix) (#44) Bumps the pinned `melodic-software/ci-workflows` SHA to `b6431a1` to pick up melodic-software/ci-workflows#41 — the PSScriptAnalyzer runner now retries any `RULE_ERROR` crash, covering the `CommandNotFoundException` ("Get-Command is not recognized") variant of the #1708 race that intermittently failed the `powershell` lane. No rules disabled; full SCA; Linux runners. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
kyle-sexton
added a commit
to melodic-software/claude-code-plugins
that referenced
this pull request
Jun 26, 2026
…fix) (#10) Bumps the pinned `melodic-software/ci-workflows` SHA to `b6431a1` to pick up melodic-software/ci-workflows#41 — the PSScriptAnalyzer runner now retries any `RULE_ERROR` crash, covering the `CommandNotFoundException` ("Get-Command is not recognized") variant of the #1708 race that intermittently failed the `powershell` lane. No rules disabled; full SCA; Linux runners. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The per-file PSScriptAnalyzer child (
Invoke-Pssa.ps1) retries the known #1708CommandInfoCacherunspace-affinity race, but only when it surfaces asNullReferenceException/InvalidOperationException. The same race also throwsCommandNotFoundException— "The term 'Get-Command' is not recognized" — when the crashed helper runspace comes up without its core cmdlets. That variant was classified as a real failure (no retry), so thepowershelllane failed outright and only cleared on a manual re-run.A rule throwing a
RULE_ERRORis always a tooling crash, never a real finding (findings travel on the success stream). So this keys the transient classification onFullyQualifiedErrorId -like 'RULE_ERROR*'regardless of exception type, covering every manifestation of the race. Non-rule errors (parse errors, bad settings) carry a different id and still fail fast; a genuinely deterministic rule crash still hard-fails after the retry budget..NOTESupdated to match.Observed in
kyle-sexton/provisioningCI: thepowershelllane failed twice with "Get-Command is not recognized" on a large test file, then passed on re-run — the signature of this exact race.🤖 Generated with Claude Code