|
1 | 1 | # Tests |
2 | 2 |
|
3 | 3 | This folder contains the canonical TC1 specification and a recorded MGS |
4 | | -dry-run that exercises the full policy lifecycle. |
| 4 | +dry-run that exercises the full policy lifecycle against the current |
| 5 | +`VMR0015.policy` build. |
5 | 6 |
|
6 | 7 | ## Files |
7 | 8 |
|
8 | 9 | | File | Purpose | |
9 | 10 | |---|---| |
10 | 11 | | `tc1_expected.json` | Canonical TC1 input/output specification — the oracle every other artefact reproduces | |
11 | | -| `tc1_full_lifecycle.record` | Recorded MGS dry-run (role choice → PP profile → project creation → monitoring report → VVB approve → owner approve → mint) | |
| 12 | +| `tc1_full_lifecycle.record` | Recorded MGS dry-run (role choice → PP profile → project registration → monitoring report → water-quality block → VVB validation → VVB verification → owner confirmation) | |
12 | 13 |
|
13 | 14 | Expected outcomes match [`../evidence/CANONICAL_TC1.md`](../evidence/CANONICAL_TC1.md): |
14 | 15 | `ER_total = 10.00 tCO₂e` → mint **1000 base units** (= 10.00 CER, decimals = 2) |
15 | 16 | on token `0.0.8865898`. |
16 | 17 |
|
17 | | -## Honest note on the binary fixture |
| 18 | +## About the recording |
18 | 19 |
|
19 | | -`tc1_full_lifecycle.record` was recorded against an earlier build of the |
20 | | -policy that used a 1000-household input set. The canonical TC1 input set in |
21 | | -`tc1_expected.json` (200 HH, `f_woody = 0.60`, `wq_pass_rate = 0.98`, |
22 | | -expected mint = 1000 base units) is the single source of truth. The |
23 | | -recording will be re-captured against the current `VMR0015.policy` build |
24 | | -(with the `wq < 0.95` hard gate and dormant `calculate_project_fields` |
25 | | -removed) before the v1.0.0 tag is cut; until then, prefer the oracle path: |
| 20 | +`tc1_full_lifecycle.record` is an MGS dry-run recording captured against |
| 21 | +the current `VMR0015.policy` build (with the `wq < 0.95` hard gate active |
| 22 | +in `customLogicBlock.calculate_report_fields` and the dormant |
| 23 | +`calculate_project_fields` block removed). It walks the institutional-pilot |
| 24 | +lifecycle end to end, including the water-quality (`wqrequest`) block, so |
| 25 | +reviewers can verify the math-layer wq-gate is exercised. |
| 26 | + |
| 27 | +## Oracle (preferred reproducibility path) |
26 | 28 |
|
27 | 29 | ```bash |
28 | 30 | python3 tools/verify_oracle.py |
29 | 31 | ``` |
30 | 32 |
|
31 | | -This re-runs the canonical TC1 inputs against a Python port of the policy |
32 | | -math and returns `Result : PASS` if the math layer is consistent with the |
33 | | -specification. |
| 33 | +This re-runs the canonical TC1 inputs (200 HH, `f_woody = 0.60`, |
| 34 | +`wq_pass_rate = 0.98`) against a Python port of the policy math and |
| 35 | +returns `Result : PASS` if the math layer is consistent with the |
| 36 | +specification (BE = 12.00, PE = 1.00, LE = 1.00, ER = 10.00, |
| 37 | +mint_base_units = 1000). |
34 | 38 |
|
35 | 39 | ## To replay the recorded fixture |
36 | 40 |
|
37 | 41 | 1. Import `VMR0015.policy` into a fresh MGS instance. |
38 | 42 | 2. Open the policy in Test mode. |
39 | 43 | 3. Load `tc1_full_lifecycle.record`. |
40 | | -4. Run; the recording exercises the full lifecycle. The legacy mint |
41 | | - amount will reflect the older 1000-HH input set, not the canonical TC1 |
42 | | - inputs in `tc1_expected.json`. |
| 44 | +4. Run; the recording exercises the full lifecycle including the |
| 45 | + water-quality block. |
43 | 46 |
|
44 | 47 | ## To produce a fresh canonical-TC1 recording |
45 | 48 |
|
|
0 commit comments