Fission-AI/OpenSpec · error
${specName} RENAMED failed for header "### Requirement: ${r.
Error message
${specName} RENAMED failed for header "### Requirement: ${r.from}" - source not found What it means
Error "${specName} RENAMED failed for header "### Requirement: ${r.from}" - source not found" thrown in Fission-AI/OpenSpec.
Source
Thrown at src/core/specs-apply.ts:400
if (!nameToBlock.has(from)) {
// Source gone but target present means the rename was already synced
// to the baseline (early-sync pattern) — re-applying it is a no-op,
// not a failure. Only a missing source AND target is a genuine error.
if (nameToBlock.has(to)) {
// Unless a case/whitespace variant of the source still exists (and is
// not the target itself, as in a case-only rename): that is a typo'd
// header, not an early-synced rename — same guard REMOVED applies.
const nearMiss = [...nameToBlock.keys()].find(
(k) => k !== to && foldRequirementName(k) === foldRequirementName(from)
);
if (nearMiss !== undefined) {
throw new Error(
`${specName} RENAMED failed for header "### Requirement: ${r.from}" - source not found, but "### Requirement: ${nameToBlock.get(nearMiss)!.name}" exists; fix the header to match it exactly`
);
}
continue;
}
throw new Error(`${specName} RENAMED failed for header "### Requirement: ${r.from}" - source not found`);
}
if (nameToBlock.has(to)) {
throw new Error(`${specName} RENAMED failed for header "### Requirement: ${r.to}" - target already exists`);
}
const block = nameToBlock.get(from)!;
const newHeader = `### Requirement: ${to}`;
const rawLines = block.raw.split('\n');
rawLines[0] = newHeader;
const renamedBlock: RequirementBlock = {
headerLine: newHeader,
name: to,
raw: rawLines.join('\n'),
};
nameToBlock.delete(from);
nameToBlock.set(to, renamedBlock);
renamedTargets.set(from, to);
renamedApplied++;
}View on GitHub (pinned to 6926ccb18a)
When it happens
Trigger: Thrown at src/core/specs-apply.ts:400 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/91d278c4d7c08ef1.
Report an issue: GitHub.