Fission-AI/OpenSpec · error · Error
Cannot resolve artifact outputs through a linked directory c
Error message
Cannot resolve artifact outputs through a linked directory cycle: ${currentDir} What it means
Error "Cannot resolve artifact outputs through a linked directory cycle: ${currentDir}" thrown in Fission-AI/OpenSpec.
Source
Thrown at src/core/artifact-graph/outputs.ts:41
FileSystemUtils.assertPathWithin(changeDir, outputPath);
return outputPath;
}
function assertGlobDirectoryTraversal(
changeDir: string,
currentDir: string,
directorySegments: string[],
segmentIndex = 0,
visited = new Set<string>(),
canonicalChangeDir = FileSystemUtils.canonicalizeExistingPath(changeDir),
ancestors = new Set<string>()
): void {
if (segmentIndex >= directorySegments.length) return;
const canonicalDir = FileSystemUtils.canonicalizeExistingPath(currentDir);
FileSystemUtils.assertPathWithin(canonicalChangeDir, canonicalDir);
const visitKey = `${canonicalDir}\0${segmentIndex}`;
if (ancestors.has(visitKey)) {
throw new Error(`Cannot resolve artifact outputs through a linked directory cycle: ${currentDir}`);
}
if (visited.has(visitKey)) return;
visited.add(visitKey);
ancestors.add(visitKey);
try {
const segment = directorySegments[segmentIndex];
if (segment === '**') {
// `**` may consume no directory at all.
assertGlobDirectoryTraversal(
changeDir,
canonicalDir,
directorySegments,
segmentIndex + 1,
visited,
canonicalChangeDir,
ancestors
);View on GitHub (pinned to 6926ccb18a)
When it happens
Trigger: Thrown at src/core/artifact-graph/outputs.ts:41 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/df0ef1dc287a121d.
Report an issue: GitHub.