Skip to content

docs: document v2 integration and the v1/v2 migration runbook - #90

Merged
collinsezedike merged 2 commits into
mainfrom
docs/v2-integration-migration-runbook
Aug 13, 2026
Merged

docs: document v2 integration and the v1/v2 migration runbook#90
collinsezedike merged 2 commits into
mainfrom
docs/v2-integration-migration-runbook

Conversation

@collinsezedike

Copy link
Copy Markdown
Collaborator

Summary

Implements #73: consumer bindings documentation and the v1/v2 migration runbook.

  • docs/src/INTEGRATION.md: a new "Tholos v2" section, since everything in this doc before it is implicitly v1. Covers the v2 function-by-function lifecycle (assert_outcome through withdraw, set_paused_v2, cancel_round), why an assertion's identity is now (contract_id, assertion_id) rather than a bare id (v1 and v2 each have their own independent NextId counter, so both can issue id 0), and three explicit known gaps: no canonical v2 testnet deployment yet, packages/tholos-sdk targets v1's wasm only, and demos/freelance-escrow still talks to v1 directly.
  • docs/src/V2_MIGRATION.md (new): the coexistence runbook. Explains why there's no automated migration (v1 has no upgrade entry point, no state importer, and a bond locked in an open v1 dispute can't move contracts without changing who's liable for it), then walks through inventorying an existing v1 deployment (v1 exposes no config/version/NextId getter, so this means reconstructing state from deployment transactions and event history), deploying v2 fresh without copying v1's records or pooled balance, cutting new traffic over from a recorded point, and draining v1's remaining open assertions to completion. Explicitly calls out not pausing v1 during drain, since set_paused blocks dispute/resolve together while leaving finalize callable, which is exactly the "pause as an unsafe migration switch" risk DEPLOYMENT.md's existing admin runbook section already warns about.

Not in scope here, per the issue's own "or note as a follow-up" allowance: demos/freelance-escrow isn't touched, since it's a separate follow-up once v2 is actually live (noted explicitly in both new docs rather than left implicit).

One process note: issue #72 (TTL policy, also listed as a dependency-adjacent v2 issue) already had an unanswered assignment request from an external contributor, so I assigned it to them and picked this issue up instead rather than taking it myself.

Test plan

  • mdbook build docs passes locally, including the new V2_MIGRATION.md page and its SUMMARY.md entry
  • cargo fmt --check / cargo clippy / cargo test — not applicable, this PR touches only docs/src/*.md, no Rust
  • CONTRACT.md updated if the public interface changed — not applicable, no interface changes; tholos-v2 still isn't documented in CONTRACT.md (tracked separately, as noted in prior v2 PRs)
  • scripts/testnet-smoke.sh — not applicable, docs-only
  • What you manually verified: checked every internal link/anchor added (INTEGRATION.md#tholos-v2, DEPLOYMENT.md#pausing-during-an-incident, etc.) resolves to a real heading, and confirmed issue [Feature] Migrate demo app to the generated Tholos TS SDK bindings #63 (demo-app SDK migration) is actually about the v1 TS SDK, not a v1-to-v2 migration, so it isn't miscited as the demo-app follow-up here.

@collinsezedike
collinsezedike merged commit a1bcd03 into main Aug 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant