{"record":{"id":"aeba5ef9b8d77a85","repo":"docker/compose","slug":"compose-experimental-oci-remote-environment-variab","errorCode":null,"errorMessage":"COMPOSE_EXPERIMENTAL_OCI_REMOTE environment variable expects boolean value: %w","messagePattern":"COMPOSE_EXPERIMENTAL_OCI_REMOTE environment variable expects boolean value: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/remote/oci.go","lineNumber":77,"sourceCode":"\ttargetDir := filepath.Dir(targetPath)\n\n\t// Clean both paths to resolve any .. or . components\n\tcleanBase := filepath.Clean(base)\n\tcleanTargetDir := filepath.Clean(targetDir)\n\n\t// Check if the target directory is the same as base directory\n\tif cleanTargetDir != cleanBase {\n\t\treturn fmt.Errorf(\"invalid OCI artifact\")\n\t}\n\n\treturn nil\n}\n\nfunc ociRemoteLoaderEnabled() (bool, error) {\n\tif v := os.Getenv(OCI_REMOTE_ENABLED); v != \"\" {\n\t\tenabled, err := strconv.ParseBool(v)\n\t\tif err != nil {\n\t\t\treturn false, fmt.Errorf(\"COMPOSE_EXPERIMENTAL_OCI_REMOTE environment variable expects boolean value: %w\", err)\n\t\t}\n\t\treturn enabled, err\n\t}\n\treturn true, nil\n}\n\nfunc NewOCIRemoteLoader(dockerCli command.Cli, offline bool, options api.OCIOptions) loader.ResourceLoader {\n\treturn &ociRemoteLoader{\n\t\tdockerCli:          dockerCli,\n\t\toffline:            offline,\n\t\tknown:              map[string]string{},\n\t\tinsecureRegistries: options.InsecureRegistries,\n\t}\n}\n\ntype ociRemoteLoader struct {\n\tdockerCli          command.Cli\n\toffline            bool","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/docker/compose/blob/ddc4b044b62e9f715212ea4143fa830fac76382f/pkg/remote/oci.go#L59-L95","documentation":"`COMPOSE_EXPERIMENTAL_OCI_REMOTE` gates the `oci://` include loader. Its value is parsed with `strconv.ParseBool`, so any non-boolean string (yes, on, 1.0, 'true ' with whitespace) fails and this error wraps the underlying parse error.","triggerScenarios":"Exporting the variable with a non-Go-boolean value and running any compose command that constructs the remote loader (any command parsing the project when oci:// includes may exist).","commonSituations":"CI pipelines using yes/no conventions; env files with quoted or padded values; scripts written before the feature defaulted to on, setting it to informal truthy strings.","solutions":["Use a strict Go boolean: `COMPOSE_EXPERIMENTAL_OCI_REMOTE=true` (or `false` to disable)","Unset the variable — empty means the feature defaults to enabled","Search shell profiles, Makefiles, and CI variables for informal boolean spellings"],"exampleFix":"# before\nexport COMPOSE_EXPERIMENTAL_OCI_REMOTE=on\n\n# after\nexport COMPOSE_EXPERIMENTAL_OCI_REMOTE=true","handlingStrategy":"validation","validationCode":"# fail fast on non-boolean OCI flag values\nv=\"${COMPOSE_EXPERIMENTAL_OCI_REMOTE:-}\"\n[ -z \"$v\" ] || { case \"$v\" in true|false|TRUE|FALSE|True|False|1|0|t|f|T|F) ;; *) echo \"COMPOSE_EXPERIMENTAL_OCI_REMOTE must be a boolean\" >&2; exit 1;; esac; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use true/false literals for all COMPOSE_EXPERIMENTAL_* env flags","Remember empty/unset means enabled by default — usually you can just delete the variable"],"tags":["compose","environment","oci","config"],"backgroundTag":null,"analyzedSha":"ddc4b044b62e9f715212ea4143fa830fac76382f","analyzedAt":"2026-08-15T13:31:42.319Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}