{"record":{"id":"3d8acf2689c6669d","repo":"iberianpig/fusuma","slug":"invalid-config-yml-path","errorCode":null,"errorMessage":"Invalid config.yml: #{path}","messagePattern":"Invalid config\\.yml: #(.+?)","errorType":"exception","errorClass":"InvalidFileError","httpStatus":null,"severity":"error","filePath":"lib/fusuma/config.rb","lineNumber":112,"sourceCode":"        end\n      end\n      {}\n    end\n\n    # @return [Hash] If check passes\n    # @raise [InvalidFileError] If check does not pass\n    #: (String) -> Array[Hash[Symbol, untyped]]\n    def validate(path)\n      duplicates = []\n      YAMLDuplicationChecker.check(File.read(path), path) do |ignored, duplicate| # steep:ignore UnexpectedBlockGiven\n        MultiLogger.error \"#{path}: #{ignored.value} is duplicated\"\n        duplicates << duplicate.value\n      end\n      raise InvalidFileError, \"Detect duplicate keys #{duplicates}\" unless duplicates.empty?\n\n      yamls = YAML.load_stream(File.read(path)).compact # steep:ignore NoMethod\n      yamls.map do |yaml|\n        raise InvalidFileError, \"Invalid config.yml: #{path}\" unless yaml.is_a? Hash\n\n        yaml.deep_symbolize_keys\n      end\n    rescue Psych::SyntaxError => e\n      raise InvalidFileError, \"Invalid syntax: #{path} #{e.message}\"\n    end\n\n    # @param index [Index]\n    #: (Fusuma::Config::Index) -> (String | Hash[untyped, untyped] | Integer | Float)?\n    def search(index)\n      return nil if index.nil? || index.keys.empty?\n      @searcher.search_with_cache(index, location: keymap)\n    end\n\n    # @param index [Config::Index]\n    # @return Symbol\n    def find_execute_key(index)\n      @execute_keys ||= Plugin::Executors::Executor.plugins.map do |executor|","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/iberianpig/fusuma/blob/43a7eb04fe6c0709a646be183a612e56e5f60a2e/lib/fusuma/config.rb#L94-L130","documentation":"Error \"Invalid config.yml: #{path}\" thrown in iberianpig/fusuma.","triggerScenarios":"Thrown at lib/fusuma/config.rb:112 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that the config.yml at the reported path contains a YAML mapping (key: value pairs) at the top level, not a plain string, array, or empty document.","Validate the file with ruby -ryaml and fix any non-Hash documents.","Remove any stray YAML documents separated by --- lines that do not contain mappings."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"43a7eb04fe6c0709a646be183a612e56e5f60a2e","analyzedAt":"2026-08-23T06:17:53.504Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}