Skip to content

feat: add divergence fields to EnvState - #100

Merged
joshua-temple merged 2 commits into
mainfrom
feat/envstate-divergence-fields
Jun 11, 2026
Merged

joshua-temple merged 2 commits into
mainfrom
feat/envstate-divergence-fields

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Problem

EnvState has no way to record that an environment is on a hotfix integration branch rather than trunk. Three fields are needed to track the hotfix ref, the base SHA the branch diverged from, and the list of patch commits applied.

Fix

Add Ref, BaseSHA, and Patches fields to EnvState (all omitempty, additive - no schema version bump per the policy at types.go). Add IsDiverged() bool method that returns true when Ref is set or Patches is non-empty. Surface the fields in cascade status output only when set.

Verification

go build ./... && go test ./internal/config/... ./internal/status/... && golangci-lint run ./internal/config/... ./internal/status/...

All green. Existing manifest fixtures parse without diff (IsDiverged()==false on all).

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple
joshua-temple merged commit ab2f068 into main Jun 11, 2026
6 checks passed
@joshua-temple
joshua-temple deleted the feat/envstate-divergence-fields branch June 11, 2026 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant