{"record":{"id":"44c90d729cdae879","repo":"nektos/act","slug":"sexpected-s-got-s","errorCode":null,"errorMessage":"%sExpected %s got %s","messagePattern":"(.+?)Expected (.+?) got (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/schema/schema.go","lineNumber":291,"sourceCode":"\t} else if def.AllowedValues != nil {\n\t\ts := node.Value\n\t\tfor _, v := range *def.AllowedValues {\n\t\t\tif s == v {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\treturn fmt.Errorf(\"%sExpected one of %s got %s\", formatLocation(node), strings.Join(*def.AllowedValues, \",\"), s)\n\t} else if def.Null != nil {\n\t\tvar myNull *byte\n\t\treturn node.Decode(&myNull)\n\t}\n\treturn errors.ErrUnsupported\n}\n\nfunc (s *Node) checkString(node *yaml.Node, def Definition) error {\n\tval := node.Value\n\tif def.String.Constant != \"\" && def.String.Constant != val {\n\t\treturn fmt.Errorf(\"%sExpected %s got %s\", formatLocation(node), def.String.Constant, val)\n\t}\n\tif def.String.IsExpression {\n\t\tparser := actionlint.NewExprParser()\n\t\tlexer := actionlint.NewExprLexer(val + \"}}\")\n\t\texprNode, parseErr := parser.Parse(lexer)\n\t\tif parseErr != nil {\n\t\t\treturn fmt.Errorf(\"%sFailed to parse: %s\", formatLocation(node), parseErr.Message)\n\t\t}\n\t\tcerr := s.checkSingleExpression(exprNode)\n\t\tif cerr != nil {\n\t\t\treturn fmt.Errorf(\"%s%w\", formatLocation(node), cerr)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (s *Node) checkOneOf(def Definition, node *yaml.Node) error {\n\tvar allErrors error","sourceCodeStart":273,"sourceCodeEnd":309,"githubUrl":"https://github.com/nektos/act/blob/4f411281417e88660bea1c1a1749aa71ae0bd60f/pkg/schema/schema.go#L273-L309","documentation":"Constant-match error from Node.checkString (schema.go:291): the schema declares String.Constant (a required fixed string) and the node's value differs. Used to enforce literal magic values in specific positions of the workflow schema.","triggerScenarios":"A field where the schema pins one exact string (e.g. a discriminator key like `uses: docker://` sub-parts or a fixed `do:` keyword) receives any other value.","commonSituations":"Editing generated or templated workflows and changing fixed keywords; schema drift where the constant changed between act versions.","solutions":["Set the value to the expected constant shown in the error message","If you intended a different construct, check the schema for the correct key/structure to use instead"],"exampleFix":"# before (schema expects the fixed keyword):\ndo: x-custom-action\n# after:\ndo: x-action","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"Fatal validation error — set the value to the exact expected constant from the message.","preventionTips":["Do not edit fixed keywords in generated workflows","When upgrading act, diff the schema constants for changed magic strings"],"tags":["go","act","schema-validation","constant-mismatch","yaml"],"backgroundTag":null,"analyzedSha":"4f411281417e88660bea1c1a1749aa71ae0bd60f","analyzedAt":"2026-08-15T09:19:46.307Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}