{"record":{"id":"4d41eb6ad23e6ccc","repo":"hyperledger/fabric","slug":"implicit-policy-s-at-path-s-did-not-compile","errorCode":null,"errorMessage":"implicit policy %s at path %s did not compile","messagePattern":"implicit policy (.+?) at path (.+?) did not compile","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/policies/policy.go","lineNumber":213,"sourceCode":"\t\tmanagers[groupName], err = NewManagerImpl(path+PathSeparator+groupName, providers, group)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tpolicies := make(map[string]Policy)\n\tfor policyName, configPolicy := range root.Policies {\n\t\tpolicy := configPolicy.Policy\n\t\tif policy == nil {\n\t\t\treturn nil, fmt.Errorf(\"policy %s at path %s was nil\", policyName, path)\n\t\t}\n\n\t\tvar cPolicy Policy\n\n\t\tif policy.Type == int32(cb.Policy_IMPLICIT_META) {\n\t\t\timp, err := NewImplicitMetaPolicy(policy.Value, managers)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, errors.Wrapf(err, \"implicit policy %s at path %s did not compile\", policyName, path)\n\t\t\t}\n\t\t\tcPolicy = imp\n\t\t} else {\n\t\t\tprovider, ok := providers[policy.Type]\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"policy %s at path %s has unknown policy type: %v\", policyName, path, policy.Type)\n\t\t\t}\n\n\t\t\tvar err error\n\t\t\tcPolicy, _, err = provider.NewPolicy(policy.Value)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, errors.Wrapf(err, \"policy %s at path %s did not compile\", policyName, path)\n\t\t\t}\n\t\t}\n\n\t\tpolicies[policyName] = cPolicy\n\n\t\tlogger.Debugf(\"Proposed new policy %s for %s\", policyName, path)","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/common/policies/policy.go#L195-L231","documentation":"When a configured policy is of type IMPLICIT_META, NewManagerImpl delegates to NewImplicitMetaPolicy to parse and wire up sub-policy references. A parse failure is wrapped with this message identifying the policy name and config path.","triggerScenarios":"Calling NewManagerImpl on a config where an IMPLICIT_META policy's Value string fails to parse (wrong token count or unknown rule), or references a sub-policy group that cannot be resolved.","commonSituations":"Malformed implicit meta strings like 'ANY' (missing sub-policy name) committed to channel config; rule keywords in wrong case; sub-policy group name not present in the config.","solutions":["Correct the implicit meta Value string to the form 'RULE SubPolicy', e.g. 'MAJORITY Endorsement'","Ensure the referenced sub-policy group exists in the config at that path","Regenerate the channel config from a known-good configtx.yaml profile"],"exampleFix":"// before\nPolicy{Type: IMPLICIT_META, Value: \"ANY\"}\n// after\nPolicy{Type: IMPLICIT_META, Value: \"ANY Endorsement\"}","handlingStrategy":"validation","validationCode":"// Validate implicit meta strings in config before NewManagerImpl\nfor name, p := range policies {\n  if p.Type == int32(cb.Policy_IMPLICIT_META) {\n    if _, err := policies.ImplicitMetaFromString(string(p.Value)); err != nil {\n      return fmt.Errorf(\"policy %s invalid: %w\", name, err)\n    }\n  }\n}","typeGuard":null,"tryCatchPattern":"mgr, err := policies.NewManagerImpl(root, path, providers)\nif err != nil && strings.Contains(err.Error(), \"did not compile\") {\n  return fmt.Errorf(\"fix implicit meta value for policy: %w\", errors.Unwrap(err))\n}","preventionTips":["Pre-parse every IMPLICIT_META value with ImplicitMetaFromString during config generation","Ensure referenced sub-policy groups exist at the same path","Use errors.Unwrap to find the root parse failure"],"tags":["hyperledger-fabric","channel-config","policy-config"],"backgroundTag":"malformed-policy-string","analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}