fix(generate): close four silent generated-output defects - #634
Merged
Conversation
… rollback, and deploy gating Each emitted valid YAML that did the wrong thing, so actionlint alone did not catch it. Regression tests assert the emitted output and red before the fix. - promote: matrix deploys now thread the per-promotion environment and sha to their callback (as orchestrate does) instead of deploying to an empty environment while the job name references a matrix key that was never set. - rollback: the repository_dispatch dry-run guard matches both a JSON boolean true (client_payload) and the string 'true' (workflow_dispatch); a bare "!= 'true'" read a boolean true as not-a-dry-run and ran real deploys. - generate: a dependent deploy is gated on the base deploy's effective result (base or any retry shim), reusing the retry-aware helper, and no longer emits the dependency clause twice. - promote: a dry-run promote no longer creates a real GitHub Deployment, and the terminal status counts a skipped deploy as success and includes the prod job. Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
… sha The GB2 fix threaded sha only when the callback declares it, but declared-input detection read the raw workflow path (baseDir/deploy.yaml) while the emitted uses: line and the orchestrate generator resolve a bare filename to .github/workflows/deploy.yaml. A manifest referencing the callback by bare name therefore failed detection silently, so deployHasInput(sha) was false and the matrix with: block dropped sha while still threading environment. discoverDeployInputs now resolves through normalizeWorkflowPath (and skips cross-repo refs), matching the uses: emission, so a canonically-located callback is found and its declared sha is threaded. The regression tests reference the callback by bare filename, the way the e2e scenarios do, so they red when detection drops sha instead of passing against a fully-qualified shortcut. Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
joshua-temple
force-pushed
the
fix/pass10-silent-emitted-output
branch
from
July 18, 2026 09:05
4e5e06e to
c834460
Compare
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.
Four defects that each emit valid YAML doing the wrong thing (actionlint alone will not catch them). Each has a generation-assertion test that reds on the pre-fix output and greens after. Verified by generating and reading the emitted YAML.
GB2 (blocker) - promote matrix deploys dropped environment/sha
A matrix deploy (a deploy declaring inputs) emitted a
with:block carrying only declared manifest inputs, while its job name referenced${{ matrix.environment }}- a key the matrix builder never set. The deploy ran with an empty environment.Before:
After:
The matrix builder now injects
{environment, sha}onto every entry; environment is passed unconditionally (orchestrate's contract), sha only when the callback declares it, and neither when the manifest already wires it as an explicit input.GM4 (major) - rollback repository_dispatch dry_run truthiness
(inputs.dry_run || client_payload.dry_run) != 'true'compared a JSON booleantrue(a natural{"dry_run": true}payload) against a string; GitHub Actions coerces numerically, so the guard read true as not-a-dry-run and a dry-run rollback ran real deploys and wrote rolled-back state.Before:
... != 'true' && (...)After:
(...) != true && (...) != 'true' && (...)- matches both the boolean and the string. Without the trigger, output is byte-identical.GM5 (major) - dependent deploys judged the immutable base result
deploy-apidepending ondeploy-webgated onneeds.deploy-web.result == 'success'(and emitted it twice). A GHA job result is immutable, so a base deploy failing-then-rescued by a retry shim left the dependent skipped.Before:
After (retries: 2):
Reuses #627's
effectiveSuccessCond(not duplicated); the duplicated clause is removed. N=0 collapses to the single bare clause.GM6 (major) - promote native Deployment had no dry_run guard
A dry-run promote created a real GitHub Deployment, and the status expression counted a legitimately skipped deploy as failure and omitted the prod job.
Before:
After:
Verification
go build/test/vet/-raceandgolangci-lintclean;cascade verify --own-repono drift.