vdelta 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +41 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,14 +16,14 @@ another" — a verification delta can, and when two runs are not comparable it
16
16
  **abstains instead of guessing**.
17
17
 
18
18
  - Runner support (MVP): **vitest v4** (native reporter, structured channel only)
19
- - Zero runtime dependencies; Node ≥ 20
19
+ - Zero runtime dependencies; Node ≥ 22
20
20
  - Machine-verified against the [conformance suite](conformance/) —
21
- 41 fixtures covering the spec's invariants, adversarial inputs, and a
21
+ 42 fixtures covering the spec's invariants, adversarial inputs, and a
22
22
  10-mutation cheating corpus with 100% detection recall
23
23
 
24
24
  ## Quickstart (5 minutes)
25
25
 
26
- Requires Node 20+ inside a git repository.
26
+ Requires Node 22+ inside a git repository.
27
27
 
28
28
  ```bash
29
29
  npm i -D vitest vdelta
@@ -107,6 +107,43 @@ runs / 64MiB, overridable via `VDELTA_GC_MAX_COUNT` / `VDELTA_GC_MAX_BYTES`
107
107
  (positive integers; unset/invalid falls back to the default, `0` or
108
108
  non-numeric disables that limit).
109
109
 
110
+ ## Report compatibility & exit codes
111
+
112
+ ### `schema_version` backward compatibility
113
+
114
+ Every report carries exactly one `schema_version`, `"veridelta/1"`
115
+ (spec [§14](spec/veridelta-1.md#14-versioning-and-extensibility)). Within
116
+ `/1` this is a closed contract:
117
+
118
+ - The enums defined for `/1` (verdicts, comparability reasons, transition
119
+ kinds, etc.) are **closed** — a new enum value requires a new schema
120
+ version, never a silent addition to `/1`.
121
+ - Fields are added to `/1` only through a published spec revision; nothing
122
+ else is a conforming way to extend the contract.
123
+ - Consumers **MUST** treat an unknown enum value as a hard error (throw).
124
+ Silently skipping it, or falling back to a default, is non-conforming
125
+ (spec [§9.4](spec/veridelta-1.md#94-consumer-requirements)).
126
+ - Consumers SHOULD reject unknown fields rather than reinterpret them
127
+ (spec §9.4, §14).
128
+
129
+ ### Exit codes
130
+
131
+ | Command | Exit code |
132
+ |---|---|
133
+ | `vdelta run` | The child process's exit code, passed through unchanged. Internal errors degrade to raw passthrough (INV-5) — vdelta is never worse than its absence. |
134
+ | `vdelta compare` | `0` when the comparison operation itself succeeded — an `inconclusive` result (e.g. no baseline) is a successful comparison and still exits `0`, with a deterministic JSON report on stdout. `1` only on operation failure. |
135
+ | `vdelta gate` | `policy` is a closed enum (spec [§11.1](spec/veridelta-1.md#111-policies-and-the-reporting-floor)), but only `report-only` is implemented in this MVP: `0` once a report is produced, regardless of verdict, and `2` only when no report could be produced. `blocking` (`1` on a gate-relevant transition, `2` on inconclusive/error) and `advisory` (same codes as `blocking`, but marking `policy: advisory` in the report) are the spec §11.1 contract for a **future** release — the current CLI rejects both with exit `2` ("not implemented in this MVP"). |
136
+
137
+ ### Baseline-missing `compare`
138
+
139
+ When there is no baseline to compare against, `vdelta compare --report json`
140
+ returns a deterministic `inconclusive` report — `comparability: none`,
141
+ `comparability_detail: { "reason": "baseline-missing", "kind": "determined" }`
142
+ — and exits `0`, because determining "nothing to compare yet" is itself a
143
+ successful comparison. The INV-1 floor still holds: red results in the
144
+ current run are disclosed via `current.red` (spec §5.7) even though there is
145
+ no baseline to diff against.
146
+
110
147
  ## What the report separates (and why)
111
148
 
112
149
  Three axes, never collapsed into one:
@@ -188,7 +225,7 @@ intended success mode.
188
225
 
189
226
  ```bash
190
227
  npm test # unit + full conformance suite
191
- npm run test:conformance # the 41-fixture suite only
228
+ npm run test:conformance # the 42-fixture suite only
192
229
  ```
193
230
 
194
231
  The suite is authored independently of this implementation (the fixture
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vdelta",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Reference implementation of veridelta/1 — proof-carrying verification deltas for coding-agent development loops",
5
5
  "license": "MIT",
6
6
  "repository": {