{"record":{"id":"f26e9c490980015f","repo":"JuliusBrussee/caveman","slug":"unknown-session-value-feature-q","errorCode":null,"errorMessage":"unknown session-value feature %q","messagePattern":"unknown session-value feature %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"proxy/routing/session_value.go","lineNumber":410,"sourceCode":"\tcostUCBResidual = math.Max(residualCost, costUCBResidual)\n\tprediction := SessionValuePrediction{\n\t\tActionID: model.ActionID, RewardProbability: reward, QualityLCB: lcb,\n\t\tExpectedResidualCostUSD: residualCost, ExpectedCostUSD: immediate + transition + residualCost,\n\t\tCostUCBUSD: immediate + transition + costUCBResidual, ExpectedCorrectiveTurns: corrections,\n\t\tEscalationProbability: escalation, QualityUncertainty: qualityError,\n\t}\n\tfor _, value := range []float64{prediction.RewardProbability, prediction.QualityLCB, prediction.ExpectedResidualCostUSD, prediction.ExpectedCostUSD, prediction.CostUCBUSD, prediction.ExpectedCorrectiveTurns, prediction.EscalationProbability, prediction.QualityUncertainty} {\n\t\tif !finite(value) || value < 0 {\n\t\t\treturn SessionValuePrediction{}, errors.New(\"session-value prediction non-finite\")\n\t\t}\n\t}\n\treturn prediction, nil\n}\n\nfunc sessionValueVector(specs []SessionValueFeatureSpec, state map[string]SessionValueFeatureValue) ([]float64, []float64, error) {\n\tfor name := range state {\n\t\tif _, known := sessionValueFeatureVocabulary[name]; !known {\n\t\t\treturn nil, nil, fmt.Errorf(\"unknown session-value feature %q\", name)\n\t\t}\n\t}\n\tvalues := make([]float64, len(specs))\n\tmissing := make([]float64, len(specs))\n\tfor i, spec := range specs {\n\t\tfeature, present := state[spec.Name]\n\t\tif !present || !feature.Available {\n\t\t\tif spec.Required {\n\t\t\t\treturn nil, nil, fmt.Errorf(\"required session-value feature %q unavailable\", spec.Name)\n\t\t\t}\n\t\t\tmissing[i] = 1\n\t\t\tcontinue\n\t\t}\n\t\tif !finite(feature.Value) || feature.Value < spec.Min || feature.Value > spec.Max {\n\t\t\treturn nil, nil, fmt.Errorf(\"session-value feature %q outside artifact bounds\", spec.Name)\n\t\t}\n\t\tvalues[i] = (feature.Value - spec.Mean) / spec.Scale\n\t}","sourceCodeStart":392,"sourceCodeEnd":428,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/proxy/routing/session_value.go#L392-L428","documentation":"sessionValueVector encountered a feature name in the runtime state map that is not in sessionValueFeatureVocabulary — the fixed vocabulary of known session-value features. The state carries a feature the loaded artifact generation does not know about, signaling a version skew between the feature producer and the policy artifact.","triggerScenarios":"Thrown at proxy/routing/session_value.go:410 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Align the feature-producer version with the artifact version so the state map only emits vocabulary features","Deploy an artifact whose vocabulary includes the new feature before enabling the producer that emits it"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"766dce6b1394ebb56a3090748d5a0240a5aefb36","analyzedAt":"2026-08-18T03:14:35.516Z","contentChangedAt":"2026-08-18T03:14:35.516Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}