@codacy/verity-cli 0.34.1-experimental.542af3d → 0.34.1-experimental.56274e2

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 (3) hide show
  1. package/README.md +38 -0
  2. package/bin/verity.js +765 -460
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -176,6 +176,13 @@ No re-setup needed: your token, Standard, and run history all carry over.
176
176
  | `verity reflect --kind decision` | Specify the node kind |
177
177
  | `verity memory untrack` | Stop committing `.verity/memory/` — the graph stays on disk and leaves your diffs |
178
178
  | `verity memory track` | Commit the graph on purpose, and record that so nothing offers to change it |
179
+ | **Formal verification** | |
180
+ | `verity config formal push` | Opt this checkout in: at push, one risky changed function may get a Lean model, checked and replayed (see below) |
181
+ | `verity config formal off` | Opt out again |
182
+ | `verity lean status` / `install` / `remove` | The managed Lean 4 toolchain the models are checked with (≈800 MB download, 2.7 GB on disk) |
183
+ | `verity prove candidates [paths]` | Rank the riskiest code from git history and shape signals, no model |
184
+ | `verity prove auto [files]` | Run the push-time phase by hand on the commits ahead of upstream |
185
+ | `verity prove waive <file> --reason "…"` | Dismiss a reproduced counterexample for these exact bytes; it returns if the file changes |
179
186
  | **Feedback** | |
180
187
  | `verity feedback message "text"` | Send general feedback |
181
188
  | `verity feedback message -` | Same, reading the message from stdin |
@@ -196,6 +203,37 @@ No re-setup needed: your token, Standard, and run history all carry over.
196
203
  | `/verity-memory` | Browse the knowledge graph |
197
204
  | `/verity-insights` | Quality metrics + Standard evolution |
198
205
  | `/verity-reflect` | Capture learnings after a task |
206
+ | `/verity-prove <worry>` | Formal verification on demand: pick a function together, model it in Lean, replay any counterexample on the real code |
207
+
208
+ ## Formal verification (opt-in)
209
+
210
+ At `git push`, beside the review, Verity can build a **small Lean 4 model of one
211
+ risky function in the change**, search every interleaving of its actions up to a
212
+ bound, and, when a property breaks, **replay the failing trace on the real code**
213
+ in a disposable container. Only a counterexample that reproduces on the real
214
+ code can block the push; a model's opinion alone never does.
215
+
216
+ **Most pushes get no formal check.** The phase runs only when the push touches a
217
+ function that looks worth it: history says the file has been fixed before, the
218
+ text shows a risky shape (check-then-act, retries, money, auth, a transaction, a
219
+ cache), and a cheap ranking call scores it above the bar. A push of docs, tests
220
+ or plain code stops in under a second with a named reason. Counterexamples can
221
+ only be replayed for **TypeScript, JavaScript and Python**; other languages stop
222
+ before any model is paid for.
223
+
224
+ ```bash
225
+ verity config formal push # opt in (verity init asks on an interactive terminal)
226
+ verity lean install # the toolchain, once per machine
227
+ verity prove auto # try it by hand on what is ahead of upstream
228
+ ```
229
+
230
+ The service keeps a structured record of each phase (the function, the model's
231
+ name, each promise's id and the line number or rule it rests on, each
232
+ counterexample's trace of action names and its verdict) and never the code, the
233
+ model, the harness or any prose about them. The full account — what
234
+ gets selected, the five structural rules, what a replay proves, costs and caps,
235
+ and what the dashboard shows — is at
236
+ https://verity.md/docs/formal.
199
237
 
200
238
  ## How it works
201
239