Fission-AI/OpenSpec · error · Error
Spec inputs for '${p.update.id}' changed before archive coul
Error message
Spec inputs for '${p.update.id}' changed before archive could write them. What it means
Error "Spec inputs for '${p.update.id}' changed before archive could write them." thrown in Fission-AI/OpenSpec.
Source
Thrown at src/core/archive.ts:1748
const writeTotals = { added: 0, modified: 0, removed: 0, renamed: 0 };
let wroteAny = false;
for (const p of prepared) {
// Deletions are deferred to the loop below.
if (p.outcome !== 'write') continue;
const { added, modified, removed, renamed } = p.counts;
if (added + modified + removed + renamed === 0) {
// Every operation was already synced: rewriting the file would
// only churn normalization differences into it.
continue;
}
await writeUpdatedSpec(p.update, p.rebuilt, p.counts, {
silent: json,
beforeMutate: async () => {
if (
(await fingerprintSpecInputs(p.update)) !==
`${p.sourceFingerprint}\n${p.targetFingerprint}`
) {
throw new Error(
`Spec inputs for '${p.update.id}' changed before archive could write them.`
);
}
mutationAttempts.add(p.update.target);
},
// Cross-root paths must be absolute when a store is selected.
...(isStoreSelectedRoot(root) ? { displayPath: p.update.target } : {}),
});
wroteAny = true;
writeTotals.added += added;
writeTotals.modified += modified;
writeTotals.removed += removed;
writeTotals.renamed += renamed;
}
// Retirements run only after every write has succeeded. If any
// later mutation fails, the snapshots below restore every target.
for (const p of prepared) {View on GitHub (pinned to 6926ccb18a)
When it happens
Trigger: Thrown at src/core/archive.ts:1748 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/e898914b23cbd4e4.
Report an issue: GitHub.