ruvnet/ruflo · error

Unsupported temporal store version: ${data.version} (expecte

Error message

Unsupported temporal store version: ${data.version} (expected ${SERIALIZATION_VERSION})

What it means

Thrown by TemporalStore.importAssertions(data) when the serialized payload's version field does not equal the module's SERIALIZATION_VERSION. The export format is versioned on purpose: incompatible payloads are rejected up front rather than silently mis-parsed, because importAssertions clears and replaces the entire store contents. It protects against restoring data produced by a different release of @claude-flow/guidance.

Source

Thrown at v3/@claude-flow/guidance/src/temporal.ts:540

      assertions.push({ ...assertion, metadata: { ...assertion.metadata } });
    }

    return {
      assertions,
      createdAt: new Date().toISOString(),
      version: SERIALIZATION_VERSION,
    };
  }

  /**
   * Import previously exported assertions, replacing all current contents.
   *
   * @param data - Serialized store data
   * @throws If the version is unsupported
   */
  importAssertions(data: SerializedTemporalStore): void {
    if (data.version !== SERIALIZATION_VERSION) {
      throw new Error(
        `Unsupported temporal store version: ${data.version} (expected ${SERIALIZATION_VERSION})`,
      );
    }

    this.assertions.clear();
    const now = Date.now();

    for (const assertion of data.assertions) {
      const imported: TemporalAssertion = {
        ...assertion,
        tags: [...assertion.tags],
        metadata: { ...assertion.metadata },
      };
      imported.status = computeStatus(imported, now);
      this.assertions.set(imported.id, imported);
    }
  }

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Re-export the assertions from a store running the same package version as the importer
  2. Pin the @claude-flow/guidance version identically across every producer and consumer of the export
  3. If you control both ends, write a one-time migration that rewrites the old payload to the current version field before importing

Example fix

// before
store.importAssertions(JSON.parse(rawFileContents)); // old snapshot -> version mismatch

// after
const data = JSON.parse(rawFileContents);
const currentVersion = 1; // must equal the exporter's SERIALIZATION_VERSION
if (data.version !== currentVersion) {
  throw new Error(`snapshot is v${data.version}; re-export with the current guidance version`);
}
store.importAssertions(data);
Defensive patterns

Strategy: validation

Validate before calling

// Verify the payload version before mutating the store
const data = JSON.parse(raw) as SerializedTemporalStore & { version: number };
const exporterVersion = data.version;
if (exporterVersion !== importerVersion) {
  throw new Error(`snapshot v${exporterVersion} != importer v${importerVersion}; re-export or migrate`);
}
store.importAssertions(data);

Type guard

function isCompatibleSnapshot(
  v: number,
): (d: unknown) => d is SerializedTemporalStore {
  return (d): d is SerializedTemporalStore =>
    typeof d === 'object' && d !== null && (d as { version?: unknown }).version === v;
}

Try / catch

try {
  store.importAssertions(data);
} catch (e) {
  if (e instanceof Error && e.message.includes('Unsupported temporal store version')) {
    // store is untouched (throw happens before clear()) — safe to migrate and retry
    store.importAssertions(migrateTemporal(data));
    return;
  }
  throw e;
}

Prevention

When it happens

Trigger: Passing JSON from store.exportAssertions() that was produced by an older or newer build of the guidance package — e.g. restoring a persisted snapshot after an upgrade, or importing a blob shared between services running different versions.

Common situations: Upgrading @claude-flow/guidance across a serialization bump and replaying old backups; mixed-version fleets where one node exports and another imports; hand-edited or truncated export files; snapshots created in dev and loaded in a container built from a different base image.

Related errors


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/126be28e56ff9c1b. Report an issue: GitHub.