@codacy/verity-cli 0.34.0-experimental.ec5aae9 → 0.34.1-experimental.542af3d

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.
package/CHANGELOG.md CHANGED
@@ -64,6 +64,33 @@ installs are untouched.
64
64
  which is the ordinary case for someone whose first Verity install *is* the
65
65
  plugin.
66
66
 
67
+ ## [0.34.1] — 2026-10-08
68
+
69
+ **Fixes from user feedback: large changes get reviewed again, and `verity init`
70
+ sets up the right tools.**
71
+
72
+ ### 🐛 Fixes
73
+
74
+ - **Large changes are reviewed again.** On large requests the Verity service
75
+ could run out of CPU time and answer HTTP 546, so the change went unreviewed.
76
+ The service now bounds the work it does per request. The CLI no longer treats
77
+ a 546 as a cold start and does not retry it.
78
+ - **Reviews answer sooner.** The service sends the review first and writes its
79
+ records after the answer.
80
+ - **Your home directory is not a project.** A session started in your home
81
+ directory no longer sends requests to the service.
82
+ - **The commit and push gate no longer reviews Verity's own skills.** It skips
83
+ a `.claude/skills/verity-*` file only when it matches the installed copy byte
84
+ for byte. A skill that you edited is still reviewed.
85
+ - **`verity init` finds your languages before your first commit.** It counts
86
+ files that git does not track yet, but not the files that it installs itself.
87
+ - **No `no-undef` on runtime globals.** The ESLint configuration no longer
88
+ reports `process`, `console` and other runtime globals as undefined.
89
+ - **Long sessions no longer grow the session ledger on every turn.**
90
+ - **Clearer text** in the formal verification review menu. `verity init` under
91
+ Claude Code now ends at step `[9/9]`.
92
+ - Includes security fixes.
93
+
67
94
  ## [0.34.0] — 2026-09-30
68
95
 
69
96
  **Formal verification at push: Verity can now prove a bug is real before it
package/bin/verity.js CHANGED
@@ -27257,7 +27257,7 @@ function channelSilence(input) {
27257
27257
  // src/lib/cli-version.ts
27258
27258
  function cliVersion() {
27259
27259
  try {
27260
- return true ? "0.34.0-experimental.ec5aae9" : "dev";
27260
+ return true ? "0.34.1-experimental.542af3d" : "dev";
27261
27261
  } catch {
27262
27262
  return "dev";
27263
27263
  }
@@ -37197,7 +37197,19 @@ async function generateAndCheck(root, req, opts) {
37197
37197
  const read2 = readSrc(req.file, 96 * 1024);
37198
37198
  if (!read2.ok) return { ok: false, error: `${req.file}: ${read2.reason}`, rounds: 0, costUsd: 0 };
37199
37199
  const sha2562 = sha256Of(read2.content);
37200
- const { lines, numbered: numbered2 } = describeTarget(read2.content, req.symbol, req.file, req.lines, { codeMap: opts.deps.codeMap });
37200
+ const { lines, numbered: numbered2, extent } = describeTarget(read2.content, req.symbol, req.file, req.lines, { codeMap: opts.deps.codeMap });
37201
+ let warning;
37202
+ if (!lines) {
37203
+ const outline = extent === "fallback:not-found" ? opts.deps.codeMap?.outline(req.file, read2.content) : void 0;
37204
+ if (outline?.source === "tree-sitter") {
37205
+ const names2 = [...new Set(outline.value.filter((f) => f.name && f.kind !== "lambda").map((f) => f.qualified))];
37206
+ const last = (req.symbol.split(/[.#:]/).pop() ?? req.symbol).toLowerCase();
37207
+ const close = names2.filter((n) => n.toLowerCase().includes(last));
37208
+ const shown = (close.length > 0 ? close : names2).slice(0, 12);
37209
+ return { ok: false, error: `no function \`${req.symbol}\` in ${req.file}${shown.length ? ` (it has: ${shown.join(", ")})` : ""}. Name one as ${req.file}#<name>, or pass --lines a-b`, rounds: 0, costUsd: 0 };
37210
+ }
37211
+ warning = `could not find the lines of \`${req.symbol}\` in ${req.file} (${extent}): the model is written from the start of the file, and a replay must copy half of the whole file. Pass --lines a-b to name the code.`;
37212
+ }
37201
37213
  const target = {
37202
37214
  file: req.file,
37203
37215
  symbol: req.symbol,
@@ -37205,7 +37217,9 @@ async function generateAndCheck(root, req, opts) {
37205
37217
  sha256: sha2562,
37206
37218
  numbered: numbered2,
37207
37219
  reasons: req.hint ? [`the user's worry, in their words: ${req.hint.slice(0, 280)}`] : [],
37208
- properties: []
37220
+ properties: [],
37221
+ // The run row records which extractor answered, as at push.
37222
+ extentSource: extent
37209
37223
  };
37210
37224
  const context = opts.deps.codeMap && !req.lines ? targetContext({ codeMap: opts.deps.codeMap, codeSource: opts.deps.codeSource, readSource: readSrc, file: req.file, content: read2.content, symbol: req.symbol }) : null;
37211
37225
  Object.assign(target, context?.fields ?? {});
@@ -37241,14 +37255,14 @@ async function generateAndCheck(root, req, opts) {
37241
37255
  const g = basisOf(p.source, files);
37242
37256
  return g.ok ? [] : [`${p.id}: ${g.why}`];
37243
37257
  });
37244
- if (bad.length === 0) return { ok: true, name: gen.name, file: rel, report, rounds: round, costUsd };
37258
+ if (bad.length === 0) return { ok: true, name: gen.name, file: rel, report, rounds: round, costUsd, ...warning ? { warning } : {} };
37245
37259
  lastError = ungroundedMessage(bad.join("; "));
37246
37260
  if (round < maxRounds) {
37247
37261
  previous = { source: gen.source, error: lastError };
37248
37262
  continue;
37249
37263
  }
37250
37264
  const grounded = report.properties.filter((p) => basisOf(p.source, files).ok);
37251
- if (grounded.length > 0) return { ok: true, name: gen.name, file: rel, report: { ...report, properties: grounded }, rounds: round, costUsd };
37265
+ if (grounded.length > 0) return { ok: true, name: gen.name, file: rel, report: { ...report, properties: grounded }, rounds: round, costUsd, ...warning ? { warning } : {} };
37252
37266
  break;
37253
37267
  }
37254
37268
  lastError = stray ? `the model abstracts ${stray.file}, not ${req.file}` : report.error ?? (report.malformed ? "the model printed malformed VERITY lines" : "the model reported no property");
@@ -37274,9 +37288,16 @@ async function prepareFormalPhase(root, env = process.env, auth2, readSource, co
37274
37288
  }
37275
37289
  const build = await buildLibraryAsync(toolchain, root, 9e4);
37276
37290
  if (!build.ok) return { ok: false, skip: "library-build-failed", detail: build.stderr.split("\n").filter((l) => !l.startsWith("trace:")).join(" ").slice(0, 200) };
37291
+ const code = await loadCodeContext(root, env, codeSource);
37292
+ return { ok: true, deps: { ...defaultDeps({ auth: auth2, apiKey, env, toolchain, readSource, ...code }), codeSource: code.codeSource } };
37293
+ }
37294
+ async function loadCodeContext(root, env = process.env, codeSource) {
37277
37295
  const loaded = await loadCodeMap(env);
37278
- const source2 = codeSource ?? withoutPaths(worktreeSource(root), isDeniedPath);
37279
- return { ok: true, deps: { ...defaultDeps({ auth: auth2, apiKey, env, toolchain, readSource, codeMap: loaded.ok ? loaded.map : null, codeSource: source2 }), codeSource: source2 } };
37296
+ return { codeMap: loaded.ok ? loaded.map : null, codeSource: codeSource ?? withoutPaths(worktreeSource(root), isDeniedPath) };
37297
+ }
37298
+ async function onDemandDeps(root, opts) {
37299
+ const code = await loadCodeContext(root, opts.env);
37300
+ return { ...defaultDeps({ ...opts, tier: "deep", ...code }), codeSource: code.codeSource };
37280
37301
  }
37281
37302
  function changedFunction(codeMap, file, content, changed) {
37282
37303
  const outline = codeMap.outline(file, content);
@@ -40354,7 +40375,7 @@ function registerInitCommand(program2) {
40354
40375
  ...telemetryChoice ? { telemetry: telemetryChoice } : {},
40355
40376
  init: {
40356
40377
  completed_at: (/* @__PURE__ */ new Date()).toISOString(),
40357
- cli_version: true ? "0.34.0-experimental.ec5aae9" : "dev"
40378
+ cli_version: true ? "0.34.1-experimental.542af3d" : "dev"
40358
40379
  }
40359
40380
  });
40360
40381
  } catch (err2) {
@@ -41688,21 +41709,22 @@ ${f.reason ? ` ${terminalText(f.reason, 2e3)}
41688
41709
  printError("Verity library did not build");
41689
41710
  process.exit(2);
41690
41711
  }
41691
- const deps = defaultDeps({ auth: auth2 ?? void 0, apiKey: process.env.VERITY_PROVE_DIRECT === "1" ? process.env.OPENAI_API_KEY : void 0, toolchain: tc, tier: "deep" });
41712
+ const deps = await onDemandDeps(root, { auth: auth2 ?? void 0, apiKey: process.env.VERITY_PROVE_DIRECT === "1" ? process.env.OPENAI_API_KEY : void 0, toolchain: tc });
41692
41713
  if (!opts.json) printInfo(`asking the Verity service for a model of ${symbol || `${file}:${opts.lines}`} \u2026`);
41693
41714
  const out2 = await generateAndCheck(root, { file, symbol: symbol || `${file}:${opts.lines}`, lines, hint: opts.hint, revise }, { deps, maxRounds: 3 });
41694
41715
  if (!out2.ok) {
41695
41716
  if (opts.json) printJson(out2);
41696
- else printError(`${out2.error} (${out2.rounds} round(s)${out2.costUsd ? `, $${out2.costUsd.toFixed(2)}` : ""}) \u2014 write the model by hand (Models/README.md) or narrow the target`);
41717
+ else printError(out2.rounds === 0 ? out2.error : `${out2.error} (${out2.rounds} round(s)${out2.costUsd ? `, $${out2.costUsd.toFixed(2)}` : ""}) \u2014 write the model by hand (Models/README.md) or narrow the target`);
41697
41718
  process.exit(2);
41698
41719
  }
41720
+ if (out2.warning && !opts.json) printWarn(out2.warning);
41699
41721
  try {
41700
41722
  writeResult(root, out2.report);
41701
41723
  } catch (err2) {
41702
41724
  if (!(err2 instanceof SafeWriteError)) throw err2;
41703
41725
  }
41704
41726
  if (opts.json) {
41705
- printJson({ name: out2.name, file: out2.file, rounds: out2.rounds, cost_usd: out2.costUsd, report: { ...out2.report, passes: reportPasses(out2.report), summary: summarize(out2.report) } });
41727
+ printJson({ name: out2.name, file: out2.file, rounds: out2.rounds, cost_usd: out2.costUsd, ...out2.warning ? { warning: out2.warning } : {}, report: { ...out2.report, passes: reportPasses(out2.report), summary: summarize(out2.report) } });
41706
41728
  return;
41707
41729
  }
41708
41730
  printInfo(`wrote ${out2.file} (${out2.rounds} round(s)${out2.costUsd ? `, $${out2.costUsd.toFixed(2)}` : ""})`);
@@ -41850,8 +41872,8 @@ function registerLeanCommand(program2) {
41850
41872
  }
41851
41873
 
41852
41874
  // src/cli.ts
41853
- program.name("verity").description("CLI for Verity quality gate service").version("0.34.0-experimental.ec5aae9").option("--token <token>", "Override authentication token").option("--service-url <url>", "Override service URL").option("--verbose", "Log HTTP requests/responses to stderr").hook("preAction", async (_thisCommand, actionCommand) => {
41854
- installStderrLog(actionCommand.name(), process.argv.slice(2), "0.34.0-experimental.ec5aae9");
41875
+ program.name("verity").description("CLI for Verity quality gate service").version("0.34.1-experimental.542af3d").option("--token <token>", "Override authentication token").option("--service-url <url>", "Override service URL").option("--verbose", "Log HTTP requests/responses to stderr").hook("preAction", async (_thisCommand, actionCommand) => {
41876
+ installStderrLog(actionCommand.name(), process.argv.slice(2), "0.34.1-experimental.542af3d");
41855
41877
  setUserNamedServiceUrl(program.opts().serviceUrl);
41856
41878
  try {
41857
41879
  await foldLegacyLocalCredential();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/verity-cli",
3
- "version": "0.34.0-experimental.ec5aae9",
3
+ "version": "0.34.1-experimental.542af3d",
4
4
  "description": "CLI for Verity quality gate service",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://verity.md",