{"record":{"id":"6d3251dbefe3e6ae","repo":"Fission-AI/OpenSpec","slug":"warning-could-not-parse-configpathforwarnings-p","errorCode":null,"errorMessage":"Warning: could not parse ${configPathForWarnings(projectRoot)} (${error instanceof Error ? error.message.split('\\n')[0] : String(error)}); ignoring it.","messagePattern":"Warning: could not parse (.+?) \\((.+?)\\); ignoring it\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/project-config.ts","lineNumber":400,"sourceCode":"        typeof raw.githubCopilot === 'object' &&\n        raw.githubCopilot !== null &&\n        !Array.isArray(raw.githubCopilot)\n      ) {\n        const cloudAgent = (raw.githubCopilot as Record<string, unknown>).cloudAgent;\n        if (typeof cloudAgent === 'boolean') {\n          config.githubCopilot = { cloudAgent };\n        } else if (cloudAgent !== undefined) {\n          console.warn(`Invalid 'githubCopilot.cloudAgent' field in config (must be a boolean)`);\n        }\n      } else {\n        console.warn(`Invalid 'githubCopilot' field in config (must be an object)`);\n      }\n    }\n\n    // Return partial config even if some fields failed\n    return Object.keys(config).length > 0 ? (config as ProjectConfig) : null;\n  } catch (error) {\n    console.warn(\n      `Warning: could not parse ${configPathForWarnings(projectRoot)} (${error instanceof Error ? error.message.split('\\n')[0] : String(error)}); ignoring it.`\n    );\n    return null;\n  }\n}\n\nfunction configPathForWarnings(projectRoot: string): string {\n  return resolveConfigFilePath(projectRoot) ?? path.join(projectRoot, 'openspec', 'config.yaml');\n}\n\n/**\n * Validate artifact IDs in rules against the artifacts of every available\n * schema. The `rules:` map is global, but each change can use a different\n * schema, so a key is only unknown when it matches no artifact in ANY schema.\n * Returns warnings for keys that are unknown everywhere.\n *\n * @param rules - The rules object from config\n * @param validArtifactIds - Set of valid artifact IDs across all schemas","sourceCodeStart":382,"sourceCodeEnd":418,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/project-config.ts#L382-L418","documentation":"Error \"Warning: could not parse ${configPathForWarnings(projectRoot)} (${error instanceof Error ? error.message.split('\\n')[0] : String(error)}); ignoring it.\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/project-config.ts:400 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6926ccb18afa4ff621112813e9968334576ee11a","analyzedAt":"2026-08-25T12:29:45.729Z","schemaVersion":2},"datasetVersion":"2026-08-25T16:17:27.014Z"}