#!/usr/bin/env bash
# Deposit-flight playbook, step 13: recompute the published result yourself.
set -euo pipefail

: "${TESSERA_API_BASE:?e.g. https://api.staging.tessera.zone/v1}"
: "${TESSERA_API_KEY:?the tsk_ key of this project}"
: "${TESSERA_REPO_ROOT:?a checkout of the Tessera repository (for the schemas)}"
: "${TESSERA_STATE_DIR:?set by the runner; ids are handed between steps}"

tessera-doctest recompute \
  --document "$TESSERA_STATE_DIR/deposit-flight-published-results.json" \
  --repo-root "$TESSERA_REPO_ROOT"
