Fission-AI/OpenSpec · error
Invalid 'schema' field in config (must be non-empty string)
Error message
Invalid 'schema' field in config (must be non-empty string)
What it means
Error "Invalid 'schema' field in config (must be non-empty string)" thrown in Fission-AI/OpenSpec.
Source
Thrown at src/core/project-config.ts:290
try {
const content = readFileSync(configPath, 'utf-8');
const raw = parseYaml(content);
if (!raw || typeof raw !== 'object') {
console.warn(`openspec/config.yaml is not a valid YAML object`);
return null;
}
const config: Partial<ProjectConfig> = {};
// Parse schema field using Zod
const schemaField = z.string().min(1);
const schemaResult = schemaField.safeParse(raw.schema);
if (schemaResult.success) {
config.schema = schemaResult.data;
} else if (raw.schema !== undefined) {
console.warn(`Invalid 'schema' field in config (must be non-empty string)`);
}
// Parse context field with size limit
if (raw.context !== undefined) {
const contextField = z.string();
const contextResult = contextField.safeParse(raw.context);
if (contextResult.success) {
const contextSize = Buffer.byteLength(contextResult.data, 'utf-8');
if (contextSize > MAX_CONTEXT_SIZE) {
console.warn(
`Context too large (${(contextSize / 1024).toFixed(1)}KB, limit: ${MAX_CONTEXT_SIZE / 1024}KB)`
);
console.warn(`Ignoring context field`);
} else {
config.context = contextResult.data;
}
} else {View on GitHub (pinned to 6926ccb18a)
When it happens
Trigger: Thrown at src/core/project-config.ts:290 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Fission-AI/OpenSpec@6926ccb18a (2026-08-25).
Data as JSON: /api/errors/b6e271446b14eb68.
Report an issue: GitHub.