Skip to content

fix(e2e): repair two reusable-callback scenario regressions surfaced by #162#163

Merged
joshua-temple merged 2 commits into
mainfrom
fix/inline-removal-scenario-regressions
Jun 14, 2026
Merged

fix(e2e): repair two reusable-callback scenario regressions surfaced by #162#163
joshua-temple merged 2 commits into
mainfrom
fix/inline-removal-scenario-regressions

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Problem

PR #161 removed the inline run: callback emission path and converted two e2e scenarios to reusable workflows, but staged the referenced workflow bodies only via a step's commit.files, which lands AFTER workflow generation runs at scenario setup. PR #162 narrowed the transient classifier, surfacing both regressions deterministically:

  • Rollback leaves trunk state unchanged when the deploy fails: step 7 "expected rollback to fail but it succeeded". The failing deploy was keyed on $GITHUB_WORKFLOW matching Rollback*, but inside a reusable workflow_call callback $GITHUB_WORKFLOW is the callee's own name (on act and on real GitHub), never the caller's, so the re-deploy never failed.
  • Validate Callback Gate: generation failed reading validate.yaml (no such file), because the harness seeds callback stubs only for builds/deploys/publish/changelog, never for config.validate.workflow, and the inline validate.yaml arrived too late via a step commit.

Fix (test-infra only; no product change)

  • Harness seeds a workflow_call stub for config.validate.workflow before generation, mirroring the changelog stub clause.
  • New setup_workflows map on MultiStepScenario seeds scenario-supplied callback bodies into the setup commit before generation (overriding the generic stub). The failing rollback deploy moves there so it is present at generation time.
  • The rollback re-deploy now fails via a CASCADE_E2E_ROLLBACK env the harness sets only on the rollback dispatch (act passes top-level env into reusable callees). Both promote and rollback dispatch via workflow_dispatch, so event name cannot disambiguate; the caller workflow name is not visible to the callee.

Verification

  • Both scenarios pass individually under act/gitea (Docker).
  • go build ./..., go test ./... (1265 pass), go vet ./e2e/..., golangci-lint run on both modules: clean.
  • Dogfood drift gate: no drift (generator and manifest untouched).
  • Audited all 45 scenarios for other incomplete feat!: remove inline run callback emission path #161 conversions: none found.

… failing-rollback scenarios

PR #161 removed the inline run callback emission path and converted two scenarios to reusable workflows, but staged the referenced workflow bodies only via a step commit.files, which lands after generation runs. The harness seeds callback stubs and runs generation once at setup, so validate.yaml was missing at generation time and the failing rollback deploy used the generic non-failing stub. PR #162 narrowed the transient classifier and surfaced both.

Add a setup_workflows map on MultiStepScenario seeded into the setup commit before generation, and a validate workflow_call stub clause keyed on config.validate.workflow. Move the failing deploy-app.yaml into setup_workflows so the rollback re-deploy fails under the Rollback caller, and rely on the seeded validate stub so orchestrate.yaml generation emits the gate.

Test-infra only; no product behavior change.

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
…ow name

Inside a reusable workflow_call callback, $GITHUB_WORKFLOW is the callee's own name, not the caller's, on act and on real GitHub. The converted rollback scenario keyed its failing deploy on the caller name (Rollback*), which never matches, so the re-deploy always succeeded and the state-unchanged assertion broke. Both promote and rollback also dispatch via workflow_dispatch, so the event name cannot disambiguate either. Set CASCADE_E2E_ROLLBACK on the rollback dispatch only and key the deploy callback on it; act passes top-level env into the reusable callee.

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple joshua-temple merged commit a659973 into main Jun 14, 2026
7 checks passed
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