fix: close workflow issue audit gaps#814
Merged
Merged
Conversation
This was referenced Jun 1, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR closes workflow issue audit gaps by aligning GitLab CI generation behavior with other CI renderers and by making wfctl validate catch a common YAML parsing pitfall for step.conditional routes before runtime.
Changes:
- Add a GitLab apply-job plan guard that fails the job on destructive (replace/destroy) plans when
PlanGuardis enabled, and add per-phase secret-variable scoping forphase.Scoped. - Add a
wfctl validatepre-check that rejectsstep.conditional.config.routeskeys parsed by YAML as non-strings (e.g.,true,1,null) and suggests quoting. - Add regression tests covering GitLab plan guard + scoped secrets behavior and the new
wfctl validaterejection case.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| cmd/wfctl/validate.go | Adds a YAML-node scan to reject non-string step.conditional.routes keys with a quote-it hint. |
| cmd/wfctl/main_test.go | Adds a regression test asserting wfctl validate fails on boolean-looking conditional route keys. |
| cigen/render_gitlab.go | Adds per-phase variables scoping for secrets and a PlanGuard gate in apply jobs. |
| cigen/render_gitlab_test.go | Adds tests for GitLab plan guard behavior and scoped-phase secret isolation; tightens the “no redundant global vars” assertion to the global block. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
⏱ Benchmark Results✅ No significant performance regressions detected. benchstat comparison (baseline → PR)
|
intel352
added a commit
that referenced
this pull request
Jun 1, 2026
* chore: clean repository layout guidance * fix: build example runner package only * fix: close workflow issue audit gaps (#814) * fix: close workflow issue audit gaps * fix: return conditional route inspection errors * fix: address ci review gaps * fix: inspect aliased conditional routes * chore: clean repository layout guidance * fix: build example runner package only * fix: scan imports without root pipelines
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.
Summary
Closes #812.
Closes #809.
phase.Scoped, so scoped phases do not reference the plan-wide union.wfctl validaterejectstep.conditional.config.routeskeys that YAML parses as booleans/numbers/null, with a quote-it hint.Verification
GOWORK=off go test ./cigen -count=1GOWORK=off go test ./cmd/wfctl -count=1Regression Proof
With the production fixes reverted, leaving the tests in place:
With the fixes restored: