feat(simulate): record build and deploy callbacks as stubbed effects with gating - #360
Merged
Merged
Conversation
…with gating Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.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 simulator validates cascade's orchestration, not the user's build and deploy scripts, but nothing made that boundary explicit or let a user preview gating without running anything.
This adds a deploy-stub model that records each manifest build and deploy callback as a stubbed effect with a configurable outcome (default success). Per-callback failure or skipped outcomes are injectable programmatically via WithDeployResults and on the CLI via a repeatable --deploy-result name=success|failure|skipped flag. A failed deploy gates the simulated finalize, mirroring the real gateOnDeployResults rules. The boundary is documented at the seam and surfaced as a note in cascade simulate output. Additive only: no schema or generator change, and a manifest with no callbacks renders unchanged.
Verification: go build, go test, and golangci-lint all green; new unit tests cover the model, the default-success path, and the failure-gated finalize.
Closes #313.