Skip to content

Commit e8fbb01

Browse files
committed
ci(migration): add runtime contract marker validation
1 parent 34cf795 commit e8fbb01

3 files changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,35 @@ jobs:
2828

2929
- name: fmt
3030
run: cargo fmt --all -- --check
31+
32+
runtime-contract:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Checkout ternary-tools
36+
uses: actions/checkout@v4
37+
with:
38+
path: ternary-tools
39+
40+
- name: Checkout t81-vm
41+
uses: actions/checkout@v4
42+
with:
43+
repository: t81dev/t81-vm
44+
path: t81-vm
45+
ref: main
46+
47+
- name: Validate runtime contract marker
48+
run: |
49+
python3 - <<'PY'
50+
import json
51+
from pathlib import Path
52+
53+
repo = Path("ternary-tools/contracts/runtime-contract.json")
54+
vm = Path("t81-vm/docs/contracts/vm-compatibility.json")
55+
repo_contract = json.loads(repo.read_text(encoding="utf-8"))
56+
vm_contract = json.loads(vm.read_text(encoding="utf-8"))
57+
58+
if repo_contract.get("contract_version") != vm_contract.get("contract_version"):
59+
raise SystemExit("contract_version mismatch between ternary-tools and t81-vm")
60+
61+
print("runtime contract marker: ok")
62+
PY

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ MIT — because even in the ternary age, some things must remain balanced.
9898
## Migration integration
9999

100100
- Phase 2 checklist: `docs/phase2-inspection-checklist.md`
101+
- Runtime contract marker: `contracts/runtime-contract.json`
101102

102103
---
103104

contracts/runtime-contract.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"runtime_tag": "runtime-contract-v0.4",
3+
"contract_version": "2026-02-08-v4",
4+
"vm_main_pin": "fc9d55eba258aa2d17d7778e29e186f0bf62e2d8",
5+
"contract_source": "https://github.com/t81dev/t81-vm/blob/main/docs/contracts/vm-compatibility.json",
6+
"owner": "ternary-tools"
7+
}

0 commit comments

Comments
 (0)