{"record":{"id":"765f9809af550c44","repo":"hasura/graphql-engine","slug":"cannot-find-s-search-stopped-w","errorCode":null,"errorMessage":"cannot find [%s] | search stopped: %w","messagePattern":"cannot find \\[(.+?)\\] \\| search stopped: %w","errorType":"exception","errorClass":"errors.Error","httpStatus":null,"severity":"error","filePath":"cli/directory.go","lineNumber":101,"sourceCode":"\terr = ValidateDirectory(startFrom)\n\tif err != nil {\n\t\tnextDir := filepath.Dir(startFrom)\n\t\t// to catch error gracefully in loop situation\n\t\tif nextDir == startFrom {\n\t\t\treturn \"\", errors.E(\n\t\t\t\top,\n\t\t\t\tfmt.Errorf(\n\t\t\t\t\t\"failed recursively find config.yaml: search stopped due to a possible infinite filesystem traversal at %s\",\n\t\t\t\t\tnextDir,\n\t\t\t\t),\n\t\t\t)\n\t\t}\n\n\t\terr := CheckFilesystemBoundary(nextDir)\n\t\tif err != nil {\n\t\t\treturn nextDir, errors.E(\n\t\t\t\top,\n\t\t\t\tfmt.Errorf(\n\t\t\t\t\t\"cannot find [%s] | search stopped: %w\",\n\t\t\t\t\tstrings.Join(filesRequired, \", \"),\n\t\t\t\t\terr,\n\t\t\t\t),\n\t\t\t)\n\t\t}\n\n\t\treturn recursivelyValidateDirectory(nextDir)\n\t}\n\n\treturn startFrom, nil\n}\n\n// validateDirectory tries to parse dir for the filesRequired and returns error\n// if any one of them is missing.\nfunc ValidateDirectory(dir string) error {\n\tvar op errors.Op = \"cli.ValidateDirectory\"\n","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/directory.go#L83-L119","documentation":"While walking upward looking for the required files, CheckFilesystemBoundary rejected the next parent directory. This is a safety rail that stops the recursive search from escaping a filesystem boundary (e.g. crossing out of a mount, or past an allowed root), and the error lists the required files that could not be found before the boundary was hit.","triggerScenarios":"Calling the CLI from a subdirectory that lives on a different mount/filesystem than the project root, so the upward walk hits the mount boundary before finding config.yaml and migrations/.","commonSituations":"Temporary working dirs mounted separately (/tmp on tmpfs), container overlay layers, chroot environments, or running from a sibling repository with the boundary option configured to a narrow root.","solutions":["Run the command from inside the same filesystem/mount as the project directory","Pass the project directory explicitly with the directory flag instead of relying on upward discovery","Review any configured filesystem boundary option and widen it to include the project root"],"exampleFix":"# before\ncd /tmp/work && mycli run   # boundary hit walking up from tmpfs\n# after\nmycli --dir /home/user/project run","handlingStrategy":"fallback","validationCode":"cwd, _ := os.Getwd()\nroot, _ := filepath.Abs(projectRoot)\nif !strings.HasPrefix(cwd+string(os.PathSeparator), root+string(os.PathSeparator)) {\n    // avoid upward discovery across mounts; pass --dir explicitly\n    log.Println(\"run from within\", root, \"or use --dir\")\n}","typeGuard":null,"tryCatchPattern":"if err := ec.Validate(); err != nil {\n    if strings.Contains(err.Error(), \"search stopped\") {\n        // boundary hit: retry with an explicit directory inside the boundary\n    }\n}","preventionTips":["Keep scratch/temp work on the same filesystem as the project","Configure the filesystem boundary to encompass the project root","Prefer explicit directory flags in containerized setups"],"tags":["filesystem","mount-boundary","traversal","config-discovery","go"],"backgroundTag":"config-file-not-found","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}