From 990928618d707098e5937d6b51bfd9c391a7f8de Mon Sep 17 00:00:00 2001 From: Mikhail Date: Sat, 29 Aug 2026 12:41:22 +0300 Subject: [PATCH] fix(supervisor): stabilize control JSON contract --- runtime/supervisor/supervisor.go | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/runtime/supervisor/supervisor.go b/runtime/supervisor/supervisor.go index 7756073..218ae3e 100644 --- a/runtime/supervisor/supervisor.go +++ b/runtime/supervisor/supervisor.go @@ -18,24 +18,24 @@ const ( ) type Release struct { - ID string - Version string - State ReleaseState - LastKnownGood bool + ID string `json:"id"` + Version string `json:"version"` + State ReleaseState `json:"state"` + LastKnownGood bool `json:"last_known_good"` } type Observation struct { - ReleaseID string - Ready bool - Reason string - ObservedAtUnixMillis int64 + ReleaseID string `json:"release_id"` + Ready bool `json:"ready"` + Reason string `json:"reason"` + ObservedAtUnixMillis int64 `json:"observed_at_unix_millis"` } type Lifeboat struct { - Current Release - LastKnownGood Release - Observations []Observation - TrafficMode TrafficMode - StableUpstream string - CandidateUpstream string + Current Release `json:"current"` + LastKnownGood Release `json:"last_known_good"` + Observations []Observation `json:"observations"` + TrafficMode TrafficMode `json:"traffic_mode"` + StableUpstream string `json:"stable_upstream"` + CandidateUpstream string `json:"candidate_upstream"` } func (l *Lifeboat) Start(candidate Release) bool {