Skip to main content

CLI Testing & Verification

The VeriSynth CLI was designed for trust — every run can be verified, reproduced, and audited without ever exposing sensitive data. This guide explains how to:
  • Test VeriSynth locally
  • Verify your proof receipts
  • Reproduce a run deterministically
  • Debug unexpected differences

1. Verify Installation

After installation, confirm that the CLI is available:
verisynth --version
Expected output:
VeriSynth Core v0.1.0
Run the built-in help command:
verisynth --help
If both commands succeed, your environment is ready.

2. Generate a Test Dataset

Use the included demo dataset for a quick local test:
verisynth data/sample_patients.csv -o out/ --rows 1000 --seed 42
Output:
📁 out/synthetic.csv
🧾 out/proof.json
The CLI will also print a short summary:
VeriSynth — Synthetic Data Report
========================================
Input: data/sample_patients.csv
Output: out/synthetic.csv
Engine: GaussianCopula | Seed: 42
Fidelity: corr Δ=0.23 | Privacy risk=0.0
Proof: out/proof.json (Merkle verified)

3. Validate the Proof Receipt

Each run produces a JSON proof receipt (proof.json):
{
  "verisynth_version": "core-0.1.0",
  "input":  { "rows": 10, "sha256": "…82b7" },
  "output": { "rows": 1000000, "sha256": "…acb9" },
  "metrics": { "corr_mean_abs_delta": 0.12, "naive_reid_risk": 0.01 },
  "proof": "merkle_root: …c31"
}
To validate integrity:
  1. Compute your own SHA-256 hash of the input and output files.
  2. Compare them with the hashes inside proof.json.
  3. Verify that the Merkle root matches — if it does, your run is provably unchanged.
(The upcoming verisynth verify command will automate this.)

4. Test Reproducibility

Because VeriSynth uses deterministic seeding, identical runs will produce identical proofs and Merkle roots. Try it:
verisynth data/sample_patients.csv -o out1/ --rows 1000 --seed 42
verisynth data/sample_patients.csv -o out2/ --rows 1000 --seed 42
Compare both proofs:
diff out1/proof.json out2/proof.json
Expected:
(no differences)
This confirms full reproducibility — a cornerstone of VeriSynth’s trust model.

5. Test Edge Cases

You can test various parameters to ensure consistent behavior:
ScenarioCommandExpected Result
Small input file--rows 100Completes instantly
Large output--rows 1000000Slower, but deterministic
Custom output path--proof out/custom_proof.jsonProof saved to custom path
Invalid pathwrong fileClean error message (exit code 1)

6. Exit Codes

The CLI provides predictable exit codes for scripting and CI/CD.
CodeMeaning
0Success
1Invalid input or missing file
2Model synthesis error
3Proof verification failed
4I/O or permission issue

7. Continuous Integration (CI/CD)

You can run VeriSynth tests automatically as part of your pipeline. Example GitHub Action:
name: Test
on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: '3.11'
      - run: pip install -r requirements.txt
      - run: pip install pytest pytest-cov
      - run: pytest --cov=verisynth

8. Debugging Tips

IssueCauseFix
CLI not foundPATH not updatedReinstall with pip install -e .
Permission deniedOutput folder restrictedUse --output in a writable directory
Metrics missingProof disabledRemove --no-proof flag
Non-deterministic outputDifferent seeds or model versionsUse --seed consistently

Summary

CLI testing in VeriSynth confirms three pillars of trust:
  1. Reproducibility — identical seeds = identical outputs
  2. Integrity — proof receipts and Merkle roots verify correctness
  3. Privacy — synthetic data is generated without copying real data