@codacy/verity-cli 0.31.1-experimental.79dc9c2 → 0.31.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.
- package/CHANGELOG.md +4 -3
- package/bin/verity.js +33 -17
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -30,9 +30,10 @@ npm install -g @codacy/verity-cli
|
|
|
30
30
|
|
|
31
31
|
### 💬 The carried-findings notice tells the truth, and offers a way out
|
|
32
32
|
|
|
33
|
-
- It **no longer calls those findings "blocking."** They
|
|
34
|
-
|
|
35
|
-
turn,
|
|
33
|
+
- It **no longer calls those findings "blocking."** They did not *fail* your
|
|
34
|
+
run — a run that was otherwise passing printed "1 blocking finding(s)" every
|
|
35
|
+
turn, which reads as a failure that never happened. (It does still turn a PASS
|
|
36
|
+
into a WARN, and the notice now says only what is true.)
|
|
36
37
|
- It now **names the way to resolve them**, instead of repeating a problem with
|
|
37
38
|
no stated exit.
|
|
38
39
|
|
package/bin/verity.js
CHANGED
|
@@ -10506,7 +10506,7 @@ var SECURITY_PATTERNS = [
|
|
|
10506
10506
|
/Dockerfile/
|
|
10507
10507
|
];
|
|
10508
10508
|
var PROD_SERVICE_URL = "https://ofcamwrjwrkazqvdchko.supabase.co/functions/v1";
|
|
10509
|
-
var DEFAULT_SERVICE_URL = "
|
|
10509
|
+
var DEFAULT_SERVICE_URL = "".length > 0 ? "" : PROD_SERVICE_URL;
|
|
10510
10510
|
var GITHUB_CLIENT_ID = "Iv23li88HxAi3ZrbYzWh";
|
|
10511
10511
|
var GITHUB_DEVICE_CODE_URL = "https://github.com/login/device/code";
|
|
10512
10512
|
var GITHUB_ACCESS_TOKEN_URL = "https://github.com/login/oauth/access_token";
|
|
@@ -14136,6 +14136,11 @@ var REANCHOR_WINDOW = 20;
|
|
|
14136
14136
|
var STATEMENT_MAX_AGE_MS = 7 * 24 * 60 * 60 * 1e3;
|
|
14137
14137
|
var DEFAULT_MEMORY_BUDGET_BYTES = 4096;
|
|
14138
14138
|
|
|
14139
|
+
// src/lib/dossier/events.ts
|
|
14140
|
+
function statementAnchorKey(file, patternId) {
|
|
14141
|
+
return `${file}::${patternId}`;
|
|
14142
|
+
}
|
|
14143
|
+
|
|
14139
14144
|
// src/lib/dossier/log.ts
|
|
14140
14145
|
var import_node_crypto4 = require("node:crypto");
|
|
14141
14146
|
var import_node_fs10 = require("node:fs");
|
|
@@ -15350,10 +15355,10 @@ function recordVerdict(d, v) {
|
|
|
15350
15355
|
const at = src?.[f.line - 1];
|
|
15351
15356
|
appendEvent(d, {
|
|
15352
15357
|
k: "statement",
|
|
15353
|
-
//
|
|
15354
|
-
//
|
|
15355
|
-
//
|
|
15356
|
-
anchor_key:
|
|
15358
|
+
// ⚠ ONE OWNER. The server's settled feed is resolved against this exact
|
|
15359
|
+
// key in `13-reconcile.ts`; spelling the template literal twice is how the
|
|
15360
|
+
// two sides drift apart. See `statementAnchorKey`.
|
|
15361
|
+
anchor_key: statementAnchorKey(f.file, f.pattern_id),
|
|
15357
15362
|
file: f.file,
|
|
15358
15363
|
line: f.line,
|
|
15359
15364
|
pattern_id: f.pattern_id,
|
|
@@ -18454,7 +18459,7 @@ function channelSilence(input) {
|
|
|
18454
18459
|
// src/lib/cli-version.ts
|
|
18455
18460
|
function cliVersion() {
|
|
18456
18461
|
try {
|
|
18457
|
-
return true ? "0.31.1
|
|
18462
|
+
return true ? "0.31.1" : "dev";
|
|
18458
18463
|
} catch {
|
|
18459
18464
|
return "dev";
|
|
18460
18465
|
}
|
|
@@ -18706,7 +18711,7 @@ function describeOpenElsewhere(open) {
|
|
|
18706
18711
|
(+${open.length - 5} more)` : "";
|
|
18707
18712
|
return `STILL OPEN ELSEWHERE. ${open.length} finding(s) Verity raised earlier are still on disk in files this run did not review:
|
|
18708
18713
|
${lines.join("\n")}${more}
|
|
18709
|
-
They did not
|
|
18714
|
+
They did not fail this run \u2014 this verdict covers the current change only. The tree is not clean.
|
|
18710
18715
|
Fix them, or record a disposition: verity waive <pattern-id> --file <path> --reason "\u2026"`;
|
|
18711
18716
|
}
|
|
18712
18717
|
|
|
@@ -20885,6 +20890,25 @@ var import_node_path26 = require("node:path");
|
|
|
20885
20890
|
async function reconcile(run) {
|
|
20886
20891
|
const { actionSummary, allChanged, analyzable, baseline, baselineSessionId, codeDelta, contentHash, conversation, decision, foldResult, memory, memorySession, response, reviewable, securityFiles, turnId } = run;
|
|
20887
20892
|
const sentPaths = codeDelta.files.map((f) => f.path);
|
|
20893
|
+
if (memorySession) {
|
|
20894
|
+
try {
|
|
20895
|
+
const settledSites = response.metadata?.settled_sites;
|
|
20896
|
+
if (Array.isArray(settledSites)) {
|
|
20897
|
+
for (const site of settledSites) {
|
|
20898
|
+
const siteRecord = site;
|
|
20899
|
+
const file = typeof siteRecord?.file === "string" ? siteRecord.file : null;
|
|
20900
|
+
const patternId = typeof siteRecord?.pattern_id === "string" ? siteRecord.pattern_id : null;
|
|
20901
|
+
if (!file || !patternId) continue;
|
|
20902
|
+
appendEvent(memorySession.d, {
|
|
20903
|
+
k: "outcome",
|
|
20904
|
+
anchor_key: statementAnchorKey(file, patternId),
|
|
20905
|
+
outcome: "answered"
|
|
20906
|
+
});
|
|
20907
|
+
}
|
|
20908
|
+
}
|
|
20909
|
+
} catch {
|
|
20910
|
+
}
|
|
20911
|
+
}
|
|
20888
20912
|
let openElsewhere = [];
|
|
20889
20913
|
if (memorySession) {
|
|
20890
20914
|
try {
|
|
@@ -21045,14 +21069,6 @@ async function reconcile(run) {
|
|
|
21045
21069
|
})() : [];
|
|
21046
21070
|
if (memorySession) {
|
|
21047
21071
|
try {
|
|
21048
|
-
const settledAnchors = response.metadata?.settled_anchors;
|
|
21049
|
-
if (Array.isArray(settledAnchors)) {
|
|
21050
|
-
for (const anchorKey of settledAnchors) {
|
|
21051
|
-
if (typeof anchorKey === "string" && anchorKey.length > 0) {
|
|
21052
|
-
appendEvent(memorySession.d, { k: "outcome", anchor_key: anchorKey, outcome: "answered" });
|
|
21053
|
-
}
|
|
21054
|
-
}
|
|
21055
|
-
}
|
|
21056
21072
|
recordVerdict(memorySession.d, {
|
|
21057
21073
|
runId: response.run_id ?? turnId,
|
|
21058
21074
|
decision,
|
|
@@ -23591,8 +23607,8 @@ function registerTelemetryCommands(program2) {
|
|
|
23591
23607
|
}
|
|
23592
23608
|
|
|
23593
23609
|
// src/cli.ts
|
|
23594
|
-
program.name("verity").description("CLI for Verity quality gate service").version("0.31.1
|
|
23595
|
-
installStderrLog(actionCommand.name(), process.argv.slice(2), "0.31.1
|
|
23610
|
+
program.name("verity").description("CLI for Verity quality gate service").version("0.31.1").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) => {
|
|
23611
|
+
installStderrLog(actionCommand.name(), process.argv.slice(2), "0.31.1");
|
|
23596
23612
|
setUserNamedServiceUrl(program.opts().serviceUrl);
|
|
23597
23613
|
try {
|
|
23598
23614
|
await foldLegacyLocalCredential();
|