Skip to content

fix(orchestrate): overlay recorded component state before reading and finalizing#596

Merged
joshua-temple merged 1 commit into
mainfrom
fix/orchestrate-component-state
Jul 16, 2026
Merged

fix(orchestrate): overlay recorded component state before reading and finalizing#596
joshua-temple merged 1 commit into
mainfrom
fix/orchestrate-component-state

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Orchestrate read and wrote component state without first lifting the recorded per-component per-env leaf (unlike the promote/preflight paths). Effect on a component-scoped manifest: the base-SHA ladder collapsed to HEAD~1 on every component run, and Finalize rebuilt the env leaf from empty, clobbering the deploy-history ring, sibling deploy rows, ref/base_sha/patches, and divergence fields.

Fix: a new shared config.OverlayComponentState helper (beside ReadComponentState) is invoked in NewOrchestrator after options apply, seeding state.components.. into the flat map so the ladder resolves off recorded state and Finalize carries the leaf forward. The non-component (flat) path is unchanged (overlay is a no-op when component is empty).

Verification: build/-race/lint green, full suite; red-then-green tests for the leaf lift, the no-change re-dispatch ladder anchor, and a real Finalize preserving the sibling deploy/ring/divergence, plus config helper tests. No generated output changed. Follow-up: unify this helper with the promote path's overlayComponentState.

…tate map

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
(cherry picked from commit 78171c20fabccd73c17cdd1b53329993bd8beb48)
@joshua-temple joshua-temple merged commit e954258 into main Jul 16, 2026
21 checks passed
@joshua-temple joshua-temple deleted the fix/orchestrate-component-state 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