mjolnir-qa 2.1.0 → 3.0.0
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 +54 -0
- package/dist/cli.d.mts +15 -3
- package/dist/cli.mjs +636 -390
- package/dist/mcp/stdio.mjs +436 -58
- package/dist/{scan-pipeline-MQGUSey3.mjs → scan-pipeline-CAH9_Qgh.mjs} +421 -51
- package/dist/scan-pipeline-CRe7-MQn.mjs +2 -0
- package/package.json +12 -5
- package/dist/scan-pipeline-C_Rs4u8N.mjs +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,60 @@ once shipped, so this file is the record of what changed between versions.
|
|
|
11
11
|
|
|
12
12
|
## [Unreleased]
|
|
13
13
|
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- **Advisory-first CI adoption** — `mjolnir ci install` and the root
|
|
17
|
+
GitHub Action now default to non-blocking findings and non-blocking partial
|
|
18
|
+
scans. Blocking remains explicit through `--gate error`, `--gate warning`,
|
|
19
|
+
or `fail-on`.
|
|
20
|
+
- Suppression counts now report matched findings, not configured entries;
|
|
21
|
+
`suppression-gate` evaluates all-tier pre-suppression findings and enforces
|
|
22
|
+
total-count limits.
|
|
23
|
+
- Zero-finding reports no longer claim the suite is clean or that CI is green.
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- **Zero-touch PR framework** — Conventional Commits enforcement via
|
|
28
|
+
`commitlint` + `.husky/commit-msg` (scope is mandatory; WIP/fixup/squash
|
|
29
|
+
commits are rejected before they reach the object store); pinned-seed
|
|
30
|
+
property tests (`vitest.property.config.ts`, `tests/scope/property-invariants.spec.ts`
|
|
31
|
+
with a shared `SEED` constant so failures are reproducible); the
|
|
32
|
+
`merge-verify` CI job that runs the full gate on the **merge result**,
|
|
33
|
+
not the PR head, so a green PR that merges into a red `main` is visible
|
|
34
|
+
before it ships; and `scripts/check-ci-local-parity.mjs`, which keeps
|
|
35
|
+
`ci.yml`, `merge-verify.yml` and the local gate exercising the same
|
|
36
|
+
command list. All additive — no frozen surface changed.
|
|
37
|
+
|
|
38
|
+
## [3.0.0] — 2026-09-24
|
|
39
|
+
|
|
40
|
+
### Breaking changes
|
|
41
|
+
|
|
42
|
+
- Trust and execution boundaries are now explicit and bounded. JavaScript/local-rule execution requires the plugin trust gate; output writers reject symlink/traversal targets; JSON, file, cache, and runtime inputs have size budgets; CLI/MCP durations are finite.
|
|
43
|
+
- Saved report and machine-contract consumers now receive completion, scope, evidence, and verdict fields. Incomplete, L0/zero-evidence, and partial states cannot be presented as `WORTHY`.
|
|
44
|
+
- Privileged PR publication is split into a read-only scan job and an artifact-only publisher with commit-bound, paginated `mjolnir-report:v2` upserts.
|
|
45
|
+
|
|
46
|
+
### Added
|
|
47
|
+
|
|
48
|
+
- Enterprise threat-model and data-flow artifacts with a strict validator, claim registry with implementation/test/authority/expiry evidence, and a candidate trust manifest/readiness gate.
|
|
49
|
+
- Canonical completion derivation, bounded cache/artifact persistence, run-identity tree binding, same-process concurrency evidence, and deterministic source-scoped self-scan/replay gates.
|
|
50
|
+
- Public-output redaction/escaping across trust reports, job summaries, dashboards, triage, and Playwright reports; atomic artifact writes and release-mode retention controls.
|
|
51
|
+
|
|
52
|
+
### Fixed
|
|
53
|
+
|
|
54
|
+
- Cross-platform CI matrix coverage for Node 22/24 and Linux/macOS/Windows, including clean-checkout candidate-manifest hashing and deterministic self-scans.
|
|
55
|
+
- Partial/degraded scope accounting now distinguishes intentionally excluded fixtures from missed test-like files and propagates reasons through CLI, reports, and machine contracts.
|
|
56
|
+
- Generated blast-radius, demo/video, site, and release evidence is refreshed from the current tree.
|
|
57
|
+
|
|
58
|
+
### Migration
|
|
59
|
+
|
|
60
|
+
- Install `mjolnir-qa@3.0.0` with Node.js `>=22.18`.
|
|
61
|
+
- Use the `@v3` consumer tag after the stable release; use an exact `v3.0.0` tag for reproducible enforcement.
|
|
62
|
+
- Review the new `--enable-plugins` gate, finite `--max-duration` budget, report completion fields, and strict artifact path requirements.
|
|
63
|
+
|
|
64
|
+
### Certification boundary
|
|
65
|
+
|
|
66
|
+
This release is software-complete and locally certified for the declared engineering gates. Trust certification remains `NOT_CERTIFIED` until protected holdout, real-world, platform/consumer, and human authority evidence is supplied.
|
|
67
|
+
|
|
14
68
|
## [2.1.0] — 2026-09-24
|
|
15
69
|
|
|
16
70
|
### Added
|
package/dist/cli.d.mts
CHANGED
|
@@ -325,12 +325,15 @@ interface ScanResult {
|
|
|
325
325
|
* truncation actually happened — absence means the scan is whole.
|
|
326
326
|
*/
|
|
327
327
|
truncationReasons?: string[];
|
|
328
|
+
/** Canonical completion reasons, including scope and parser degradation. */
|
|
329
|
+
reasons?: string[];
|
|
328
330
|
/**
|
|
329
331
|
* Rule executions that threw and were swallowed by crash isolation
|
|
330
332
|
* (audit R-9). 0 means no rule silently failed; absence means the
|
|
331
333
|
* producer predates the counter.
|
|
332
334
|
*/
|
|
333
335
|
rulesCrashed?: number;
|
|
336
|
+
parseFallbacks?: number;
|
|
334
337
|
};
|
|
335
338
|
/**
|
|
336
339
|
* Scoring model version stamped into the result (ENGINE-001). Allows
|
|
@@ -378,6 +381,7 @@ interface ScanResult {
|
|
|
378
381
|
trustModelVersion?: string;
|
|
379
382
|
scoringModelVersion?: string;
|
|
380
383
|
frameworkSupportMatrixVersion?: string;
|
|
384
|
+
commit?: string;
|
|
381
385
|
};
|
|
382
386
|
/**
|
|
383
387
|
* Evidence Graph (R4c): the chain-law links (VERDICT ← EVIDENCE ←
|
|
@@ -956,9 +960,9 @@ interface ScanContext {
|
|
|
956
960
|
maxFiles: number;
|
|
957
961
|
/** R4c Scope Integrity: counted matcher exclusions (optional — adapters
|
|
958
962
|
* whose discovery walks sharedWalk pass this through to the counters). */
|
|
959
|
-
onIgnored?: () => void;
|
|
963
|
+
onIgnored?: (path: string) => void;
|
|
960
964
|
/** R4c Scope Integrity: counted files no adapter claims (optional). */
|
|
961
|
-
onUnrecognized?: () => void;
|
|
965
|
+
onUnrecognized?: (path: string) => void;
|
|
962
966
|
/**
|
|
963
967
|
* Called when a rule throws on a file (audit R-9): crash isolation
|
|
964
968
|
* stays silent by default, but the scan counts it and `--debug`
|
|
@@ -1291,7 +1295,9 @@ interface FileAnalysisResult {
|
|
|
1291
1295
|
testDeclarationCount: number;
|
|
1292
1296
|
rulesPartial: boolean;
|
|
1293
1297
|
parseFailed: number;
|
|
1298
|
+
parseFallbacks: number;
|
|
1294
1299
|
scanned: number;
|
|
1300
|
+
analyzed: number;
|
|
1295
1301
|
}
|
|
1296
1302
|
declare function runFileAnalysisPhase(findings: Finding[], testFiles: string[], workspace: Workspace, activeRules: UniversalRule[], hooks: ScanHooks, cache: ScanCache, rulesDigest: string, deadline: number, truncationReasons: Set<string>, declarationsByFile: Map<string, number>, fileProvenance: Array<{
|
|
1297
1303
|
path: string;
|
|
@@ -1306,6 +1312,7 @@ interface PostScanResult {
|
|
|
1306
1312
|
suppressionCount: number;
|
|
1307
1313
|
frameworks: ReturnType<typeof detectFrameworks>;
|
|
1308
1314
|
runtimeReportPath: string | undefined;
|
|
1315
|
+
runtimeIncomplete: boolean;
|
|
1309
1316
|
/** Aggregate forensic classifications from the ingested runtime report. */
|
|
1310
1317
|
forensicVerdicts: ForensicVerdictSummary | undefined;
|
|
1311
1318
|
config: ReturnType<typeof loadConfig>["config"];
|
|
@@ -1331,7 +1338,9 @@ interface AssembleScanResultInput {
|
|
|
1331
1338
|
scopeIgnored: number;
|
|
1332
1339
|
scopeUnrecognized: number;
|
|
1333
1340
|
parseFailed: number;
|
|
1341
|
+
parseFallbacks?: number;
|
|
1334
1342
|
scanned: number;
|
|
1343
|
+
analyzed?: number;
|
|
1335
1344
|
testFiles: string[];
|
|
1336
1345
|
workspace: Workspace;
|
|
1337
1346
|
scanRoot: Workspace;
|
|
@@ -1350,6 +1359,7 @@ interface AssembleScanResultInput {
|
|
|
1350
1359
|
suppressionCount: number;
|
|
1351
1360
|
frameworks: ReturnType<typeof detectFrameworks>;
|
|
1352
1361
|
runtimeReportPath: string | undefined;
|
|
1362
|
+
runtimeIncomplete?: boolean;
|
|
1353
1363
|
forensicVerdicts: ForensicVerdictSummary | undefined;
|
|
1354
1364
|
config: ReturnType<typeof loadConfig>["config"];
|
|
1355
1365
|
fileProvenance: Array<{
|
|
@@ -1383,7 +1393,7 @@ declare function runScan$1(args: CliArgs, hooks?: ScanHooks): Promise<ScanResult
|
|
|
1383
1393
|
* scripts/sync-sarif-version.cjs and guarded by the version-consistency
|
|
1384
1394
|
* spec. cli.ts re-exports this as CLI_VERSION.
|
|
1385
1395
|
*/
|
|
1386
|
-
declare const ENGINE_VERSION = "
|
|
1396
|
+
declare const ENGINE_VERSION = "3.0.0";
|
|
1387
1397
|
//#endregion
|
|
1388
1398
|
//#region src/cli-io.d.ts
|
|
1389
1399
|
/**
|
|
@@ -1684,6 +1694,8 @@ export interface UsageErrorDetail {
|
|
|
1684
1694
|
/** The flag whose value was rejected (`--tone` for `--tone loud`). */
|
|
1685
1695
|
flag?: string | undefined;
|
|
1686
1696
|
}
|
|
1697
|
+
export declare const DEFAULT_MAX_DURATION_MS = 600000;
|
|
1698
|
+
export declare const MAX_DURATION_MS = 3600000;
|
|
1687
1699
|
export declare function parseArgs(argv: string[], onError?: (detail: UsageErrorDetail) => void): CliArgs | null;
|
|
1688
1700
|
/** Hand-rolled Levenshtein distance (plan M2: no new dependencies). */
|
|
1689
1701
|
export declare function levenshtein(a: string, b: string): number;
|