mirror of
https://github.com/multica-ai/multica.git
synced 2026-08-05 09:30:05 +02:00
* fix(labels): always enable resource labels (MUL-5563) Co-authored-by: multica-agent <github@multica.ai> * docs(labels): clarify resource label rollback safety (MUL-5563) Co-authored-by: multica-agent <github@multica.ai> * docs(labels): correct compat client range (MUL-5563) Co-authored-by: multica-agent <github@multica.ai> --------- Co-authored-by: Eve <eve@multica-ai.local> Co-authored-by: multica-agent <github@multica.ai>
51 lines
1.8 KiB
Go
51 lines
1.8 KiB
Go
package featureflags
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
)
|
|
|
|
func TestResourceLabelsCompatDecisionStaysEnabled(t *testing.T) {
|
|
flags := EvaluateFrontendPublicFlags(context.Background(), nil)
|
|
if !flags[resourceLabelsCompat] {
|
|
t.Fatal("resource labels must stay enabled for installed clients")
|
|
}
|
|
}
|
|
|
|
// MUL-5345: the desktop client is fail-closed on this flag, so it stays off
|
|
// unless the key arrives as an explicit true. A key that is never published
|
|
// can therefore never be turned on — which is exactly what happened when the
|
|
// desktop side shipped without this entry: hang stack capture was inert in
|
|
// production and no amount of flag configuration could have enabled it.
|
|
func TestDesktopHangStackCaptureIsPublishedToClients(t *testing.T) {
|
|
flags := EvaluateFrontendPublicFlags(context.Background(), nil)
|
|
if _, published := flags[DesktopHangStackCapture]; !published {
|
|
t.Fatal("desktop hang stack capture flag must be published, or the client can never enable it")
|
|
}
|
|
}
|
|
|
|
func TestDesktopHangStackCaptureDefaultsToOff(t *testing.T) {
|
|
ctx := context.Background()
|
|
if DesktopHangStackCaptureEnabled(ctx, nil) {
|
|
t.Fatal("hang stack capture must default to off")
|
|
}
|
|
flags := EvaluateFrontendPublicFlags(ctx, nil)
|
|
if flags[DesktopHangStackCapture] {
|
|
t.Fatal("published default must be off until it is deliberately enabled")
|
|
}
|
|
}
|
|
|
|
func TestAgentBuilderCompatDecisionStaysEnabled(t *testing.T) {
|
|
flags := EvaluateFrontendPublicFlags(context.Background(), nil)
|
|
if !flags[agentBuilderCompat] {
|
|
t.Fatal("agent builder must stay enabled for installed clients")
|
|
}
|
|
}
|
|
|
|
func TestAgentSkillTogglesCompatDecisionStaysEnabled(t *testing.T) {
|
|
flags := EvaluateFrontendPublicFlags(context.Background(), nil)
|
|
if !flags[agentSkillTogglesCompat] {
|
|
t.Fatal("agent skill toggles must stay enabled for installed v0.4.0 clients")
|
|
}
|
|
}
|