fix(sync): coerce absent dry-run flag to bool in task SG ingress step#93
Merged
Conversation
Dropping the `--dry-run` CLI option (aafd817) removed the `dry-run` key from the apply pass options entirely. The plan pass still injects it as `true`, but on apply `Arr::get($options, 'dry-run')` now returns `null` instead of `false`. Every sibling step casts `(bool)`; this one fed the raw nullable straight into a `bool`-typed param, so `sync` fatal'd with a TypeError mid-apply at the task security group step. Cast at the call site to restore the old `null -> false` behaviour, plus a regression test covering the apply pass (no `dry-run` key), the already-authorised no-op, the manifest custom-managed branch, and the dry-run no-write. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Hey, I made a thing! 🥳
Great! Now please answer the following questions to help out your assigned reviewer:
What problems are you solving?
yolo sync <env>fatal'd mid-apply with aTypeErrorat the task security group step on a green-field app (hit on the convictrecords CON-538 cutover).--dry-runCLI option (aafd817) removed thedry-runkey from the options array entirely. The plan pass still injectsdry-run => true, but the apply pass now carries no key at all, soArr::get($options, 'dry-run')returnsnullinstead of the oldfalse. Every sibling step casts(bool);SyncTaskSecurityGroupStepwas the lone outlier feeding the raw nullable straight into abool-typed param.(bool)cast at the call site — restores thenull → falsebehaviour and matches the prevailing idiom across the sync steps.SyncTaskSecurityGroupStepTestcovering the apply pass (nodry-runkey — the regression), the already-authorised no-op, the manifest custom-managed branch, and the dry-run no-write.Is there anything the reviewer needs to know to deploy this?
dry-run => true, so previews always rendered fine) — which is why the crash hit after the confirm gate, not before. Nothing was written before the gate.dry-runreference insrc/: this was the only strict-typed site receiving the raw nullable, so there's no second landmine from aafd817.🤖 Generated with Claude Code