From c02d91d453fbca78896318e5a324080a976974a6 Mon Sep 17 00:00:00 2001 From: OpenCode Date: Tue, 7 Jul 2026 10:50:34 +0700 Subject: [PATCH] Add synthetic data and toy fixture policy Closes #457 - docs/evidence/SYNTHETIC_DATA_POLICY.md -- defines toy, synthetic, and real data; labeling requirements; allowed/forbidden use; quarantine rules - 5 tests --- docs/evidence/SYNTHETIC_DATA_POLICY.md | 58 ++++++++++++++++++++++++++ tests/test_synthetic_data_policy.py | 29 +++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 docs/evidence/SYNTHETIC_DATA_POLICY.md create mode 100644 tests/test_synthetic_data_policy.py diff --git a/docs/evidence/SYNTHETIC_DATA_POLICY.md b/docs/evidence/SYNTHETIC_DATA_POLICY.md new file mode 100644 index 00000000..3fb8906c --- /dev/null +++ b/docs/evidence/SYNTHETIC_DATA_POLICY.md @@ -0,0 +1,58 @@ +# Synthetic Data and Toy Fixture Policy + +## Purpose + +Synthetic data and toy fixtures are essential for testing, demonstration, +and workflow development. They must never be mistaken for real biological +evidence. + +## Definitions + +| Term | Meaning | Example | +|------|---------|---------| +| **Toy fixture** | Minimal dataset shipped with the repo for demo/testing | `examples/sequences/demo_candidates.csv` | +| **Synthetic data** | Programmatically generated data mimicking real outputs | `examples/lab_results_generator.py` output | +| **Real data** | Data from qualified wet-lab experiments | — (none yet) | + +## Labeling Requirements + +Every synthetic or toy data file MUST contain a clear label: + +- **CSV/JSONL files**: Include a `disclaimer` or `source` field with `SYNTHETIC` or `demo`. +- **JSON files**: Include `"disclaimer": "SYNTHETIC — replace with real data"`. +- **Scripts generating synthetic data**: Output MUST include a disclaimer in every file. + +## Allowed Use + +- CI/CD testing and regression detection +- Developer onboarding and demonstration +- Workflow prototyping and integration testing +- Benchmark development (when labeled separately from real benchmarks) +- Documentation examples + +## Forbidden Use + +- Representing synthetic results as biological evidence +- Including synthetic data in publication support packages without clear labeling +- Using toy fixtures to calibrate or tune production scorers +- Claiming proof-ladder advancement based on synthetic data + +## Quarantine + +Synthetic data files live in `examples/` or `outputs/` (git-ignored). +They are never stored in `data/` or `schemas/` to prevent accidental +inclusion in real-data workflows. + +## Relationship to Proof Ladder + +Synthetic data sits at **Level 0** (unvalidated). It cannot upgrade any +proof-ladder claim. A result demonstrated only on synthetic data must be +described as "demonstrated on synthetic data" with no implication of +biological validity. + +## Related Documents + +- `docs/evidence/EVIDENCE_CERTIFICATE.md` — certificate schema (disclaimer field) +- `docs/evidence/PROOF_LADDER.md` — evidence level definitions +- `docs/evidence/NEGATIVE_RESULT_ARCHIVE.md` — negative result handling +- `docs/trust/DATA_GOVERNANCE.md` — data licensing and governance diff --git a/tests/test_synthetic_data_policy.py b/tests/test_synthetic_data_policy.py new file mode 100644 index 00000000..572c2cfa --- /dev/null +++ b/tests/test_synthetic_data_policy.py @@ -0,0 +1,29 @@ +"""Tests for synthetic data policy doc.""" +from pathlib import Path + + +def test_file_exists(): + assert Path("docs/evidence/SYNTHETIC_DATA_POLICY.md").exists() + + +def test_has_definitions(): + text = Path("docs/evidence/SYNTHETIC_DATA_POLICY.md").read_text() + assert "Toy fixture" in text + assert "Synthetic data" in text + assert "Real data" in text + + +def test_has_allowed_use(): + text = Path("docs/evidence/SYNTHETIC_DATA_POLICY.md").read_text() + assert "Allowed Use" in text + + +def test_has_forbidden_use(): + text = Path("docs/evidence/SYNTHETIC_DATA_POLICY.md").read_text() + assert "Forbidden Use" in text + + +def test_disclaimer_required(): + text = Path("docs/evidence/SYNTHETIC_DATA_POLICY.md").read_text() + assert "SYNTHETIC" in text + assert "disclaimer" in text