Skip to content

fix(config,simulate): reject output-key collisions and gate simulated rollback on deploy results#597

Merged
joshua-temple merged 2 commits into
mainfrom
fix/outputkey-and-simulate-gate
Jul 16, 2026
Merged

fix(config,simulate): reject output-key collisions and gate simulated rollback on deploy results#597
joshua-temple merged 2 commits into
mainfrom
fix/outputkey-and-simulate-gate

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Two correctness fixes.

  • config: OutputKey() collapses '-' to '' but validation enforced uniqueness on the raw name, so two names differing only by '-' vs '' collapsed to the same emitted GHA output key while passing validation (one silently shadowed the other). validateOutputKeyCollisions now rejects such collisions (builds/deploys/environments), naming both entries and the shared key.
  • simulate: the simulate rollback Apply path skipped the deploy-result gate the real rollback finalize enforces, so it modeled a clean revert where the real system would refuse. Simulate now applies the same gateOnDeployResults (with --deployable scoping); a blocked rollback models a gated no-write, not a revert.

Verification: build/-race/lint green, full suite; red-then-green tests for the three collision cases and the gate block/proceed cases. No generated output changed (no shipped manifest collides).

…llide

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
(cherry picked from commit 8bd2ab4c99da02dc4643891ed238e33792548d96)
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
(cherry picked from commit f57dd276ad35905a3c1b236e268e9cff66e050de)
@joshua-temple joshua-temple merged commit a45c979 into main Jul 16, 2026
21 checks passed
@joshua-temple joshua-temple deleted the fix/outputkey-and-simulate-gate branch July 16, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant