By 上村十勝 (Tokachi Kamimura).
A collection of signed AI records can be internally consistent and still fail the review you intended to perform. One reason is that the submitter may have changed what counts as a complete collection.
This tutorial uses the experimental vap-interop-demo/0.2.0 package in the VAP repository to reproduce that distinction. First, run eight committed fixtures. Then keep a reduced, re-signed pack unchanged and change only the verifier's scope pin: the result changes from FAIL to PASS.
That is a demonstration of the trust-input boundary. It is not a signature forgery, a production exploit, or a VAP conformance test.
日本語概要:上村十勝が、VAPリポジトリの実験用検証器を使い、署名・監査対象の範囲・記録の欠落を切り分けます。掲載結果は合成データによるローカル実験です。
What is being verified?
VAP — Verifiable AI Provenance Framework defines requirements for reviewing recorded AI decisions after the fact. The framework specification is v1.2.0 Draft 3 at the source revision used here.
The interoperability demo is a separate, first-party experimental contract. Its flat events and demo receipts are not the framework's abstract event and AnchorRecord formats. Its attempt/outcome rule is a local scenario choice, not a universal VAP completeness requirement.
The primary fixture describes two fictional attempts:
- One records
DENIED_AUTOMATIONand requests human review. - One records
APPROVED.
Both belong in the valid pack. A verification PASS means that the submitted evidence satisfies the demo contract; it does not mean that every action was approved or that a real action occurred.
The seven checks behind PASS
The Python verifier reports these checks on success:
| Check | Question answered within this demo |
|---|---|
contract-and-shape | Do the inputs use the supported contract, exact fields and restricted JSON values? |
pinned-scope | Does the scope digest match the separately supplied trust configuration? |
event-signatures | Do event hashes and signatures verify under the configured producer key? |
sequence-and-scope | Are IDs unique, sequence numbers contiguous, and supplied chain, policy and times within scope? |
rfc6962-root | Does the recomputed Merkle root match the submitted root? |
role-receipts | Do the configured producer, observer and anchor records bind the same root, scope and count? |
attempt-outcome-bijection | Does each declared attempt have one later outcome, with the expected number of distinct attempts? |
The serialization contract is DEMO-ASCII-SAFEINT-JSON-v1: printable ASCII strings and bounded integers, with duplicate keys and floating-point number tokens rejected. It is not support for the entire RFC 8785 input domain. The six-event positive fixture also exercises an RFC 6962 tree whose leaf count is not a power of two.
Reproduce the fixed fixtures
Use a new directory for the checkout:
git clone https://github.com/veritaschain/vap-spec.git vap-scope-demo cd vap-scope-demo git checkout --detach 2a18ae7c77a4afcb7468345db2424076530c7630 cd interop/vap-evidence-pack-demo python3 -m venv .venv . .venv/bin/activate python -m pip install -r requirements.txt The local run reported here used macOS 27.2.1, Python 3.14.3 and cryptography 50.0.2 on 28 November 2026. Upstream documents Python 3.12 and Node.js 24; this article reports a Python-only run with the stated Python-version difference.
Save the following as check_article.py beside verify_python.py. It verifies the ten fixture/trust files against the committed manifest before running the eight cases. It also distinguishes a missing file from rejected evidence.
import hashlib import json from pathlib import Path import subprocess import sys import tempfile root = Path(__file__).resolve().parent vectors = root / "test-vectors" manifest = json.loads((vectors / "manifest.json").read_text()) for name, expected in manifest["files"].items(): data = (vectors / name).read_bytes() if len(data) != expected["bytes"] or hashlib.sha256(data).hexdigest() != expected["sha256"]: raise RuntimeError(f"Fixture bytes changed: {name}") results = [] def run(pack, trust, expected_verdict, expected_exit, label): proc = subprocess.run( [sys.executable, str(root / "verify_python.py"), str(pack), "--trust", str(trust), "--json"], text=True, capture_output=True, check=False) try: report = json.loads(proc.stdout) except json.JSONDecodeError as exc: raise RuntimeError(f"{label}: verifier did not return JSON; exit={proc.returncode}, stderr={proc.stderr}") from exc if proc.returncode != expected_exit or report.get("verdict") != expected_verdict: raise RuntimeError(f"{label}: unexpected result: {proc.returncode}, {report}") results.append({"case": label, "exit": proc.returncode, **report}) print(f"{label}: {report['verdict']} / exit {proc.returncode}") for case in manifest["vectors"]: run(vectors / case["pack"], vectors / case["trust"], case["expected_verdict"], case["expected_exit_code"], case["pack"]) with tempfile.TemporaryDirectory(prefix="vap-scope-test-") as directory: temp = Path(directory) run(temp / "does-not-exist.json", vectors / "demo-trust.json", "ERROR", 2, "missing file") pack = json.loads((vectors / "invalid-rebound-scope.json").read_text()) trust = json.loads((vectors / "demo-trust.json").read_text()) # Deliberately unsafe: this demonstrates why the caller must authenticate trust input. trust["scope_commitment"] = pack["scope_commitment"] substituted = temp / "substituted-trust.json" substituted.write_text(json.dumps(trust), encoding="utf-8") run(vectors / "invalid-rebound-scope.json", vectors / "demo-trust.json", "FAIL", 1, "rebound scope / original trust") run(vectors / "invalid-rebound-scope.json", substituted, "PASS", 0, "rebound scope / substituted trust") (root / "observed-results.json").write_text(json.dumps(results, indent=2)+"\n") Run it:
python check_article.py Observed output:
valid-pack.json: PASS / exit 0 valid-six-events.json: PASS / exit 0 invalid-tampered-event.json: FAIL / exit 1 invalid-omitted-outcome.json: FAIL / exit 1 invalid-split-view.json: FAIL / exit 1 invalid-omitted-pair.json: FAIL / exit 1 invalid-rebound-scope.json: FAIL / exit 1 invalid-untrusted-signer.json: FAIL / exit 1 missing file: ERROR / exit 2 rebound scope / original trust: FAIL / exit 1 rebound scope / substituted trust: PASS / exit 0 The script writes the complete verifier reports, including error messages, to observed-results.json. Fixture bytes were checked against the manifest, and the retrieved source files were checked against their Git blob IDs at the pinned commit.
The manifest's SHA-256 in this run was:
bc05d2de41f713b8a19110bcfde864b44e2beaccebf3108d59a0611750262953 A digest fixes the bytes being discussed. It does not, by itself, authenticate whoever supplied those bytes.
Why the scope substitution passes
The invalid-rebound-scope.json fixture reduces the submitted collection and changes the declaration to fit it. The fixture generator rebuilds and re-signs that collection with the public test keys.
With the original trust file, the verifier rejects it:
scope does not match the caller's pinned commitment The final experiment deliberately copies the pack's scope_commitment into a temporary trust file. The keys stay unchanged, and the pack stays unchanged. The verifier now accepts the pack relative to the replacement declaration.
Do not derive the trusted scope from the pack in an actual integration. This line is deliberately unsafe:
trust["scope_commitment"] = pack["scope_commitment"] It turns a caller-selected expectation into a value chosen by the submitter. Passing all later signature, root and pairing checks cannot repair that loss.
The separate file boundary alone is also insufficient: an integration must establish why its selected trust configuration is acceptable, who can change it, and how the expected scope was determined. This demo does not implement that approval process or prove that a declaration existed before the recorded events.
Omission checks answer different questions
The two omission fixtures are useful because the remaining collection is rebuilt and re-signed:
- Missing outcome: an attempt remains without the one later outcome required by this scenario.
- Missing pair: the remaining attempts each have outcomes, but there are fewer distinct attempts than the pinned declaration expects.
An application that checks only surviving signatures misses both kinds of inconsistency. An application that checks only matching attempt/outcome IDs misses the second.
The expected count is still an input assumption. Neither fixture establishes an inventory of all real activity. An action that no available record implies cannot be recovered from this dataset.
Keep rejection separate from an operational error
For this CLI, the contract distinguishes:
| Result | Exit | Meaning |
|---|---|---|
PASS | 0 | All checks for this experimental contract succeeded |
FAIL | 1 | Pack or trust input violates the contract |
ERROR | 2 | Usage or file access prevented evaluation |
A negative test must require FAIL and exit 1. Treating every nonzero exit as a successful rejection would let a missing fixture pass the test. The harness checks both values.
Argument-parsing errors, such as omitting --trust, exit 2 before a JSON report is produced. The harness therefore treats missing or invalid JSON as an execution problem, not as a detected evidence defect.
What this run does not establish
All three demo private keys are public. The observer and anchor are simulated roles, and DEMO_ANCHOR_RECEIPT is a signed fixture, not a receipt from an external service. Supplied timestamps are checked for consistency; they do not provide trusted time.
These results demonstrate behavior of the unmodified reference verifier on named synthetic inputs. They do not establish real-world signer identity, independent observation, production anchoring, complete capture, VAP/profile conformance, or the correctness of an AI decision. No Node.js execution or full upstream test-suite run is claimed here.
The framework's anchor-granularity omission boundary is discussed separately in VAP v1.2 §4.1.7 and §11.1. The demo's pairing rule must not be presented as proof of those framework requirements.
Author and preparation
上村十勝 (Tokachi Kamimura) is the founder of VSO and Representative Director of VeritasChain Co., Ltd., which operates VSO. This is an affiliated, first-party demonstration using published reference code, not an independent validation. Official author profile.
This article and its test harness were prepared by an AI assistant. The assistant checked the cited source revision and executed the reported local tests; no independent human review is claimed.