Fission-AI/OpenSpec · error · SchemaValidationError
Cyclic dependency detected
Error message
Cyclic dependency detected: ${cycle} What it means
Semantic validation in parseSchema detected a cycle in the artifact dependency graph via DFS; the message prints the full cycle path (ids joined with →). The schema cannot be loaded because artifact ordering would be undefined.
Solutions
- Break the cycle by removing or reversing one requires edge in the printed chain
- Restructure mutually dependent artifacts into a single artifact or a shared dependency
- Re-run validation to confirm the graph is acyclic
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/core/artifact-graph/schema.ts:120 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/40a4b06eff06293d.
Report an issue: GitHub.
Appendix: source
Thrown at src/core/artifact-graph/schema.ts:120
let current = id;
while (current !== dep) {
cyclePath.unshift(current);
current = parent.get(current)!;
}
cyclePath.unshift(dep);
return cyclePath.join(' → ');
}
}
inStack.delete(id);
return null;
}
for (const artifact of artifacts) {
if (!visited.has(artifact.id)) {
const cycle = dfs(artifact.id);
if (cycle) {
throw new SchemaValidationError(`Cyclic dependency detected: ${cycle}`);
}
}
}
}
View on GitHub (pinned to 6926ccb18a)