Fission-AI/OpenSpec · error

Rewrote ${seen} of ${totalHexLiterals} 64-hex literals in ${

Error message

Rewrote ${seen} of ${totalHexLiterals} 64-hex literals in ${sourceLabel}.
Every one is assumed to be a pinned hash, so the two counts must agree. Either:
  - a pinned hash is formatted in a way the patterns here do not match, and would have been left stale without warning: widen them; or
  - the file gained a 64-hex literal that is not a pin: narrow the count above so it stops being mistaken for one.

What it means

Error "Rewrote ${seen} of ${totalHexLiterals} 64-hex literals in ${sourceLabel}. Every one is assumed to be a pinned hash, so the two counts must agree. Either: - a pinned hash is formatted in a way the patterns here do not match, and would have been left stale without warning: widen them; or - the file gained a 64-hex literal that is not a pin: narrow the count above so it stops being mistaken for one." thrown in Fission-AI/OpenSpec.

Source

Thrown at scripts/parity-hash-shared.mjs:84

    }
    if (next !== previous) moved.push(name);
    seen += 1;
    return `${indent}${name}: '${next}'${comma}`;
  });

  rewritten = rewritten.replace(CONTENT_PIN, (_match, indent, dirName, previous, comma) => {
    const next = resolveContentHash(dirName);
    if (next === undefined) {
      throw new Error(`'${dirName}' is pinned in the parity test but not returned by getSkillTemplates()`);
    }
    if (next !== previous) moved.push(dirName);
    seenContentKeys.add(dirName);
    seen += 1;
    return `${indent}'${dirName}': '${next}'${comma}`;
  });

  if (seen !== totalHexLiterals) {
    throw new Error(
      `Rewrote ${seen} of ${totalHexLiterals} 64-hex literals in ${sourceLabel}.\n` +
        'Every one is assumed to be a pinned hash, so the two counts must agree. Either:\n' +
        '  - a pinned hash is formatted in a way the patterns here do not match, and ' +
        'would have been left stale without warning: widen them; or\n' +
        '  - the file gained a 64-hex literal that is not a pin: narrow the count above ' +
        'so it stops being mistaken for one.'
    );
  }

  // The checks above only see pins that exist. A workflow added to the registry
  // but never pinned is invisible to them AND to the parity test, which compares
  // only the entries it already lists - so it would ship with no golden hash at
  // all while this reported success. Compare the other direction too.
  const unpinned = [...knownContentKeys].filter((key) => !seenContentKeys.has(key));
  if (unpinned.length > 0) {
    throw new Error(
      `getSkillTemplates() returns ${unpinned.length} skill(s) with no pinned hash in ${sourceLabel}:\n` +
        unpinned.map((key) => `  ${key}`).join('\n') +

View on GitHub (pinned to 6926ccb18a)

When it happens

Trigger: Thrown at scripts/parity-hash-shared.mjs:84 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/bb91f0297a04156c. Report an issue: GitHub.