P0-1: Reject empty/whitespace ScriptBody in RunScriptActionHandler
Summary
-
Real production risk: pre-fix, a misconfigured RunScript step with blank ScriptBody silently passed — the handler defaulted to
string.Empty, the agent ranset -eand exited 0, the step marked success, downstream steps proceeded with stale/missing output variables. Operators reported "deploy says green but nothing happened." -
Fix:
DescribeIntentAsyncnow throwsDeploymentValidationExceptionwith an actionable message naming the action, step, and property when ScriptBody is null / empty / whitespace-only. -
Planner unaffected:
DeploymentPlanner.BuildStubIntent(line 367) intentionally builds an empty-body intent for capability validation; that path doesn't go throughDescribeIntentAsync.
Test plan
-
Unit (RunScriptActionHandlerDescribeIntentTests): 22/22 — including new theory DescribeIntentAsync_BlankScriptBody_Throwsover""," ","\t","\n", mixed -
Pinned message contract: exception MUST contain action name + step name + ScriptBodyproperty name (so operators can find the offending step in the UI) -
Full unit suite: 5114/5114 pass -
Replaced the buggy-pinning _MissingScriptBody_EmitsEmptyStringtest that codified the silent-pass behaviour -
Verified _NonBlankWithLeadingWhitespace_DoesNotThrow—" echo hi"still valid, only fully-blank fails
Rollback
Single-file revert; no schema or DI surface changed. Existing deploys with empty ScriptBody will now fail-fast at execution rather than silently no-op — this IS the intended behaviour change. Operators with such deploys will see a clear error message and a fix-it path. Document this as a behaviour change in 1.6.6 release notes.