Problem
R1 publication verification exposed a PowerShell strict-mode failure when a filtered pipeline returned one object rather than an array. Accessing .Count on that scalar failed after the release and asset had already been created.
Required change
PowerShell operator scripts must normalize any zero-, one-, or many-result pipeline before performing cardinality checks.
Acceptance criteria
- Filtered results used for cardinality checks are always wrapped with
@(...) around the entire pipeline.
- Regression tests cover zero, one, and multiple matching records or assets.
- Strict mode remains enabled in tested scripts.
- A single matching asset verifies successfully.
- Zero or duplicate matching assets fail closed with precise messages.
- No test makes a provider request or mutates campaign evidence.
Scope
Audit all PowerShell scripts used for campaign closure, publication preparation, release creation, asset upload, and verification for the same scalar-versus-array assumption.
Problem
R1 publication verification exposed a PowerShell strict-mode failure when a filtered pipeline returned one object rather than an array. Accessing
.Counton that scalar failed after the release and asset had already been created.Required change
PowerShell operator scripts must normalize any zero-, one-, or many-result pipeline before performing cardinality checks.
Acceptance criteria
@(...)around the entire pipeline.Scope
Audit all PowerShell scripts used for campaign closure, publication preparation, release creation, asset upload, and verification for the same scalar-versus-array assumption.