Skip to content

test(rollback): isolate resolution source in e2e + surface it in the rollback workflow - #347

Merged
joshua-temple merged 1 commit into
mainfrom
test/e2e-rollback-retry-coverage
Jun 25, 2026
Merged

joshua-temple merged 1 commit into
mainfrom
test/e2e-rollback-retry-coverage

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Closes #320 (#333 was already covered by CommitWithRetry unit tests).

The e2e harness could not distinguish WHICH rollback target-resolution source won (live env state vs the per-env history ring vs git-history fallback). This surfaces the resolved source end-to-end:

  • internal/rollback: preflight --gha-output now emits target_source; unit tests assert the source per precedence path.
  • internal/generate/rollback.go: the generated rollback workflow gains a target_source job output and a "Report Resolved Source" step logging rollback resolved from <source> (ungated by dry_run); generator test asserts it.
  • e2e/harness: new RollbackStep.ExpectSource + assertRollbackSource.
  • Three new e2e/scenarios/rollback/ scenarios pin each path (state / previous-ring / git-history). All three pass under act+gitea locally.

#333 retry-on-conflict is already covered deterministically by CommitWithRetry 409-injection unit tests + e2e scenario 08; not duplicated. Build + go test ./... + golangci-lint clean.

…rollback workflow

The e2e harness could not distinguish which rollback target-resolution source won (live state vs the per-env history ring vs git-history). Surface the resolved source end-to-end: preflight --gha-output emits target_source, the generated rollback workflow logs 'rollback resolved from <source>' (ungated by dry_run), and the harness gains an ExpectSource assertion. Adds three e2e scenarios pinning each precedence path, validated under act+gitea. retry-on-conflict (#333) was already covered by CommitWithRetry unit tests. Closes #320.

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple
joshua-temple merged commit a247453 into main Jun 25, 2026
13 checks passed
@joshua-temple
joshua-temple deleted the test/e2e-rollback-retry-coverage branch June 25, 2026 01:52
@joshua-temple joshua-temple added the test Adding or correcting tests label Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Adding or correcting tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(e2e): isolate each rollback target-resolution precedence path

1 participant