{"record":{"id":"222fcf46aa65bc10","repo":"temporalio/temporal","slug":"failed-to-read-version-demotion-signal-configurati","errorCode":null,"errorMessage":"failed to read version demotion signal configuration: %w","messagePattern":"failed to read version demotion signal configuration: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"service/worker/workerdeployment/workflow.go","lineNumber":140,"sourceCode":"\n\tif workflow.GetVersion(ctx, versionDemotionSignalChangeID, workflow.DefaultVersion, 0) == workflow.DefaultVersion {\n\t\t// Histories that have commit-routing-first (previous check), but predate this checkpoint are\n\t\t// workflows that already used signal-based demotion. They must continue\n\t\t// on the signal path to avoid a non-determinism error, regardless of the\n\t\t// current dynamic config value.\n\t\t// OSS 1.31 histories never reach here because they didn't have commit-routing-first.\n\t\treturn true, nil\n\t}\n\n\tvar enabled bool\n\terr := workflow.MutableSideEffect(\n\t\tctx,\n\t\tversionDemotionSignalMutableSideEffect,\n\t\tfunc(workflow.Context) any { return versionDemotionSignalEnabledGetter() },\n\t\tfunc(a, b any) bool { return a == b },\n\t).Get(&enabled)\n\tif err != nil {\n\t\treturn false, fmt.Errorf(\"failed to read version demotion signal configuration: %w\", err)\n\t}\n\treturn enabled, nil\n}\n\nfunc (d *WorkflowRunner) listenToSignals(ctx workflow.Context) {\n\tforceCANSignalChannel := workflow.GetSignalChannel(ctx, ForceCANSignalName)\n\tsyncVersionSummaryChannel := workflow.GetSignalChannel(ctx, SyncVersionSummarySignal)\n\tpropagationCompleteChannel := workflow.GetSignalChannel(ctx, PropagationCompleteSignal)\n\n\td.signalHandler.signalSelector.AddReceive(forceCANSignalChannel, func(c workflow.ReceiveChannel, more bool) {\n\t\td.signalHandler.processingSignals++\n\t\tdefer func() { d.signalHandler.processingSignals-- }()\n\n\t\tvar args *deploymentspb.ForceCANDeploymentSignalArgs\n\t\tc.Receive(ctx, &args)\n\t\td.forceCAN = true\n\n\t\t// Apply override state if provided","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/service/worker/workerdeployment/workflow.go#L122-L158","documentation":"shouldUseVersionDemotionSignal reads a MutableSideEffect (versionDemotionSignalMutableSideEffect) to decide whether version demotion must go through a signal. If reading the side-effect value fails, the error is wrapped and propagated to setRamp/handleSetCurrent, blocking the requested ramp or current-version change.","triggerScenarios":"workflow.SideEffect/MutableSideEffect Get returning an error, typically deterministic-execution problems, side-effect history corruption, or workflow panic recovery during a SetRampingVersion/SetCurrentVersion update handling.","commonSituations":"Workflow history replay issues after a server/SDK upgrade; continued-as-new workflows with missing side-effect records; state store corruption.","solutions":["Check workflow history for the versionDemotionSignal MutableSideEffect record; a missing/corrupt record needs a history-level fix","Retry the update (SetCurrentVersion/SetRampingVersion) — a fresh workflow execution may recover transient replay issues","Report with workflow ID/run ID if persistent; mark the deployment series state manually via supported APIs if demotion is blocked"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"err := deploymentHandle.SetCurrentVersion(ctx, req)\nif err != nil && strings.Contains(err.Error(), \"failed to read version demotion signal configuration\") {\n    // transient replay issue — retry the update after backoff\n}","preventionTips":["Avoid server/SDK upgrades that change side-effect formats without testing upgrade on a dev cluster","Keep deployment update calls idempotent and safe to retry","If persistent, inspect workflow history for the mutable side-effect record"],"tags":["worker-deployment","workflow","side-effect","go"],"backgroundTag":"side-effect-read-failed","analyzedSha":"bde624efd13fbd3843654058db6d9c716166318b","analyzedAt":"2026-09-01T07:18:39.080Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}