meta:
  schema: gate-d-rollback-rehearsal.v1
  rehearsed_at: "2026-07-26"
  mode: local-in-memory
  external_mutation: false
  source_registry: source-registry.yml
  candidate_units: 131

deterministic_keys:
  asset: sha256(candidate_key)
  repository: [asset_id, source_locator]
  evidence: [asset_id, provenance, source_locator]

canary:
  first_run_created:
    assets: 1
    asset_repositories: 1
    asset_evidence: 1
  second_run_created:
    assets: 0
    asset_repositories: 0
    asset_evidence: 0
  second_run_updated:
    assets: 1
    asset_repositories: 1
    asset_evidence: 1
  duplicate_rows: 0
  result: pass

full_batch:
  first_run_created:
    assets: 131
    asset_repositories: 131
    asset_evidence: 131
  second_run_created:
    assets: 0
    asset_repositories: 0
    asset_evidence: 0
  second_run_updated:
    assets: 131
    asset_repositories: 131
    asset_evidence: 131
  duplicate_rows: 0
  result: pass

rollback:
  removed:
    assets: 131
    asset_repositories: 131
    asset_evidence: 131
  remaining:
    assets: 0
    asset_repositories: 0
    asset_evidence: 0
  result: pass

limitations:
  - This proves deterministic batch keys and inverse-plan behavior locally.
  - The approved Notion canary subsequently passed schema, relation, and idempotent-rerun checks.
  - The full Notion batch converged to 131 unique rows in each populated database.
  - The destructive archive branch remains rehearsed locally rather than invoked against the successful production batch.
  - Partial API failure was exercised by an interrupted start; the next deterministic run converged with three updates and no duplicates.
