veristack 0.1.2 → 0.1.3
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/dist/cli.mjs +22 -2
- package/package.json +4 -2
package/dist/cli.mjs
CHANGED
|
@@ -11829,7 +11829,7 @@ function usage() {
|
|
|
11829
11829
|
"vstack — Deterministic Verification Stack, Push-Down Analyzer, Formal Checks & JEV-Style System 1 Circuits",
|
|
11830
11830
|
"",
|
|
11831
11831
|
"Commands:",
|
|
11832
|
-
" vstack scan [dir] [--json | --md] [--config <file>] [--disable <rules>] [--ratchet <file>] [--update-ratchet] [--fail-on-cheats] [--fail-on-errors]",
|
|
11832
|
+
" vstack scan [dir] [--json | --md] [--config <file>] [--disable <rules>] [--ratchet <file>] [--update-ratchet] [--strict] [--fail-on-cheats] [--fail-on-errors]",
|
|
11833
11833
|
" vstack no-comments [dir] [--json] [--fail]",
|
|
11834
11834
|
" vstack state-machines [dir] [--json] [--fail]",
|
|
11835
11835
|
" vstack diff-cheats [dir] [--base <ref>] [--json] [--fail]",
|
|
@@ -11914,12 +11914,21 @@ async function run() {
|
|
|
11914
11914
|
const asJson = rest.includes("--json");
|
|
11915
11915
|
const asMd = rest.includes("--md");
|
|
11916
11916
|
if (cmd === "scan") {
|
|
11917
|
+
const strict = rest.includes("--strict");
|
|
11917
11918
|
const configPath = parseFlagValue(rest, "--config");
|
|
11918
11919
|
const disableRaw = parseFlagValue(rest, "--disable");
|
|
11919
11920
|
const disableRules = disableRaw ? disableRaw.split(",").map((r) => r.trim()).filter(Boolean) : undefined;
|
|
11920
|
-
const report = scanRepo(target, { configPath, disableRules });
|
|
11921
11921
|
const ratchetPath = parseFlagValue(rest, "--ratchet");
|
|
11922
11922
|
const updateRatchet = rest.includes("--update-ratchet");
|
|
11923
|
+
if (strict && (ratchetPath || updateRatchet)) {
|
|
11924
|
+
console.error("vstack scan --strict forbids --ratchet and --update-ratchet baselines.");
|
|
11925
|
+
return 1;
|
|
11926
|
+
}
|
|
11927
|
+
if (strict && (configPath || disableRules && disableRules.length > 0)) {
|
|
11928
|
+
console.error("vstack scan --strict forbids --config and --disable rule overrides.");
|
|
11929
|
+
return 1;
|
|
11930
|
+
}
|
|
11931
|
+
const report = scanRepo(target, { configPath, disableRules });
|
|
11923
11932
|
let ratchetEval;
|
|
11924
11933
|
if (ratchetPath) {
|
|
11925
11934
|
if (updateRatchet || !fs10.existsSync(ratchetPath)) {
|
|
@@ -11948,6 +11957,17 @@ RATCHET (${ratchetPath}): ${ratchetEval.passed ? "PASS" : "FAIL"}`);
|
|
|
11948
11957
|
}
|
|
11949
11958
|
}
|
|
11950
11959
|
}
|
|
11960
|
+
if (strict) {
|
|
11961
|
+
if (report.config && (report.config.disabledRules.length > 0 || report.config.suppressedCount > 0)) {
|
|
11962
|
+
console.error("vstack scan --strict failed: .vstack.json disables or suppresses rules.");
|
|
11963
|
+
return 1;
|
|
11964
|
+
}
|
|
11965
|
+
const s = report.summary;
|
|
11966
|
+
if (s.totalFindings > 0 || s.errorCount > 0 || s.warnCount > 0 || s.cheatCount > 0 || s.noCommentCount > 0 || s.holeCount > 0 || s.pushDownCount > 0) {
|
|
11967
|
+
return 1;
|
|
11968
|
+
}
|
|
11969
|
+
return 0;
|
|
11970
|
+
}
|
|
11951
11971
|
if (ratchetEval && !ratchetEval.passed)
|
|
11952
11972
|
return 1;
|
|
11953
11973
|
if (rest.includes("--fail-on-errors") && report.summary.errorCount > 0)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "veristack",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Deterministic 9-rung zero-defect verification ladder, cross-language static and invariant analyzer, Bend 2 formal laws, and anti-cheat CI gates for TypeScript, C#, Rust, Python, Go, SQL, and Shell.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://github.com/a1ter-nate/veristack#readme",
|
|
@@ -47,6 +47,8 @@
|
|
|
47
47
|
"test": "bun test ./tests/",
|
|
48
48
|
"test:examples": "bun test ./tests/examples-accuracy.test.ts ./examples/typescript/clean/check-coverage-policy.test.ts",
|
|
49
49
|
"scan": "bun src/cli.ts scan .",
|
|
50
|
+
"scan:strict": "bun src/cli.ts scan . --strict",
|
|
51
|
+
"check:max-lines": "node scripts/check-max-lines.mjs",
|
|
50
52
|
"lint:no-comments": "bun src/cli.ts no-comments . --fail",
|
|
51
53
|
"lint:state-machines": "bun src/cli.ts state-machines . --fail",
|
|
52
54
|
"test:csharp": "dotnet test lint/csharp/VStack.Analyzers.Tests/VStack.Analyzers.Tests.csproj && dotnet test templates/csharp-reference/OrderLifecycle.slnx",
|
|
@@ -54,7 +56,7 @@
|
|
|
54
56
|
"test:go": "cd templates/go-reference && go vet ./... && go test -race -v ./...",
|
|
55
57
|
"test:laws": "bun src/cli.ts laws . --verify --fail",
|
|
56
58
|
"test:python": "uv run --project templates/python-reference ruff check templates/python-reference examples/python/clean && uv run --project templates/python-reference ruff format --check templates/python-reference examples/python/clean && uv run --project templates/python-reference mypy templates/python-reference/src templates/python-reference/tests examples/python/clean && PYTHONPATH=examples/python/clean uv run --project templates/python-reference pytest templates/python-reference examples/python/clean",
|
|
57
|
-
"check": "bun run lint:no-comments && bun run lint:state-machines && bun test ./tests/ ./examples/typescript/clean/ && bun src/cli.ts scan . --
|
|
59
|
+
"check": "bun run check:max-lines && bun run lint:no-comments && bun run lint:state-machines && bun src/cli.ts formal-sync . --fail && bun src/cli.ts laws . --fail && bun test ./tests/ ./examples/typescript/clean/ && bun src/cli.ts scan . --strict"
|
|
58
60
|
},
|
|
59
61
|
"engines": {
|
|
60
62
|
"node": ">=18.0.0",
|