feat(proposals): evolution auto-rollback CLI + webui (F3)#1620
Merged
Conversation
`wave proposals rollback <pipeline_name>` and POST
/pipelines/{pipelineName}/rollback flip the active pipeline_version
to the highest version below the active one. Reuses the existing
state.ActivateVersion atomic flip — no schema changes.
- `internal/proposals/rollback.go` PriorVersion helper + sentinels
(ErrNoActiveVersion, ErrNoPriorVersion).
- CLI subcommand under existing `wave proposals` group.
- Webui handler returns JSON {pipeline_name, rolled_back_from,
now_active, yaml_path, decided_by}; 404 no-active, 409 no-prior.
- Route under /pipelines/{name}/rollback to avoid mux conflict with
the existing /proposals/{id}/{approve,reject} wildcards.
- Tests cover prior-found, gap-aware rollback, no-active, no-prior.
Part of epic #1565 follow-ups.
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.
Closes the F3 follow-up from epic #1565.
What
wave proposals rollback <pipeline_name>POST /pipelines/{pipelineName}/rollbackBoth flip the active
pipeline_versionto the highest version below the currently-active one, using the existingstate.ActivateVersionatomic flip. Emergency lever for an approved evolution that misbehaves in production.Design
internal/proposals/rollback.go—PriorVersion(store, name)returns(prior, current, err). Sentinels:ErrNoActiveVersion,ErrNoPriorVersion./pipelines/{name}/rollbackto avoid net/http mux conflict with/proposals/{id}/{approve,reject}wildcards.Tests
internal/proposals/rollback_test.go— 4 cases: prior-found, gap-aware, no-active, no-prior.internal/webui/handlers_proposals_test.go— 3 cases: 200 flip, 404 no-active, 409 no-prior.Lint
nix run nixpkgs#golangci-lint -- run ./internal/proposals/... ./internal/webui/... ./cmd/wave/commands/...→0 issues.Part of epic #1565.