Fission-AI/OpenSpec · error · Error

The retirement authorization is unavailable.

Error message

The ${METADATA_FILENAME} retirement authorization is unavailable.

What it means

Guard thrown in the retirement phase's beforeMutate hook when the captured retirement authorization fingerprint is undefined — i.e. no fingerprint of the change.json retirement section was recorded earlier (a preparation invariant was skipped or lost). Retiring requirements requires that authorization baseline, so retirement cannot proceed safely without it.

Solutions

  1. Re-run the archive so the retirement authorization is captured
  2. Ensure .openspec.yaml is readable and stable during the archive
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/core/archive.ts:1776 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/cf807a899e12318a. Report an issue: GitHub.

Appendix: source

Thrown at src/core/archive.ts:1776

            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) {
            if (p.outcome !== 'retire') continue;
            const { retired, resolvedPath, displacedPath } = await retireSpec(
              p.update,
              mainSpecsDir,
              {
                silent: json,
                deferDelete: true,
                beforeMutate: async () => {
                  if (retirementAuthorizationFingerprint === undefined) {
                    throw new Error(
                      `The ${METADATA_FILENAME} retirement authorization is unavailable.`
                    );
                  }
                  await assertRetirementAuthorization(
                    changeDir,
                    retirementAuthorizationFingerprint
                  );
                  if (
                    (await fingerprintSpecInputs(p.update)) !==
                    `${p.sourceFingerprint}\n${p.targetFingerprint}`
                  ) {
                    throw new Error(
                      `Spec inputs for '${p.update.id}' changed before archive could retire them.`
                    );
                  }
                  mutationAttempts.add(p.update.target);
                },
                verifyDisplaced: async (displacedPath) => {

View on GitHub (pinned to 6926ccb18a)