|
1 | 1 | { |
2 | 2 | "spec_version": "0.3.0", |
3 | 3 | "id": "pricing/apply_tax", |
4 | | - "intent": "Add sales tax to a subtotal using a rate expressed as a decimal fraction.", |
| 4 | + "intent": "Add sales tax to a subtotal using a rate expressed as a decimal fraction and round the total.", |
5 | 5 | "contract": { |
6 | 6 | "inputs": [ |
7 | 7 | { |
|
18 | 18 | "output >= subtotal" |
19 | 19 | ] |
20 | 20 | }, |
21 | | - "deps": [], |
| 21 | + "deps": [ |
| 22 | + "money/round" |
| 23 | + ], |
22 | 24 | "local_tests": [ |
23 | 25 | { |
24 | 26 | "id": "basic_tax", |
25 | 27 | "expect": "apply_tax(Decimal::new(10000, 2), Decimal::new(725, 4)) == Decimal::new(10725, 2)" |
26 | 28 | } |
27 | 29 | ], |
28 | | - "generated_at": "2026-05-10T18:20:36Z", |
| 30 | + "generated_at": "2026-05-10T23:08:46Z", |
29 | 31 | "source_file": "examples/ecommerce/units/pricing/apply_tax.unit.spec", |
30 | 32 | "evidence": { |
31 | 33 | "build_status": "pass", |
|
35 | 37 | "status": "pass" |
36 | 38 | } |
37 | 39 | ], |
38 | | - "observed_at": "2026-05-10T18:04:50Z", |
| 40 | + "observed_at": "2026-05-10T23:07:06Z", |
39 | 41 | "provenance": { |
40 | | - "git_commit_sha": "50d8a9f43c1085b5c5a2f2bc86028f812a0413cb" |
| 42 | + "git_commit_sha": "467ebd3bd1c2de1d932cddc47cca2ff08c93a1a5" |
41 | 43 | } |
42 | 44 | }, |
43 | 45 | "freshness_anchor": { |
44 | | - "authored_truth_digest": "sha256:da0c3d9983aff0c88a432a263f93d0a7f912dd92d50dc6a74d168669a5ebdf28" |
| 46 | + "authored_truth_digest": "sha256:2c618f123ec6666dae4be1c4cc9da04022c9985cf6bfdb7b1b2071d1c0af83fe" |
45 | 47 | }, |
46 | 48 | "freshness": { |
47 | | - "authored_truth_digest": "sha256:da0c3d9983aff0c88a432a263f93d0a7f912dd92d50dc6a74d168669a5ebdf28", |
| 49 | + "authored_truth_digest": "sha256:2c618f123ec6666dae4be1c4cc9da04022c9985cf6bfdb7b1b2071d1c0af83fe", |
48 | 50 | "authored_truth_status": "fresh", |
49 | 51 | "backend_execution_status": "unknown" |
50 | 52 | }, |
|
58 | 60 | "status": "pass" |
59 | 61 | } |
60 | 62 | ], |
61 | | - "observed_at": "2026-05-10T18:04:50Z", |
| 63 | + "observed_at": "2026-05-10T23:07:06Z", |
62 | 64 | "provenance": { |
63 | | - "git_commit_sha": "50d8a9f43c1085b5c5a2f2bc86028f812a0413cb" |
| 65 | + "git_commit_sha": "467ebd3bd1c2de1d932cddc47cca2ff08c93a1a5" |
64 | 66 | } |
65 | 67 | }, |
66 | 68 | "freshness_anchor": { |
67 | | - "authored_truth_digest": "sha256:da0c3d9983aff0c88a432a263f93d0a7f912dd92d50dc6a74d168669a5ebdf28" |
| 69 | + "authored_truth_digest": "sha256:2c618f123ec6666dae4be1c4cc9da04022c9985cf6bfdb7b1b2071d1c0af83fe" |
68 | 70 | }, |
69 | 71 | "freshness": { |
70 | | - "authored_truth_digest": "sha256:da0c3d9983aff0c88a432a263f93d0a7f912dd92d50dc6a74d168669a5ebdf28", |
| 72 | + "authored_truth_digest": "sha256:2c618f123ec6666dae4be1c4cc9da04022c9985cf6bfdb7b1b2071d1c0af83fe", |
71 | 73 | "authored_truth_status": "fresh", |
72 | 74 | "backend_execution_status": "unknown" |
73 | 75 | } |
|
81 | 83 | "status": "pass" |
82 | 84 | } |
83 | 85 | ], |
84 | | - "observed_at": "2026-05-10T18:20:36Z", |
| 86 | + "observed_at": "2026-05-10T23:08:46Z", |
85 | 87 | "provenance": { |
86 | | - "git_commit_sha": "50d8a9f43c1085b5c5a2f2bc86028f812a0413cb" |
| 88 | + "git_commit_sha": "467ebd3bd1c2de1d932cddc47cca2ff08c93a1a5" |
87 | 89 | } |
88 | 90 | }, |
89 | 91 | "freshness_anchor": { |
90 | | - "authored_truth_digest": "sha256:2895a88bccd94874e9d7e28666fbe9194862c5a71e43b1a1bdc9e2bcb855b1f8" |
| 92 | + "authored_truth_digest": "sha256:b6f56171141034c8a8455d90fca10ee1d2ca923c4a7210f1bdc939e538d8e1ac" |
91 | 93 | }, |
92 | 94 | "freshness": { |
93 | | - "authored_truth_digest": "sha256:2895a88bccd94874e9d7e28666fbe9194862c5a71e43b1a1bdc9e2bcb855b1f8", |
| 95 | + "authored_truth_digest": "sha256:b6f56171141034c8a8455d90fca10ee1d2ca923c4a7210f1bdc939e538d8e1ac", |
94 | 96 | "authored_truth_status": "fresh", |
95 | 97 | "backend_execution_status": "unknown" |
96 | 98 | } |
|
104 | 106 | "authored_surfaces": [ |
105 | 107 | { |
106 | 108 | "path": "intent.why", |
107 | | - "summary": "Add sales tax to a subtotal using a rate expressed as a decimal fraction." |
| 109 | + "summary": "Add sales tax to a subtotal using a rate expressed as a decimal fraction and round the total." |
108 | 110 | }, |
109 | 111 | { |
110 | 112 | "path": "contract.inputs", |
|
118 | 120 | "path": "contract.invariants", |
119 | 121 | "summary": "1 authored invariant(s)" |
120 | 122 | }, |
| 123 | + { |
| 124 | + "path": "deps", |
| 125 | + "summary": "1 declared dep(s)" |
| 126 | + }, |
121 | 127 | { |
122 | 128 | "path": "body.typescript", |
123 | 129 | "summary": "authored TypeScript body present" |
|
0 commit comments