Skip to content

feat(rollback): record per-component rollback state and namespace the rollback ref - #525

Merged
joshua-temple merged 1 commit into
mainfrom
feat/rollback-component
Jul 8, 2026
Merged

joshua-temple merged 1 commit into
mainfrom
feat/rollback-component

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Problem

Rollback records state and eligibility against the flat, global env ladder. For a multi-component repo each component must roll back on its own state, its own environment subset, and its own ref namespace, without touching a sibling.

Fix

  • Rollback for a selected component records state.components.<name>.<env> via WriteScopedState, preserving a sibling's state under the CommitWithRetry 409 re-apply.
  • The rollback ref becomes rollback/<component>/<env> (rollback/<env> byte-identical when no component).
  • First-environment eligibility and the previous-version ring are judged against the component's own environment subset, read from its overlaid state rows.
  • An empty component keeps every path flat and byte-identical.

Scope is the rollback runtime. The generator emitting --component on the rollback workflow and the lifecycle e2e are separate changes.

Verification

go build ./..., go test ./... (2634 pass), go test -race on rollback+config (590 pass), golangci-lint run ./... clean; single-component byte-identical baseline gate green. Tests prove per-component state recording, a concurrent rollback-finalize 409 re-apply that preserves the sibling verbatim (including an unmodeled key), the namespaced ref, first-env scoped to the component's ladder, and the single-component path unchanged.

Refs #294.

… rollback ref

Rollback for a selected component records its state at state.components.<name>.<env> through the scoped serializer, preserving a sibling component's state across the CommitWithRetry re-apply on a 409. The rollback ref becomes rollback/<component>/<env> (rollback/<env> byte-identical when no component). First-environment eligibility and the previous-version ring are judged against the component's own environment subset, read from its overlaid state rows, so a component is never blocked or targeted by a sibling's ladder. An empty component keeps every path flat and byte-identical.

Refs #294.

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple
joshua-temple merged commit 644fe69 into main Jul 8, 2026
20 checks passed
@joshua-temple
joshua-temple deleted the feat/rollback-component branch July 8, 2026 10:29
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